Skip to content

Fix additionalConfiguration not mapped during YAML IdP bootstrap#3985

Open
duanemay wants to merge 1 commit into
developfrom
fix/oauth-yaml-bootstrap-additional-configuration
Open

Fix additionalConfiguration not mapped during YAML IdP bootstrap#3985
duanemay wants to merge 1 commit into
developfrom
fix/oauth-yaml-bootstrap-additional-configuration

Conversation

@duanemay

Copy link
Copy Markdown
Member

Summary

  • OauthIDPWrapperFactoryBean#setCommonProperties() maps nearly every field from a YAML-defined OAuth/OIDC identity provider onto the provider definition object (attributeMappings, scopes, issuer, etc.), but silently skipped additionalConfiguration.
  • Any OAuth/OIDC identity provider bootstrapped from YAML therefore always ends up with additionalConfiguration == null, regardless of what the manifest sets. Providers created/updated via the REST API are unaffected, since Jackson deserializes the field correctly there.
  • Added the missing one-line mapping, following the exact pattern used for the other fields in this method.

Test plan

  • Added additionalConfigurationIsMapped — verifies a YAML map containing additionalConfiguration is reflected on the definition object after setCommonProperties.
  • Added additionalConfigurationIsNullWhenNotProvided — verifies null passthrough when the key is absent.
  • Ran OauthIdentityProviderDefinitionFactoryBeanTest locally — all 26 tests pass.

🤖 Generated with Claude Code

OauthIDPWrapperFactoryBean#setCommonProperties() maps nearly every
field from a YAML-defined OAuth/OIDC identity provider onto the
provider definition, but silently skipped additionalConfiguration.
As a result, any provider bootstrapped from YAML always ends up with
additionalConfiguration == null, even when the manifest sets it,
while providers created/updated via the REST API are unaffected
since Jackson deserializes the field correctly there.

Add the missing mapping, following the same pattern used for the
other fields in this method, and add test coverage for both the
mapped and not-provided cases.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 17, 2026 20:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a YAML-bootstrap gap in the OAuth/OIDC identity provider factory so that additionalConfiguration from uaa.yml is propagated onto the resulting AbstractExternalOAuthIdentityProviderDefinition (matching REST/Jackson behavior).

Changes:

  • Map additionalConfiguration in OauthIDPWrapperFactoryBean#setCommonProperties(...).
  • Add unit tests verifying mapping when present and null passthrough when absent.

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 Adds the missing additionalConfiguration mapping during YAML IdP bootstrap.
server/src/test/java/org/cloudfoundry/identity/uaa/provider/oauth/OauthIdentityProviderDefinitionFactoryBeanTest.java Adds coverage ensuring the new mapping is applied and remains null when not provided.

@selzoc selzoc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@github-project-automation github-project-automation Bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Jul 18, 2026
@strehle
strehle requested a review from Copilot July 18, 2026 09:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

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

Labels

None yet

Projects

Status: Pending Merge | Prioritized

Development

Successfully merging this pull request may close these issues.

4 participants