Release candidate
...
Administration
LDAP settings

LDAPS setup

12min

LDAPS Configuration

When using LDAPS, you must specify the "ldaps://" protocol at the beginning of the hostname and use port "636", for example: ldaps://passwork.local:636

To enable LDAPS functionality, the Passwork server must trust the CA certificates that issued the LDAPS server’s certificate.



Installing certificates

Certificates must be in the .crt format

Ubuntu/Debian

Create the directory /usr/local/share/ca-certificates/ if it does not exist:

Shell


Place the LDAPS server certificate in the following directory:

Shell


Update the trust store:

Shell


CentOS

Allow dynamic configuration of the trust store:

Shell


Place the LDAPS server certificate in the /etc/pki/ca-trust/source/anchors/ directory:

Shell


Update the trust store:

Shell


Docker

To make a root LDAPS certificate a trusted one, you need to copy a .pem or .crt certificate in to ./conf/custom_ca and restart the PHP container:

Shell


Windows

PHP for Windows uses its own certificate store. As such, if Passwork is installed on a Windows Server, the PHP module responsible for LDAP will not accept the LDAP server certificate, even if it has been added to the Windows trusted certificate store.

For PHP to accept the certificate, you need to:

  1. Create an openldap folder in your system root directory
  2. Create a sysconf folder in the openldap folder
  3. Create a ldap.conf file in the sysconf folder with the following lines:
Windows


Where TLS_CACERT is the path to your certificate.

Please note:

  • A certificate with the .cer extension must include both the root and all intermediate certificates to connect correctly to the LDAPS server;
  • The certificate must be in base64 format. If you open the certificate file with Notepad, you will see the certificate hash.


LDAPS debugging

To test for possible certificate issues during connection, execute the following command:

Shell


To verify the certificates, execute the following command:

Shell

  • Use the -CAfile directive to specify the certificate of the CA that issued the LDPAS server certificate
  • Use the -untrusted directive to specify the LDAPS server certificate and the certificates of intermediate servers in the chain (if you have them)