{"id":12887,"date":"2022-05-23T23:32:29","date_gmt":"2022-05-23T20:32:29","guid":{"rendered":"https:\/\/kifarunix.com\/?p=12887"},"modified":"2024-03-09T12:53:44","modified_gmt":"2024-03-09T09:53:44","slug":"integrate-syspass-with-openldap-for-authentication","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/integrate-syspass-with-openldap-for-authentication\/","title":{"rendered":"Integrate sysPass with OpenLDAP for Authentication"},"content":{"rendered":"\n

Follow through this tutorial to learn how to integrate sysPass with OpenLDAP for authentication and account management.<\/p>\n\n\n\n

Install and Setup OpenLDAP server<\/h2>\n\n\n\n

In our previous tutorials, we covered how to install and setup OpenLDAP server. Follow the link below to check them.<\/p>\n\n\n\n

Install and Setup OpenLDAP server<\/a><\/p>\n\n\n\n

Install and Setup sysPass<\/h2>\n\n\n\n

Follow the link below to install and setup sysPass.<\/p>\n\n\n\n

Install and setup sysPass on Linux<\/a><\/p>\n\n\n\n

Integrate sysPass with OpenLDAP for Authentication<\/h2>\n\n\n\n

To begin, ensure sysPass is installed with PHP-LDAP modules.<\/p>\n\n\n\n

php -m | grep ldap<\/code><\/pre>\n\n\n\n

Create OpenLDAP User Group for sysPass<\/h3>\n\n\n\n

Create an group of OpenLDAP that can be used to control access to sysPass. All members of the group to be created will allowed to access\/login to sysPass.<\/p>\n\n\n\n

Follow our guide below to learn how to setup OpenLDAP groups.<\/p>\n\n\n\n

How to Create OpenLDAP Member Groups<\/a><\/p>\n\n\n\n

In our OpenLDAP server, we have created a group called syspass<\/code><\/strong>.<\/p>\n\n\n\n

Some members have been added to this group as evident in the command output below;<\/p>\n\n\n\n

ldapsearch -H ldapi:\/\/\/ -Y EXTERNAL -LLL -Q -b \"dc=ldapmaster,dc=kifarunix-demo,dc=com\" cn=syspass<\/code><\/pre>\n\n\n\n

Sample output;<\/p>\n\n\n\n

dn: cn=syspass,ou=groups,dc=ldapmaster,dc=kifarunix-demo,dc=com\nobjectClass: groupOfNames\ncn: syspass\nmember: uid=johndoe,ou=people,dc=ldapmaster,dc=kifarunix-demo,dc=com\nmember: uid=janedoe,ou=people,dc=ldapmaster,dc=kifarunix-demo,dc=com\nmember: uid=devadmin,ou=people,dc=ldapmaster,dc=kifarunix-demo,dc=com\n<\/code><\/pre>\n\n\n\n

Once you have setup your OpenLDAP user\/groups for sysPass authentication, login to sysPass web user interface as administrator.<\/p>\n\n\n\n

Create OpenLDAP users group.<\/h3>\n\n\n\n

This will be required to specify the default group under which OpenLDAP users belong to on sysPass.<\/p>\n\n\n\n

To create group, click Users and accesses<\/strong> icon > GROUPS > New Group.<\/p>\n\n\n\n

\"Integrate<\/figure><\/a><\/div>\n\n\n\n

Save the group.<\/p>\n\n\n\n

Next, create OpenLDAP Users default Profile<\/p>\n\n\n\n

This is where you define the default permissions to be assigned to a specific user profile. To create a profile, click Users and accesses<\/strong> icon > PROFILE > New Profile.<\/p>\n\n\n\n

Sample account permissioms.<\/p>\n\n\n\n

\"\"<\/figure><\/a><\/div>\n\n\n\n

For the rest of the accesses, we didn’t give any for this particular profile. Feel Free to set the accesses accordingly.<\/p>\n\n\n\n

So we now have a group, ldapuser-gp<\/code><\/strong>, and profile, ldapusers-pf<\/code><\/strong>.<\/p>\n\n\n\n

Note that you should be able to define the specific profile\/groups once the LDAP users are in the sysPass system.<\/p>\n\n\n\n

Next, click the gear icon to access the configuration menu and click LDAP.<\/p>\n\n\n\n

\"Integrate<\/figure><\/a><\/div>\n\n\n\n