Skip to content

feat(server): wire OpenID Federation self-issuance into server.Config - #258

Merged
osanderson merged 1 commit into
mainfrom
server-federation-self-issuance
Sep 10, 2026
Merged

feat(server): wire OpenID Federation self-issuance into server.Config#258
osanderson merged 1 commit into
mainfrom
server-federation-self-issuance

Conversation

@osanderson

Copy link
Copy Markdown
Collaborator

Summary

  • Mirrors client's own federation.SelfIssuer glue (feat(client): wire OpenID Federation self-issuance into client.Config #257): adds server.Config.Federation (optional — zero value disables it entirely, matching this package's existing "zero disables the feature" precedent) and server.Server.EntityConfiguration.
  • Resolves this server's own federation signing key from Dependencies.Keys under the keys.FederationEntitySigning purpose added in feat(client): wire OpenID Federation self-issuance into client.Config #257, builds its JWKS via keys.PublicJWKS, and signs whatever metadata the caller supplies — typically a federation_entity object plus an openid_provider object mirroring this server's own Metadata. It does not derive that metadata from Config itself.

Test plan

  • go build ./...
  • go test -race ./...
  • golangci-lint run ./... — 0 issues
  • New tests: Config.Federation validation (invalid entity ID, zero lifetime, zero algorithm; zero-value Federation leaves EntityConfiguration failing), a full round trip (sign → parse → verify against the statement's own claimed jwks → check authority_hints/metadata pass through), and two dependency-failure paths (key manager failure, key manager returning an empty kid).
  • server package coverage: 87.2%

🤖 Generated with Claude Code

https://claude.ai/code/session_017N2kkxv9BR4Qmj8De3Ucs6

Mirrors client's own federation.SelfIssuer glue (previous PR): adds
server.Config.Federation (optional, "zero disables the feature" like
every other opt-in capability here) and server.Server.EntityConfiguration,
resolving this server's own federation signing key from Dependencies.Keys
under the keys.FederationEntitySigning purpose added in that PR, building
its JWKS, and signing whatever metadata the caller supplies (typically a
federation_entity object plus an openid_provider object mirroring this
server's own Metadata).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017N2kkxv9BR4Qmj8De3Ucs6
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/federation.go 84.00% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@osanderson
osanderson merged commit 514b52e into main Sep 10, 2026
9 checks passed
@osanderson
osanderson deleted the server-federation-self-issuance branch September 10, 2026 16:12
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.

1 participant