Sunday, April 11, 2021

LDAP Auth on Synology - or anything alike

Just a quick reminder for my self, which may be useful to you since you are here.

I was having a look at the Synology LDAP server app today, and just created a sample service as follows:



You can test it with the ldapsearch CLI tool:


where you are basically connecting to -H <host> using the base -b <BaseDN> and the bind -D <bindDN>, setting auth to simple auth with -x and prompting for bind password with -W. The output is print in LDIF format without comments (-LLL).

It is always a good idea to use an encrypted connection (i.e. ldaps over ldap), which can be set from the LDAP server connection settings:


The first in the list prevents anonymous connections while the second enforces encrypted connections.

Sorry for the Italian.

In this case any connection trial using ldapsearch will have to use ldaps://datamill as target host, or else the following error will be returned:


Let's now try to set LDAP for a Gitlab instance running as Docker container.

You can edit the file gitlab.rb in the config folder (I have it as shared folder on a RAIDx pool).




Cool, let's restart the Gitlab docker to see if this had any effect:


Nice, we got our devops tool integrated with our LDAP server. Done!




No comments:

Post a Comment