Enabling single sign-on
Enabling single sign-on (SSO) preserves user authentication between HCL Commerce and other web applications. By using HTTP single sign-on, the user is not prompted multiple times for security credentials within a trust domain.
The following instructions are provided for enabling single sign-on when HCL Commerce is configured to use LDAP and the web application for which you are enabling single sign-on is sharing the same LDAP server.
Before you begin
- Install and configure an LDAP server. To configure an LDAP server see Preparing the LDAP server for use with HCL Commerce.
- Enable WebSphere Application Server security with Federated Repositories.
- Modify the HCL Commerce configuration
file. If HCL Commerce switches to a single sign-on environment when
there is shopper information in the HCL Commerce database, ensure that the
MigrateUsersFromWCSdb
flag is set toON
. - Synchronize the system clocks of all the systems that are included in the single sign-on configuration.
Procedure
-
Enable SSO in your HCL Commerce deployment.
Method Procedure Using Run Engine commands - Add the
enable SSO
command to custConfiguration.sh.For example:#!/bin/bash run enable-sso domainName true run set-system-property SingleSignOnEnabled true
Where an example of the domainName is mydomain.com.
- In the Docker file, copy custConfiguration.sh to
/SETUP/bin/custConfiguration.sh and change the permissions
for the file to 755.For example:
COPY custConfiguration.sh /SETUP/bin RUN chmod 755 /SETUP/bin/custConfiguration.sh
- Build the customized ts-app Docker image.
Using Vault configurations Set the following SSO values in Vault. Tenant/EnvName/EnvType/ssoEnable:true Tenant/EnvName/EnvType/ssoDomainName: domainName Tenant/EnvName/EnvType/ssoSSL: boolean
For more information on these values, see SSO-related configurations within the Environment data in Vault reference.
- Add the
- Optional:
If HCL Commerce is the master of the SSO configuration, generate and export
the key file for HCL Commerce.
-
- Ensure that WebSphere Application Server is started.
- Open the WebSphere Application Server Administrative Console.
- Expand the Security node and click Global Security.
- In the Authentication section, click LTPA.
- In the Cross-cell single sign-on section, enter and verify the password for the LTPA token that you are exporting.
- Enter the Fully qualified key file name. This name is the directory location and file name for the key file that must be imported to the server for the other application.
- Click Export.
- Click Apply > Save directly to the master configuration.
- Go to the directory that you specified for the key file and verify that the key is generated.
- Copy this exported key file from the HCL Commerce file system and import the key into the file system of the server for the other application.
-
- From inside the ts-app container, run the following command
to export the LTPA
token.
For example:export-ltpa-keys ltpaKeyFile password
export-ltpa-keys /SETUP/ltpa.key passw0rd
- Copy and save the ltpa.key file
locally.
docker cp bvt_txn_1:/SETUP/ltpa.key ltpa.key
- From inside the ts-app container, run the following command
to export the LTPA
token.
-
- Optional:
If another application is the SSO Master, then import the key file from the other
application into HCL Commerce.
- Copy the generated key file from file system of the server for the other application to the file system for HCL Commerce.
- Open the WebSphere Application Server Administration Console.
- Expand the Security node and click Global Security.
- In the Authentication section, select LTPA.
- In the Cross-cell single sign-on section, enter and verify the password for the LTPA token that you are importing.
- Enter the Fully qualified key file name for the key file that you copied from the file system of the other application.
- Click Import keys.
- Click Apply > Save directly to the master configuration.
- Restart the servers for HCL Commerce and for the other application.
- Optional:
Configure the roles that are automatically assigned to users that use single sign-on
(SSO) to log into HCL Commerce from another application.
- Optional:
If LTPA tokens are being used, it is possible to allow them to keep a session alive
beyond the standard HCL Commerce session timeout. The LTPA token is only checked
when the session is expired. If valid, it refreshes the session.
- Restart the WebSphere Application Server.