Skip to content

Validate configured LDAP UID attributes before transforming maps - #295

Open
vinsymoyya wants to merge 1 commit into
google:mainfrom
vinsymoyya:fix/ldap-custom-uid-validation
Open

vinsymoyya wants to merge 1 commit into
google:mainfrom
vinsymoyya:fix/ldap-custom-uid-validation

Conversation

@vinsymoyya

Copy link
Copy Markdown
Contributor

Validate the configured ldap_uidattr instead of always requiring a literal uid. Passwd, shadow, and SSH-key transformations already read the selected attribute, but GetUpdates rejected valid custom-schema entries before transformation because essential_fields still contained uid.

Fixes #294.

Use the configured UID attribute in required-field lists while retaining uid as the default and leaving the AD-specific required fields unchanged. Dedicated public-path regressions cover all three map types, missing configured fields, and the default-UID control.

Validation:

  • The final regressions fail four tests and pass one control against an isolated copy of current main (d8004db9da172245cf678359d5460ce0eda5ce97).
  • 116 affected Linux / Python 3.11 tests pass with real python-ldap installed, including the existing/new LDAP suites, maps, file formats, and files-cache tests.
  • Black 22.12.0 and git diff --check pass. Six warnings come from the existing deprecated logging.warn path exercised by missing-field controls.
  • 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 uidattr override is ignored by required-field validation

1 participant