Customizing SSO configuration using LTPA cookies in Liberty
With single sign-on (SSO) configuration support, web users can authenticate once when accessing Liberty resources such as HTML, JavaServer Pages (JSP) files, and servlets, or accessing resources in multiple Liberty servers that share the same Lightweight Third Party Authentication (LTPA) keys.
Exemple
When a user passes authentication on one of the Liberty servers, authentication information generated by the server is transported to the web browser in a cookie. The cookie is used to propagate the authentication information to other Liberty servers.
The LTPA is configured and ready for immediate use. The default cookie name used to store the SSO token is called ltpaToken2. If you want to use a different name for the cookie, you can customize the cookie name using the ssoCookieName attribute of the <webAppSecurity> element. If you customize the cookie name, make sure that all the servers that participate in SSO use the same cookie name.
For more information about SSO, see SSO concept in Liberty.
<webAppSecurity logoutOnHttpSessionExpire="true" ssoCookieName="myCookieName" />
- Les serveurs doivent utiliser les mêmes clés LTPA et partager le même registre utilisateurs.
- Si les serveurs ne figurent pas dans le même domaine, utilisez l'attribut ssoDomainNames de l'élément <webAppSecurity> pour
répertorier les domaines. L'exemple de code suivant définit le nom de domaine
pour domain.com :
<webAppSecurity ssoDomainNames="domain.com" />
- Si les serveurs figurent dans le même domaine, mettez à true l'attribut
ssoUseDomainFromURL de l'élément
<webAppSecurity> ou indiquez le
nom de domaine dans l'attribut ssoDomainNames. Dans l'exemple de code suivant, ssoUseDomainFromURL est mis à
true pour que le nom de domaine soit pris de l'URL de la demande :
<webAppSecurity ssoUseDomainFromURL="true" />