feat(proto): report the tenant's agent-identity issuer in WhoAmI - #2208
Conversation
Adds WhoAmIResponse.identity_issuer, the base URL of the tenant's agent-identity OIDC issuer (`https://<tenant-id>.auth.defang.io`). Agents register public keys against a per-tenant registry and sign their own JWTs to federate into clouds. The CLI needs that URL, and deriving it client-side would freeze the URL shape into every released binary — the tenant label Fabric reports is not the identifier the registry resolves. Reporting it keeps the shape a server-side decision. Empty when the deployment serves no issuer. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3WmpdY3zc555sNdkY9dzQ
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesIdentity issuer response field
Estimated code review effort: 1 (Trivial) | ~2 minutes Mergeability Score: ⚪ Minimal · up to This localized change adds the tenant identity-issuer field to WhoAmI without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
Part of the agent-identity work (#2166): every Defang tenant gets an OIDC issuer and JWKS, so an agent can hold its own keypair, register the public half, and federate into AWS / Azure / GCP with self-signed JWTs instead of long-lived cloud credentials.
The CLI has to know its tenant's issuer URL to register keys. The draft in #2167 builds it client-side as
<tenant>.<issuer-host>using the tenant label fromWhoAmI— which does not work: that label is Fabric's own DNS-safe label (utils.NewTenantLabel(), stored in Fabric's store), while the registry resolves the Portal tenant UUID. Deriving the URL client-side would also freeze its shape into every released binary.So Fabric reports it.
What
One field:
WhoAmIResponse.identity_issuer— the base URL of the tenant's agent-identity issuer, empty when the deployment serves none. Regenerated with protoc 32.1 and protoc-gen-go v1.36.11, matching the versions already recorded infabric.pb.go; the diff is the new field and nothing else.Companion changes
fabric/go.modpinsDefangLabs/defang/src).defang identity: agent public-key registration #2167.Testing
go build ./...andgo test -shortgreen (CGO_ENABLED=0).🤖 Generated with Claude Code
https://claude.ai/code/session_01T3WmpdY3zc555sNdkY9dzQ
Summary by CodeRabbit