Skip to content

feat(mecak8s): deliver the identity broker's settings and key fallbacks through Helm - #2977

Merged
ChrisJBurns merged 1 commit into
mainfrom
feat/identitybroker-helm
Nov 24, 2026
Merged

ChrisJBurns merged 1 commit into
mainfrom
feat/identitybroker-helm

Conversation

@ChrisJBurns

@ChrisJBurns ChrisJBurns commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Part of #2814. Builds on #2976 (merged).

Summary

The Helm chart now delivers the identity broker's settings from #2813 and fallback keys for the agent issuer and AS-1 signing keys. The operator guide gains key rotation and secret-manager sections.

Changes

  • identityBroker.settings: idJAGMaxLifetime, idJAGLifetime, credentialLifetime, clientAssertionLifetime, clockSkew, as1RequestTimeout, as2RequestTimeout.
    • Each is rendered into the broker's configuration file only when set, because the loader refuses unknown fields, so an older image would refuse the file.
    • The schema checks Go duration syntax. Range checks stay with mecak8s at startup.
  • identityBroker.keys.agentIssuer.fallbacks and identityBroker.keys.as1Signing.fallbacks: lists of Secret keys.
    • They are projected read-only (0440) and rendered as fallback_key_files only when non-empty.
    • AS-1 fallbacks must be private keys, because ToolHive loads them as signing keys. Agent issuer fallbacks may be public keys, which is recommended.
  • Render-time refusals:
    • fallbacks without the key they back;
    • one Secret key used by two roles, now including every fallback and mcp.broker.signingKey;
    • settings with the broker disabled;
    • idJAGMaxLifetime or idJAGLifetime without identityBroker.as1.issuer.
  • Operator guide:
    • every configuration-file field is mapped to its Helm value, and the "the chart does not set these yet" notes are gone;
    • a new "Rotate keys with the chart" section, including how long to keep each fallback and what a restart drops while the broker runs inside mecak8s;
    • a new "Keep keys in a secret manager" section: sync into Kubernetes Secrets with External Secrets Operator or the Secrets Store CSI driver, then restart.

With the broker off, the chart renders exactly as before, as do all ci/*-values.yaml profiles and the Kind identity-broker profile (compared with UUIDs normalised). --reuse-values upgrades keep working.

Not in this PR (still open on #2814)

These wait on #2533, or belong elsewhere:

  • the chart setting that lets AS-2 fetch AS-1's keys over loopback (no such setting exists yet);
  • gateway entries with servers;
  • the company-IdP session caveats for AS-2;
  • the Kind Dex session configuration (Phase 1 end-to-end test against the real ToolHive in kind #2542 owns it);
  • separate Redis credentials for AS-2's storage (a code change).

API compatibility

Assessment: none. These are Helm values and docs only.

Testing

  • helm unittest --strict deploy/helm/mecak8s: 123 pass. A new suite covers each setting, the fallback projection and every refusal.
  • go test ./deploy/helm/mecak8s/ ./deploy/mecak8s-idbroker/: pass. A new test renders all seven settings, both fallback lists (the agent issuer fallback as a public key), the subject claim and a gateway entry, then loads the file with the real brokerconfig.Load and checks the values.
  • golangci-lint on ./deploy/...: 0 issues. task docs:check: pass.

@rdimitrov rdimitrov 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.

LGTM.

Checked:

  • Settings are rendered only when non-empty, so older images still load the file; clockSkew: 0s is a non-empty string and renders.
  • The role-collision check now covers fallbacks on both sides, and repeating a key within one role is allowed. That matches Keys.Validate, which refuses only cross-role reuse, so the chart doesn't refuse what mecak8s accepts.
  • Fallback projections use per-index directories, so two fallbacks with the same key name don't collide.
  • The guide is candid that the agent issuer fallback has no effect while the broker runs inside mecak8s, because the restart drops registrations.

The one red check, the kind shard 2 job, failed fetching from sum.golang.org (stream error ... INTERNAL_ERROR). It's unrelated; a re-run should clear it.

Base automatically changed from feat/identitybroker-settings to main November 24, 2026 16:04
…ks through Helm

The chart renders identityBroker.settings into the broker's configuration
file, each field only when set, and projects fallback keys for the agent
issuer and AS-1 signing keys. The operator guide maps every field to its
Helm value and adds key rotation and secret-manager sections. Part of #2814.

Co-authored-by: Mecatl <[email protected]>
@ChrisJBurns
ChrisJBurns force-pushed the feat/identitybroker-helm branch from 2f5850e to 2236a7a Compare November 24, 2026 16:06
@ChrisJBurns
ChrisJBurns merged commit 11005e2 into main Nov 24, 2026
47 checks passed
@ChrisJBurns
ChrisJBurns deleted the feat/identitybroker-helm branch November 24, 2026 17:04

This branch was successfully deployed

1 active deployment
Preview — 2236a7ab Deployed Nov 24, 2026 by vercel[bot]
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