ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.06k stars 3.42k forks source link

Error LDAP Organization Map admins filter #14846

Open Workasis opened 9 months ago

Workasis commented 9 months ago

Please confirm the following

Bug Summary

I have tried using the LDAP Organization Map to set a group child-group members as admin but i have the error below.

Invalid DN: memberof:1.2.840.113556.1.4.1941:=cn=engineering_admins,ou=groups,dc=example,dc=com

So LDAP Organization Map doesn't work when I use a more complex filter to search nested groups

My LDAP Organization Map configuration:

{
  "engineering": {
    "users": true,
    "admins": "memberof:1.2.840.113556.1.4.1941:=cn=engineering_admins,ou=groups,dc=example,dc=com",
    "remove_users": true,
    "remove_admins": true
  }
}

AWX version

22.4.0

Select the relevant components

Installation method

kubernetes

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

Settings > LDAP settings > LDAP Organization Map

{
  "engineering": {
    "users": true,
    "admins": "memberof:1.2.840.113556.1.4.1941:=cn=engineering_admins,ou=groups,dc=example,dc=com",
    "remove_users": true,
    "remove_admins": true
  }
}

Expected results

Memebers and sub members of the group cn=engineering_admins,ou=groups,dc=example,dc=com should be admin of the organization

Actual results

Invalid DN: memberof:1.2.840.113556.1.4.1941:=cn=engineering_admins,ou=groups,dc=example,dc=com

Additional information

No response

fosterseth commented 9 months ago

this error coming back from your LDAP server.

:1.2.840.113556.1.4.1941: does this part look right?

Workasis commented 9 months ago

The filter works when i tested it with ldapsearch. The error I mentioned is not from my LDAP server but it's coming from AWX. I'm unable to save the configuration on AWX after adding the filter line.