Red Hat Ansible Automation Platform LDAP authentication error: "django_auth_ldap Authentication failed for XXX: failed to map the username to a DN."

Solution Verified - Updated -

Issue

  • Ansible Automation Platform is configured to authenticate the users from an external LDAP identity store based on Red Hat Identity Management Servers.

  • While trying to login to the Ansible Automation Platform, users unable to login to the WebUI and the following error messages are shown in the logs:


    2023-05-15 07:33:27,475 DEBUG [502e74c260864715a58d5b42d698eeca] awx.analytics.performance request: <WSGIRequest: GET '/api/login/'>, response_time: 0.048s 2023-05-15 07:33:27,594 DEBUG [11c72ef1b60f4ae3ba84c5ee5ee8f98a] django_auth_ldap search_s('CN=users,CN=accounts,DC=linux,DC=example,DC=com', 2, '(cn=%(user)s)') returned 0 objects: 2023-05-15 07:33:27,595 DEBUG [11c72ef1b60f4ae3ba84c5ee5ee8f98a] django_auth_ldap Authentication failed for XXX: failed to map the username to a DN. 2023-05-15 07:33:27,741 WARNING [11c72ef1b60f4ae3ba84c5ee5ee8f98a] awx.api.generics Login failed for user XXX from 10.X.X.X 2023-05-15 07:33:27,871 DEBUG [11c72ef1b60f4ae3ba84c5ee5ee8f98a] awx.analytics.performance request: <WSGIRequest: POST '/api/login/'>, response_time: 0.385s 2023-05-15 07:33:27,872 WARNING [11c72ef1b60f4ae3ba84c5ee5ee8f98a] django.request Unauthorized: /api/login/ 2023-05-15 07:33:29,048 DEBUG [03459476b77a4232acbc49c1b75c7aa6] awx.main.dispatch task 579fb0be-7b95-44eb-800d-1e7cb581da72 starting awx.main.tasks.system.awx_periodic_scheduler(*[])

Environment

  • Red Hat Ansible Automation Platform 2.x.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content