Propagate externalGroupsWhitelist for bootstrapped OAuth/OIDC identity providers - #4005
Merged
duanemay merged 1 commit intoJul 28, 2026
Merged
Conversation
OauthIDPWrapperFactoryBean never read externalGroupsWhitelist from the YAML-configured IdP definition map, so any OAuth/OIDC identity provider bootstrapped via config always ended up with an empty whitelist, silently dropping external group claims regardless of what was configured. LDAP and SAML bootstrap paths already wire this property through; OAuth/OIDC was missing it.
duanemay
marked this pull request as ready for review
July 27, 2026 22:33
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes bootstrapping of OAuth/OIDC identity providers from YAML so that externalGroupsWhitelist is propagated into the provider definition (matching existing LDAP/SAML bootstrap behavior). This restores expected inclusion/filtering of external group claims when configured.
Changes:
- Read
externalGroupsWhitelistfrom the OAuth/OIDC IdP definition map and apply it to the provider definition during bootstrap. - Add unit tests verifying default behavior (empty whitelist) and configured behavior (e.g.,
["*"]).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
server/src/main/java/org/cloudfoundry/identity/uaa/provider/oauth/OauthIDPWrapperFactoryBean.java |
Propagates externalGroupsWhitelist from the YAML config map into the OAuth/OIDC IdP definition. |
server/src/test/java/org/cloudfoundry/identity/uaa/provider/oauth/OauthIdentityProviderDefinitionFactoryBeanTest.java |
Adds coverage ensuring the whitelist defaults to empty and is correctly mapped when configured. |
strehle
approved these changes
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OauthIDPWrapperFactoryBeanbootstraps OAuth/OIDC identity providers from YAML config, but never readexternalGroupsWhitelistfrom that config map — every bootstrapped OAuth/OIDC IdP silently got an empty whitelist regardless of what was configured, so external group claims were never included in the resulting token.LdapUtils) and SAML (BootstrapSamlIdentityProviderData) bootstrap paths already wire this property through from their respective config maps; only the OAuth/OIDC path was missing it.externalGroupsWhitelistfrom the IdP definition map insetCommonPropertiesand apply it viasetExternalGroupsWhitelist, matching the existing LDAP/SAML behavior.Test plan
external_groups_whitelist_default_is_empty— confirms unset config still defaults to an empty whitelist.external_groups_whitelist_in_body— confirms a configured whitelist (e.g.["*"]) now flows through to the provider definition.OauthIdentityProviderDefinitionFactoryBeanTestlocally — all 28 tests pass.