Skip to content

Persist SAML entityID for the default identity zone during bootstrap - #4031

Merged
duanemay merged 2 commits into
developfrom
fix/default-zone-saml-entity-id
Aug 13, 2026
Merged

Persist SAML entityID for the default identity zone during bootstrap#4031
duanemay merged 2 commits into
developfrom
fix/default-zone-saml-entity-id

Conversation

@duanemay

Copy link
Copy Markdown
Member

Summary

  • GET /identity-zones/uaa omits the SAML entityID because the bootstrap flow for the default zone never persists login.entityID into SamlConfig, even though a separate runtime bean reads it for SAML metadata generation.
  • Binds login.entityID into IdentityZoneConfigurationBootstrap (mirroring how issuer is already handled) and persists it on the zone's SamlConfig when present.
  • First commit adds a regression test demonstrating the gap (verified it fails in isolation before the fix); second commit is the fix plus supporting unit tests.

Test plan

  • IdentityZoneConfigurationBootstrapTests (new samlEntityIdConfiguration* tests + full suite) pass
  • IdentityZoneEndpointsMockMvcTests full suite passes, including the new defaultZoneSamlConfig_isPopulatedFromBootstrapYaml and createZoneWithSamlConfig_entityIdAndSigningFlagsArePersisted
  • provider.saml.* server tests pass (confirms no change to actual SAML runtime behavior, since the two runtime consumers of SamlConfig.getEntityID() already bypass the default zone)
  • IdentityZoneEndpointDocs REST-docs tests pass

🤖 Generated with Claude Code

GET /identity-zones/uaa omits the SAML entityID because the bootstrap
flow that configures the default zone never persists login.entityID
into SamlConfig, even though it is read into a separate runtime bean.
This test captures the gap; it currently fails.
login.entityID was only ever read into a standalone runtime bean used
for SAML metadata generation; it was never written to the default
zone's SamlConfig, so GET /identity-zones/uaa omitted entityID even
though it was configured. Bind login.entityID into
IdentityZoneConfigurationBootstrap the same way issuer is handled, and
persist it on the zone's SamlConfig when present.
Copilot AI lite review requested due to automatic review settings August 13, 2026 14:45

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

This PR ensures the default (uaa) identity zone persists the configured SAML SP entityID during bootstrap so it’s visible via zone retrieval APIs (e.g., GET /identity-zones/uaa) and consistent with how SAML metadata generation already reads login.entityID at runtime.

Changes:

  • Adds MockMvc coverage verifying SAML entityID and signing flags are persisted for created zones and populated for the default zone from bootstrap YAML.
  • Extends IdentityZoneConfigurationBootstrap wiring to accept login.entityID and persist it into the default zone’s SamlConfig when set.
  • Adds bootstrap unit tests for login.entityID handling (set / null / empty).

Reviewed changes

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

File Description
uaa/src/test/java/org/cloudfoundry/identity/uaa/mock/zones/IdentityZoneEndpointsMockMvcTests.java Adds endpoint-level regression tests covering SAML entityID + signing flags persistence and default-zone bootstrap population.
server/src/test/java/org/cloudfoundry/identity/uaa/config/IdentityZoneConfigurationBootstrapTests.java Adds unit tests validating bootstrap behavior for SAML entityID (present vs null/empty).
server/src/main/java/org/cloudfoundry/identity/uaa/SpringServletXmlBeansConfiguration.java Wires login.entityID into the bootstrap bean alongside existing login SAML properties.
server/src/main/java/org/cloudfoundry/identity/uaa/impl/config/IdentityZoneConfigurationBootstrap.java Persists login.entityID into the default zone SamlConfig when non-blank.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-project-automation github-project-automation Bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Aug 13, 2026
@duanemay
duanemay merged commit 59d13a2 into develop Aug 13, 2026
34 of 36 checks passed
@github-project-automation github-project-automation Bot moved this from Pending Merge | Prioritized to Done in Foundational Infrastructure Working Group Aug 13, 2026
@duanemay
duanemay deleted the fix/default-zone-saml-entity-id branch August 13, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants