The Spring Security framework is supported and implemented in SAP Commerce Cloud, managing the:
Limitation of specific resources’ access based on predefined user roles.
Delegation of authentication and authorization to secure web applications.
Provision of services like 'remember me', login pages, and so on.
This framework is generally employed across multiple web applications in Commerce Cloud, including but not limited to:
Backoffice: Manages access to a variety of functionalities and modules within this area.
OCC (Omni Commerce Connect) Web Services: Offers a secure environment for executing various operations like checkout, cart, promotions, etc.
HAC (SAP Commerce Cloud Administration Console): Provides user management capabilities and protects sensitive information.
In each of these applications that utilizes Spring Security, you will generally find a file that configures Spring Security. This file is commonly named spring-security-config.xml, ﹤extension_name﹥-spring-security.xml, ﹤extension_name﹥-spring-security-config.xml, or simply, security-spring.xml. A typical example of this file is illustrated here:

Please note that:
- The Spring Security schema is in use.
- The intercept-url tags define access rules. For example:
- All users can access the login page via https.
- Only the members of the customer group can access the my-account page via https.
- The default CoreAuthenticationProvider with the bean named coreAuthenticationProvider is recommended for consistent authentication across all applications.
As an alternative, you can extend this provider to establish your own authentication mechanism. Here is a simple example:

Based on the code presented above, you can observe that:
- The BackofficeAuthenticationProvider extends the standard CoreAuthenticationProvider.
- The authenticate method has been overridden to adapt the default authentication mechanism.
- Initially, an extra verification step, the checkBackofficeAccess method, verifies the "disabled Backoffice login" property unique to each Employee user.
- After this initial verification, the standard username and password verification continues via the default coreAuthenticate method.