2975780 - FAQ SAP HANA LDAP Based Authentication and Authorization
2975780 - FAQ SAP HANA LDAP Based Authentication and Authorization
Symptom
You are interested in details related to Lightweight Directory Access Protocol (LDAP) based authentication for SAP HANA.
1. What is LDAP?
3. Where do I find information about LDAP Based Authentication and Authorization for SAP HANA?
5. How can I encrypt the connection between the LDAP directory server and the SAP HANA database?
7. How does the LDAP log on procedure to SAP HANA database works?
12. What are the typical issues in an SAP HANA LDAP environment?
Other Terms
LDAP, LDAPS, HANA
Solution
1. What is LDAP?
The Lightweight Directory Access Protocol (LDAP) is an application protocol for accessing directory services. In
combination with the SAP HANA database, you can use two LDAP scenarios:
Single Sign On: LDAP-based user authentication to access the SAP HANA database
Authorization: LDAP groups can be mapped to SAP HANA roles
3. Where do I find information about LDAP Based Authentication and Authorization for SAP HANA?
Find comprehensive information on
SAP HANA Security Guide for SAP HANA Platform
> LDAP User Authentication
> LDAP Group Authorization
> Communication Configuration Properties for LDAP
SAP HANA Administration Guide for SAP HANA Platform
> Configure an LDAP Server Connection for LDAP User Authentication
> Secure Communication Between SAP HANA and an LDAP Directory Server
See also blog LDAP Based Authentication for SAP HANA 2.0
5. How can I encrypt the connection between the LDAP directory server and the SAP HANA database?
LDAP is an unencrypted communication between the LDAP directory server and the SAP HANA database and uses port
686. It can be configured as "Start TLS" using SSL/TLS.
LDAPS is the encrypted version of LDAP using port 636.
See SAP HANA Security Guide for SAP HANA Platform > Secure Communication Between SAP HANA and an LDAP
Directory Serverand blog: LDAP Based Authentication for SAP HANA 2.0.
Microsoft started introducing LDAPS as the default connection type, for details see 2020 LDAP channel binding and
LDAP signing requirements for Windows
7. How does the LDAP logon procedure to SAP HANA database work?
The client provides the LDAP log on credentials (user name and password) to the SAP HANA database. The SAP HANA
database passes these to the LDAP directory server for authentication.
Note: The LDAP user does not have a password maintained in the SAP HANA database.
For details refer to chapter LDAP Authentication with Automatic User Creation on SAP HANA Security Guide for SAP
HANA Platform > LDAP User Authentication
1) Log on to the HANA database and increase the trace level be executing command:
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('trace', 'ldap') = 'debug' WITH
RECONFIGURE;
2) Reproduce the issue and note down the timestamp and the name of the user you used to reproduce the issue
3) Reset the trace level:
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') UNSET ('trace', 'ldap') WITH
RECONFIGURE;
4) Find the trace records in the indexserver trace files for tenant databases and in the nameserver trace file for system
databases.
5) Create a full system info dump of the HANA system DB and each affected tenant DB.
When recording and interpreting traces, please consider:
LDAP trace records on SAP HANA database side always show [OpenLDAP], as HANA internally uses
the OpenLDAPlibraries, e.g.:
LDAP filter.c(00365) : [OpenLDAP]
d
There is no need to collect SAP HANA Client traces, even if he connection is established using the SAP HANA
Client (JDBC, SQLDBC, etc.)
12. What are the typical issues in an SAP HANA LDAP environment?
To troubleshoot LDAP issues on HANA side, always collect traces as described in point 9 of this note
The HANA database (DB) c The HANA DB keeps connecting to th The LDAP DS is temporarily not reachable from the HANA sy
annot connect to the LDAP e LDAP DS to verify the user's authent stem due to:
directory server (DS) ication and authorization. Wrong configuration of the LDAP DS connection param
If the connection attempt fails, the foll eters on HANA side
owing error message is issued in the H Network routing or bandwidth issue between the HANA
ANA indexserver trace file: system and the LDAP DS
e LDAP Session.cpp(00398) : LDAP s You can influence the waiting time of the HANA DB for the L
earch failed, error code: -1 error string DAP DS to reply by a parameter described at Communication
: Can't contact LDAP server Configuration Properties for LDAP
lobal.ini
g
[ldap]
timeout = <timeout in seconds> (default=0 - which mea
ns no timeout)
Software Components
Software Component From To
2812540 HAN-DB-SEC How-To: Enable LDAP Tracing for LDAP Group Authentication Errors - SAP HANA
3017378 HAN-DB-SEC [CVE-2021-21484] Possible authentication bypass in SAP HANA LDAP scenarios
2929927 HAN-DB-ENG When Jobworkers Are Occupied to Make LDAP Connection But Fail,Then Other Operations May
Not Function Properly
2645916 HAN-DB-SEC User cannot connect to SAP HANA 2.0 SPS 03 in SAP HANA studio using LDAP user password
3244349 HAN-DB XSA can not start up since : Error while resolving username <sid>crypt rc=111: Connection
refusedException System error: $msg$, rc=13: Permission denied