nginx-auth-ldap
nginx-auth-ldap copied to clipboard
Require a combination of groups
Hey there,
I was wondering if it is possible to authorize based on a combination of 2 groups. Right now it seems to be satisfied when the user is part of one of the groups, I only want to grant them access when they are part of both.
ldap_server test {
satisfy all;
url ldap://127.0.0.1:389/OU=accounts,OU=customers,DC=domain,DC=test?cn?sub?(objectClass=inetOrgPerson);
binddn "cn=admin,dc=domain,dc=test";
binddn_passwd superSecret;
group_attribute uniqueMember;
group_attribute_is_dn on;
require valid_user;
require group 'cn=group1,ou=groups,ou=customers,dc=domain,dc=test';
require group 'cn=group2,ou=groups,ou=customers,dc=domain,dc=test';
}
Is something like that possible out of the box?
Maybe you can try to add another ldap_server "test1", and add "auth_ldap servers test1" to load this server