Skip to content

Add optional nested Active Directory group resolution#18823

Open
wonderfulrosemari wants to merge 1 commit intospring-projects:mainfrom
wonderfulrosemari:gh-2053-ad-nested-groups
Open

Add optional nested Active Directory group resolution#18823
wonderfulrosemari wants to merge 1 commit intospring-projects:mainfrom
wonderfulrosemari:gh-2053-ad-nested-groups

Conversation

@wonderfulrosemari
Copy link
Contributor

Closes gh-2053

Add optional support for resolving nested Active Directory groups when loading
authorities in ActiveDirectoryLdapAuthenticationProvider.

By default, authorities are derived from direct memberOf values. For AD
deployments that use nested groups, this can miss effective group membership.
This change introduces an opt-in nested lookup using AD's
LDAP_MATCHING_RULE_IN_CHAIN search filter.

Changes include:

  • add setSearchNestedGroups(boolean) to
    ActiveDirectoryLdapAuthenticationProvider
  • when enabled, perform an additional LDAP search with:
    (&(objectClass=group)(member:1.2.840.113556.1.4.1941:={0}))
  • merge nested authorities with existing authorities from the configured
    LdapAuthoritiesPopulator
  • add tests for:
    • default behavior (nested lookup disabled)
    • nested lookup enabled (nested group authority included)

Signed-off-by: wonderfulrosemari <whwlsgur1419@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEC-1823: User roles in AD should handle nested groups

2 participants