Using SSO in SAP Commerce Cloud Cockpits

Single Sign On (SSO) is a mechanism, in which a single action of a user authentication enables to access several systems without a need to reenter passwords. It is possible if the related authorization process permits the authenticated user to access those systems. There are different ways of implementing the SSO in the system. In SAP Commerce Cloud, the default implementation is based on cookies.

To enable the SSO feature, add the following configuration to spring-security-config.xml of your web extension:

spring-security-config.xml

<security:http ...>
  <security:remember-me services-ref="rememberMeServices" key="cockpit"/>
</security:http>

<security:authentication-manager alias="rememberMeAuthenticationManager">
   <security:authentication-provider ref="coreAuthenticationProvider"/>
</security:authentication-manager>

<bean id="rememberMeServices">
   <property name="userDetailsService" ref="coreUserDetailsService"/>
   <property name="key" value="cockpit"/>
   <property name="path" value="/" />
   <property name="cookieName" value="LoginToken"/>
</bean>

If the SSO is enabled for your cockpit extension, like described above, and the Remember me check box is selected, a new SSO cookie is created when a user logs in to the extension. Then, if the user redirects to another extension where the SSO is enabled, this cookie is used to authenticate the user. Therefore the user does not need to reenter login and password.

When a user explicitly logs out of the SSO aware cockpit, the SSO cookie is removed.