Overview

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 http://service.sap.com/swdc, 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 libsapcrypto.so 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 libsapcrypto.so 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 http://service.sap.com/trust, 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.
    /wp-content/uploads/2014/10/1_569234.png
    SAP returns the signed certificate as text, copy this text and paste it into a file on the HANA server: 
    /usr/sap/<sid>/HDB<instance_nr>/<hostname>/sec/SAPSSL.cer
  • Download the  SAP SSL Test Server CA Certificate from the http://service.sap.com/trust site:
    /wp-content/uploads/2014/10/6_570662.png

  • 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
/wp-content/uploads/2014/10/2_569235.png

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:

    /usr/sap/<sid>/HDB<instance_nr>/<hostname>/sec/sapid.cer

  3. Add the certification to the pse file:

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

/wp-content/uploads/2014/10/3_569249.png

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.

/wp-content/uploads/2014/10/5_569819.png

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’

/wp-content/uploads/2014/10/4_569250.png

Test SAML authentication

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

/wp-content/uploads/2014/10/7_570663.png

Troubleshooting

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

Reference

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

To report this post you need to login first.

5 Comments

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

  1. Rahul Chandra Kini

    HI Ling,

    Thanks for this useful post.

    1. Will the above steps remain the same for new CommonCryptoLib as well?

    2. Are there separate commands for generating the trust store and key store?

    3. And does the indexserver.ini file have to be updated with this information for key store and trust store or any other global.ini file?

    Thanks,

    Rahul

    (0) 
    1. Ling Zhu Post author

      Hi Rahul,

      Sorry for getting back to you late.

      No much difference to use CommonCryptoLib. You can follow the same steps. Hana used the pse file to authenticate the request from BI server, no need to configure trust store and key store.

      (0) 

Leave a Reply