fix(spec): add discriminator to IdentityProvider.protocol to fix SAML…#1695
Open
manmohan-shaw-okta wants to merge 1 commit into
Open
fix(spec): add discriminator to IdentityProvider.protocol to fix SAML…#1695manmohan-shaw-okta wants to merge 1 commit into
manmohan-shaw-okta wants to merge 1 commit into
Conversation
…/OIDC field dropping (OKTA-1175444) The protocol field in IdentityProvider used a discriminator-less oneOf, causing the OpenAPI generator to produce a flat IdentityProviderProtocol class with wrong field types (OidcAlgorithms, IDVCredentials, IDVEndpoints, OidcSettings). On deserialization, SAML-specific fields (sso.url, trust.issuer, nameFormat, etc.) were silently dropped and OIDC-shaped endpoints were invented, corrupting IdP configurations on write-back. - Add IdentityProviderProtocol as a named base schema with discriminator (propertyName: type, mapping SAML2/OIDC/OAUTH2/MTLS/ID_PROOFING) - Convert ProtocolSaml, ProtocolOidc, ProtocolOAuth, ProtocolMtls, ProtocolIdVerification to extend the base via allOf - Generated code: ProtocolSaml/Oidc/etc. now extend IdentityProviderProtocol with correct protocol-specific field types; Jackson @JsonTypeInfo + @JsonSubTypes on the base class dispatches deserialization by type value - Add IdentityProviderProtocolDeserializerTest (14 tests) covering SAML2 endpoint/credential/settings fields, OIDC pkce_required preservation, round-trip fidelity, and absence of invented OIDC fields on SAML2 output Co-Authored-By: Claude Code
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.
…/OIDC field dropping (OKTA-1175444)
The protocol field in IdentityProvider used a discriminator-less oneOf, causing the OpenAPI generator to produce a flat IdentityProviderProtocol class with wrong field types (OidcAlgorithms, IDVCredentials, IDVEndpoints, OidcSettings). On deserialization, SAML-specific fields (sso.url, trust.issuer, nameFormat, etc.) were silently dropped and OIDC-shaped endpoints were invented, corrupting IdP configurations on write-back.
Co-Authored-By: Claude Code
Issue(s)
Description
Category
Signoff