Integrating SAP Commerce with SAP Cloud Identity Services

Integrate your service provider with your identity provider.

Context

To integrate SAP Commerce (your service provider) with SAP Cloud Identity Services (your identity provider), exchange metadata files between the providers so that the information required by SAML Single Sign-On is communicated between the two parties.

Procedure

  1. Log in to Identity Authentication Service as administrator.
  2. Go to Start of the navigation pathApplications & Resources Next navigation step Tenant Settings Next navigation step SAML 2.0 Configuration.End of the navigation path
  3. Click Download Metadata File in the bottom-left corner.

    The metadata.xml file is downloaded to your computer.

  4. Move the metadata.xml file to hybris\bin\modules\platform\samlsinglesignon\web\webroot\WEB-INF\security.
  5. Open the metadata.xml file and copy the certificate from the X509Certificate tag.
  6. In the hybris\bin\modules\platform\samlsinglesignon\web\webroot\WEB-INF\security directory, create a new file called cer.cer.
  7. Open the cer.cer file and add there the certificate from the X509Certificate tag, and save the file.

    In the file, you should have something similar to the following:

    -----BEGIN CERTIFICATE-----
    
    MIIDHjC…………..ZS1nQxuQ==
    
    -----END CERTIFICATE-----
  8. At the command prompt, navigate to hybris\bin\modules\platform\samlsinglesignon\web\webroot\WEB-INF\security and import the certificate to your keystore by using the following command:
    keytool -importcert -alias hybris -file cer.cer -keystore samlKeystore.jks
  9. Type Yes when asked if you trust the certificate.
    You've passed on your identity provider's metadata to the service provider.
  10. At the command prompt, navigate to /hybris/bin/platform and start your server by using the following command:
    • For Windows systems, enter hybrisserver.bat

    • For Unix systems, enter ./hybrisserver.sh start

  11. Go to https://localhost:9002/samlsinglesignon/saml/metadata.

    The spring_saml_metadata.xml file is downloaded to your computer.

  12. Log in to Identity Authentication Service as administrator.
  13. Go to Start of the navigation pathApplications & Resources Next navigation step Applications.End of the navigation path
  14. Click Add at the bottom of the list of existing applications. Type a name for your application and click Save.
  15. Select your application in the list of applications and go to Assertion Attributes.
  16. Check if the following attributes are listed. If not, add them by clicking Add and choosing the missing attribute.

    First Name: first_name

    Last Name: last_name

    E-Mail: mail

    Groups: groups

  17. If you added any new attributes, click Save in the bottom-left corner.
  18. Select your application in the list of applications and go to SAML 2.0 Configuration.
  19. In the Define from Metadata section, upload your service provider metadata file that you downloaded in step 13.
  20. Click Save in the bottom-right corner.

    You've created a new application and passed on your service provider's metadata to your identity provider.

Results

You've integrated SAP Commerce with SAP Cloud Identity Services.