Skip to content

fix(spec): relax required boolean constraints on SamlApplicationSettingsSignOn - #580

Merged
BinoyOza-okta merged 2 commits into
masterfrom
OKTA-1213930
Sep 16, 2026
Merged

BinoyOza-okta merged 2 commits into
masterfrom
OKTA-1213930

Conversation

@BinoyOza-okta

Copy link
Copy Markdown
Contributor

Summary

list_applications() raises ValidationError when an org contains App Catalog / OIN SAML applications, making the operation unusable. This relaxes the last five over-strict required constraints on the SamlApplicationSettingsSignOn schema, completing the fix started in 3.4.3.

Root Cause

The create (POST) and read (GET) contracts for settings.signOn are asymmetric:

  • On POST, a custom SAML app genuinely requires ssoAcsUrl, audience, recipient, destination, signatureAlgorithm and digestAlgorithm.
  • On GET, all of those may legitimately be absent. App Catalog / OIN apps serialize as override types whose SSO configuration lives in app template metadata, so instance-level attributes are validly null or missing.

The OAS3 spec marked five booleans required, so the generated Pydantic model declared them as non-nullable StrictBool. Valid API responses omitting them failed validation — and because the response is paginated, one such application poisoned an entire page.

Changes

File Change
openapi/api.yaml Removed the 5-entry required block from SamlApplicationSettingsSignOn
okta/models/saml_application_settings_sign_on.py Regenerated — 5 fields become Optional[StrictBool] = Field(default=None, ...)
docs/SamlApplicationSettingsSignOn.md Regenerated — 5 rows flip to [optional]

Attributes relaxed: allowMultipleAcsEndpoints, assertionSigned, honorForceAuthn, requestCompressed, responseSigned.

Why This Is Safe

  • These attributes are required today, so every application that deserializes successfully now has a real boolean present in the payload. Making them optional does not change parsing when a value is present.
  • None can therefore only surface where the SDK currently raises ValidationError. No existing working code path changes behaviour — the change converts a hard failure into a readable value.
  • Consistent with the ten string attributes on this same schema, already relaxed in 3.4.3 (4c5e79db).

Caller impact: code reading these attributes on catalog / override apps will now receive None instead of an exception, and should handle it. Previously that code could not run at all.

Verification

Confirmed no other schema on the SAML deserialization path carries a stale required constraint:

  • SamlApplication, SamlApplicationSettings, SamlAssertionEncryption, SingleLogout, SloParticipate, SamlSpCertificate, SamlAttributeStatement, SignOnInlineHook — none declare required.
  • AcsEndpoint requires url and index, which is correct: those entries only exist when allowMultipleAcsEndpoints is true, and the API validator guarantees both.

These five booleans were the last remaining constraint, so this completes the read-side fix rather than partially addressing it.

Notes

The customer's entry point, okta-mcp-server, is still pinned to okta-sdk-python 3.4.1 and needs upgrading once this release ships for the reported issue to be resolved end to end.

Related

…ngsSignOn

Remove the five boolean attributes from the `required` list of the `SamlApplicationSettingsSignOn` schema in the OpenAPI spec, so the generate as `Optional[StrictBool]` with a `None` default:

- allowMultipleAcsEndpoints
- assertionSigned
- honorForceAuthn
- requestCompressed
- responseSigned

Root cause: the create (POST) and read (GET) contracts for `settings.signOn` are asymmetric. App Catalog / OIN SAML apps are serialized on GET as override types that carry only override deltas (e.g. `destinationOverride`), so these attributes are legitimately absent from valid API responses. Because the spec marked them `required`, the generated Pydantic model declared them as non-nullable `StrictBool` and raised `ValidationError` on those payloads. As `list_applications()` is paginated, a single such app failed deserialization for the entire response page.

A flat OAS 3.0 schema cannot express the inter-attribute dependencies the API validators enforce, and an OpenAPI 3.1 migration is not planned. Relaxing the read side is the agreed resolution: a too-strict `required` list crashes reads unrecoverably, whereas a relaxed one only under-documents writes, which the API already backstops with specific validation errors.

This completes the pattern applied to ten string attributes on the same schema in 3.4.3 (commit 4c5e79d); these five booleans were the remainder. No `default` value is introduced, so the SDK does not fabricate `false` for an attribute the API never returned - relevant because these are Java primitives on the backend that overwrite stored values on update.

No okta-core behaviour change is required; this is a spec-accuracy fix.

Refs: okta/okta-mcp-server#48, #546

@dhiwakar-okta dhiwakar-okta left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM 🚀

@BinoyOza-okta
BinoyOza-okta merged commit bd956ce into master Sep 16, 2026
15 checks passed
@BinoyOza-okta
BinoyOza-okta deleted the OKTA-1213930 branch September 16, 2026 12:43
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.

2 participants