You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AAP-38581 Allow ldap union in user search of ldap authenticator (#706)
## Description
<!-- Mandatory: Provide a clear, concise description of the changes and
their purpose -->
- What is being changed?
The LDAPSearch object now support a single LDAPSearch or a union of
LDAPSearches. This brings the LDAP authenticator inline with the awx
LDAP adapter.
- Why is this change needed?
This was missing functionality after migrating authenticators from AWX
to DAB Authentication.
- How does this change address the issue?
The code will now look at the input from USER_SEARCH and GROUP_SEARCH
and validate them differently. Before it would look for an array of 3
strings (and perform validation on the strings). It will now look for
either this or for an array of these things.
We extended the LDAPSearch object because the UI already knows how to
deal with that kind of field.
NOTE: UnionSearch is only available for the USER_SEARCH field. A error
message will be raised if a user attempts to use it in the GROUP_SEARCH
field. This is consistent with AWX.
## Type of Change
<!-- Mandatory: Check one or more boxes that apply -->
- [X] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Documentation update
- [ ] Test update
- [ ] Refactoring (no functional changes)
- [ ] Development environment change
- [ ] Configuration change
## Self-Review Checklist
<!-- These items help ensure quality - they complement our automated CI
checks -->
- [X] I have performed a self-review of my code
- [X] I have added relevant comments to complex code sections
- [X] I have updated documentation where needed
- [X] I have considered the security impact of these changes
- [X] I have considered performance implications
- [X] I have thought about error handling and edge cases
- [X] I have tested the changes in my local environment
## Testing Instructions
<!-- Optional for test-only changes. Mandatory for all other changes -->
<!-- Must be detailed enough for reviewers to reproduce -->
### Prerequisites
<!-- List any specific setup required -->
### Steps to Test
1. Create an LDAP authenticator and set the USER_SEARCH field to an
array of searches.
2. Log in a user from either branch of the search.
### Expected Results
<!-- Describe what should happen after following the steps -->
## Additional Context
<!-- Optional but helpful information -->
### Required Actions
<!-- Check if changes require work in other areas -->
<!-- Remove section if no external actions needed -->
- [X] Requires documentation updates
<!-- API docs, feature docs, deployment guides -->
- [ ] Requires downstream repository changes
<!-- Specify repos: django-ansible-base, eda-server, etc. -->
- [ ] Requires infrastructure/deployment changes
<!-- CI/CD, installer updates, new services -->
- [ ] Requires coordination with other teams
<!-- UI team, platform services, infrastructure -->
- [ ] Blocked by PR/MR: #XXX
<!-- Reference blocking PRs/MRs with brief context -->
### Screenshots/Logs
<!-- Add if relevant to demonstrate the changes -->
0 commit comments