I need to add multiple DN (Distinguished Name) patterns to allow users from multiple OUs to login .
Kindly suggest .
I have added the below configuration to 'advanced.config' file ::
[
{rabbit, [
{auth_backends, [rabbit_auth_backend_ldap]}
]},
{rabbitmq_auth_backend_ldap, [
{servers, ["---.---.---.---"]},
{dn_lookup_attribute, "distinguishedName"},
{dn_lookup_base,"OU=--,DC=--,DC=--,DC=com"},
{
user_dn_pattern,{'or',
[
{"CN=${username},OU=<OU_1>,OU=Standard,OU=Users,DC=net,DC=<org>,DC=com"},
{"CN=${username},OU=<OU_2>,OU=Standard,OU=Users,DC=net,DC=<org>,DC=com"}
]
}
},
{port, 636},
{log, network},
{tag_queries, [
{administrator, {in_group,"CN=<Group Name>,OU=Security,OU=Groups,DC=net,DC=<org>,DC=com"}},
{management, {in_group,"CN=<Group Name>,OU=Security,OU=Groups,DC=net,DC=<org>,DC=com","member"}}
]},
{vhost_access_query, {constant, true}}
]}
].
With the reference to https://www.rabbitmq.com/ldap.html , 'Boolean Queries' I have added 'or' in user_dn_pattern .
Can you please share suggestions for this ? How we can add 2 user_dn_patterns for this ?
- Tried to combine 2 DN patterns using Boolean based queries in LDAP for RabbitMQ .
However, it is not working .