Skip to content

Apply LDAP group regex to individual memberUid values - #291

Open
vinsymoyya wants to merge 1 commit into
google:mainfrom
vinsymoyya:fix/ldap-groupregex-members
Open

vinsymoyya wants to merge 1 commit into
google:mainfrom
vinsymoyya:fix/ldap-groupregex-members

Conversation

@vinsymoyya

Copy link
Copy Markdown
Contributor

Fix RFC2307 group updates when ldap_groupregex is configured. The transformation passed the whole memberUid list to regex.findall, raising TypeError even for an empty group. Apply the regex to each value and extend the result with complete normalized member names.

Fixes #290.

Dedicated regressions cover populated and empty member lists, preservation of group identity and input values, and the existing no-regex/RFC2307bis paths. Both affected cases fail against current main (d8004db9da172245cf678359d5460ce0eda5ce97); the controls pass.

Validation:

  • 115 Linux / Python 3.11 tests pass with real python-ldap installed: the existing and new LDAP tests, maps, file formats, and files-cache suites.
  • Black 22.12.0 (the hosted formatter's major version) and git diff --check pass.
  • No live LDAP server integration was run locally. Hosted CI is separate from these local results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LDAP groupregex crashes on RFC2307 memberUid lists

1 participant