RabbitMQ LDAP Authentication with Active Directory Fails in Kubernetes Due to Missing DN Lookup Configuration
search cancel

RabbitMQ LDAP Authentication with Active Directory Fails in Kubernetes Due to Missing DN Lookup Configuration

book

Article ID: 432715

calendar_today

Updated On:

Products

RabbitMQ

Issue/Introduction

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.

Environment

RabbitMQ on Kubernetes

Cause

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.

Resolution

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.