In my test case i have:
cn=server,o=test,c=tr -> groupOfNames
cn=ts,ou=participants,o=test,c=tr -> user memberOf server group
cn=test_user,ou=group_1,ou=participants,o=test,c=tr -> user not memberOf server group
in my LDAP server.
In advanced.config file, i have following query:
{resource_access_query,
{for, [{permission, configure, {in_group, "cn=server,o=test,c=tr"}},
{permission, write,
{for, [{resource, queue, {in_group, "cn=server,o=test,c=tr"}},
{resource, exchange, {constant, true}}]}},
{permission, read,
{for, [{resource, exchange, {constant, true}},
{resource, queue, {equals, "${name}", "${username}"}}]}}
]
}}
query so i want that only members of server group can configure and write resources, and only user which has same name with queue can read from queue.
Second part works fine but test_user which is not memberOf server group still can configure and write to resources. I tried to write so not existing group instead of "cn=server,o=test,c=tr", then none user can write or configure resources.
Also tried for vhost access but test_user also can access to vhosts.
{vhost_access_query, {in_group, "cn=server,o=test,c=tr"}}
What can be the problem with my approach? Do i understand something wrong about documentation below: