While configuring RabbitMQ LDAP authentication in a Kubernetes environment using the RabbitMQ Cluster Operator, integration with Active Directory fails.
Although the LDAP server connection is successful, users are unable to authenticate to RabbitMQ using their Active Directory credentials when accessing the RabbitMQ management UI or other services.
RabbitMQ on Kubernetes
The issue occurs because RabbitMQ running in Kubernetes requires proper DN lookup configuration when using LDAP authentication with Active Directory.
If DN lookup parameters are not configured, RabbitMQ cannot resolve the user’s Distinguished Name (DN) from the username during authentication.
Add the DN lookup configuration in the RabbitMQ advancedConfig section of the Kubernetes RabbitMQ resource.
spec:
rabbitmq:
additionalPlugins:
- rabbitmq_auth_backend_ldap
advancedConfig: |
[
{rabbitmq_auth_backend_ldap, [
{dn_lookup_attribute, "sAMAccountName"},
{dn_lookup_base, "DC=xxxx,DC=xx,DC=xxx"},
{dn_lookup_bind, {"CN=xxvxxxx xxxx,OU=xxx Users,OU=xxxx,OU=xxxx xxxx,DC=xxxx,DC=xx,DC=xxx","xxxxxxx"}}
]}
].After applying the updated configuration to the RabbitMQ custom resource and restarting the RabbitMQ pods in Kubernetes, LDAP authentication with Active Directory should work successfully.