Log in with LDAP
Connect the server to OpenLDAP or a different LDAP directory. Users then log in with their directory password.
Before you start
- An LDAP directory with the users and the groups.
- A service account that can read the users and the groups.
- Two groups, for example
shellgraph-adminsandshellgraph-viewers. To know what each role can do, see Roles.
Configure the server
Set the variables of the server. Use TLS (
ldaps://or StartTLS) in production. Without TLS, the passwords go through the network as clear text.SHELLGRAPH_ADMIN_GROUP=shellgraph-admins SHELLGRAPH_VIEWER_GROUP=shellgraph-viewers SHELLGRAPH_LDAP_URL=ldaps://ldap.example.net SHELLGRAPH_LDAP_BIND_DN=cn=shellgraph,ou=services,dc=example,dc=net SHELLGRAPH_LDAP_BIND_PASSWORD=<password> SHELLGRAPH_LDAP_USER_BASE=ou=people,dc=example,dc=net SHELLGRAPH_LDAP_GROUP_BASE=ou=groups,dc=example,dc=netIf your users or groups use other object classes, set
SHELLGRAPH_LDAP_USER_FILTERandSHELLGRAPH_LDAP_GROUP_FILTER. See Environment variables.Restart the server.
Let the service account read the directory
With OpenLDAP, add an ACL like this one:
access to *
by dn.exact="cn=shellgraph,ou=services,dc=example,dc=net" read
by self read
by * none
Test the login
- Open the server UI.
- Type the login and the password of a user in one of the two groups.
- Select Log in.
If the login fails, see Login messages. To know what the server does during the login, see Authentication and roles.