Skip to Content

Setup SAML SSO from BI to HANA using CommonCryptoLib or SapCryptoLib


This blog is intended to use SAP crypto library to enable SAML SSO from SAP BI4 to SAP HANA DB. If you want to use OPENSSL instead, please check the other SCN blog for details.

Turn on SSL using SAP Crypto Library

1.     Install SAP Crypto library

SAP Crypto Library can be downloaded from Service Market Place. Browse to, expand Support Packages and Patches Browse our Download Catalog SAP Cryptographic Software SAPCRYPTOLIB SAPCRYPTOLIB 5.5.5 Linux on x86_64 64bit.

Use SAPCAR to extract sapgenpse and to /usr/sap/<SID>/SYS/global/security/lib/

Add the directory containing the SAP Crypto libraries to your library path:

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/sap/<SAPSID>/SYS/global/security/lib

The new CommonCryptoLib (SAPCRYPTOLIB) Version 8.4.30 (or higher) is fully compatible with previous versions of SAPCRYPTOLIB, but adds features of SAP Single Sign-On 2.0 Secure Login Library. It can be downloaded in this location:

expand Support Packages and Patches Browse our Download Catalog Additional Components SAPCRYPTOLIB COMMONCRYPTOLIB 8

Please refer to the following SAP note for details about using CommonCryptoLib:

2084313 – Install and Verify CommonCrypto to SAP HANA

The CommonCryptoLib is supported by HANA since Rev 74. Starting from HANA SPS9, the CommonCryptoLib will be delivered with HANA, sapsrv.pse file is also auto generated by default.

2.     Create the SSL key pair and certificate request files

  • Copy the sapgenpse and to $SECUDIR directory. Then run sapgenpse to generate sapsrv.pse file and SAPSSL.req file:

  ./sapgenpse gen_pse -p sapsrv.pse -r SAPSSL.req “CN=<FQDN of the host>”

  • Send the Certificate Request to a Certificate Authority to be signed. Browse to, and expand SAP Trust Center Services in Detail, and click SSL Test Server Certificates, and then click the ‘Test it Now!’ button. Paste the content from the SAPSSL.req file to the text box, and click Continue.
    SAP returns the signed certificate as text, copy this text and paste it into a file on the HANA server: 
  • Download the  SAP SSL Test Server CA Certificate from the site:

  • Import the Signed Certificate using sapgenpse
    ./sapgenpse import_own_cert -c SAPSSL.cer -p sapsrv.pse -r SAPServerCA.der
3. Check HANA settings
global.ini->[Communication]->sslcryptoprovider = sapcrypto(change it to commoncrypto if use the CommonCryptoLib)

4.Restart HANA, and test if SSL works from HANA studio

Click on the “Connect using SSL” option in the properties of the connection.  Once done, a lock will appear in the connection in HANA Studio

Create Certificate file for BO instance.

  1. Create HANA Authentication connection
    Log onto BO CMCApplicationHANA Authentication, click New. After provide HANA Hostname and port, and IDP name, click the Generate button, and click OK button so that you will see an entry added for HANA authentication
    10-22-2014 10-07-46 AM.png
  2. Copy the content of the generated certificate and paste it to a file on your HANA server:


  3. Add the certification to the pse file:

./sapgenpse maintain_pk -p sapsrv.pse -a sapid.cer


4. You may need to Restart HANA to make the new pse file take effect.

SAML configuration in HANA

  1. Create SAML provider in HANA

You could import the SAML identity provider from the certificate file (sapid.cer) which you created from last step in Security->Open security Console -> SAML Identity Providers. Make sure you have chosen the SAP Cryptographic Library.


2. Create a HANA user TESTUSER with SAML authentication.

Check the SAML option, click the Configure link, then Add the Identity Provider created in last step ‘HANA_BI_PROVIDER‘ for the external user ‘Administrator’


Test SAML authentication

Go to BO CMCApplicationHANA Authentication, edit the entry created in previous step, click “Test Connection” button.



If the connection test is not successful, please change the trace level of the following to DEBUG:

indexserver.ini – authentication, xssamlproviderconfig

The index server trace will provide more information on why the authentication failed.

You may find more information about tracing in this SAP note:

2083682  – How to Enhance Tracing for SAP HANA SSO Login Issues


How to Configure SSL for SAP HANA XSEngine using SAPCrypto

Configuring SAML with SAP HANA and SAP BusinessObjects 4.1 – Part 1

Use SAML to Enable SSO for your SAP HANA XS App

You must be Logged on to comment or reply to a post.