1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grocy_ynh.git synced 2024-09-03 19:25:54 +02:00

Enable LDAP (#72)

* Allow for LDAP authentication

* Change filter

---------

Co-authored-by: ericgaspar <junk.eg@free.fr>
This commit is contained in:
spaced 2024-06-24 01:50:33 -07:00 committed by GitHub
parent 7775de0dee
commit e1f1103d44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -81,7 +81,7 @@ Setting('DISABLE_AUTH', false);
// Either "Grocy\Middleware\DefaultAuthMiddleware", "Grocy\Middleware\ReverseProxyAuthMiddleware"
// or any class that implements Grocy\Middleware\AuthMiddleware
Setting('AUTH_CLASS', 'Grocy\Middleware\DefaultAuthMiddleware');
Setting('AUTH_CLASS', 'Grocy\Middleware\LdapAuthMiddleware');
// Options when using ReverseProxyAuthMiddleware
Setting('REVERSE_PROXY_AUTH_HEADER', 'REMOTE_USER'); // The name of the HTTP header which your reverse proxy uses to pass the username (on successful authentication)
@ -92,8 +92,8 @@ Setting('LDAP_ADDRESS', 'ldap://127.0.0.1:389'); // Example value "ldap://vm-dc2
Setting('LDAP_BASE_DN', 'ou=users,dc=yunohost,dc=org'); // Example value "DC=local,DC=berrnd,DC=net"
Setting('LDAP_BIND_DN', ''); // Example value "CN=grocy_bind_account,OU=service_accounts,DC=local,DC=berrnd,DC=net"
Setting('LDAP_BIND_PW', ''); // Password for the above account
Setting('LDAP_USER_FILTER', ''); // Example value "(OU=grocy_users)"
Setting('LDAP_UID_ATTR', ''); // Windows AD: "sAMAccountName", OpenLDAP: "uid", GLAuth: "cn"
Setting('LDAP_USER_FILTER', '(&(|(objectclass=posixAccount))(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))'); // Example value "(OU=grocy_users)"
Setting('LDAP_UID_ATTR', 'uid'); // Windows AD: "sAMAccountName", OpenLDAP: "uid", GLAuth: "cn"
// Default permissions for new users
// the array needs to contain the technical/constant names