Repository navigation
spec: issue-3626 Login code exchange instead of a token in the callback URL - #3627
Conversation
…ck URL Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 4bff926b-0a07-49e1-aa10-5f275f4f770f
PR validation — ✅ 3 passing
AI Session Checks — 🟢 92% · ✅ 0 failing
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | docs/specs/issue-3626-login-code-exchange.md |
+263 / -33 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-4bff92 |
- |
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-4bff92 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-4bff92 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-4bff92 |
- |
Security Checks — ✅ 5 passing
✅ secret-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ sast-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | owasp-top10-2025 |
- |
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
| ✅ Passed | cwe-top26-40-cusp |
- |
Scans not applied (3)
| Scan | Reason |
|---|---|
vulnerability-scan |
no manifest/lockfile changed |
github-actions-scan |
no workflow files changed |
iac-scan |
no IaC files changed |
Security context
✅ Nothing this change touches has a recorded security-fix history.
View in Chainloop ↗ · How this works ↗
Powered by Chainloop and Chainloop Trace
…handoff Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 4bff926b-0a07-49e1-aa10-5f275f4f770f
…order Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 4bff926b-0a07-49e1-aa10-5f275f4f770f
5d37926
Summary
At the end of an OIDC login, the control plane sends the user session token to the client in the callback URL (
?t=<token>). This spec replaces that with a short-lived, single-use handoff code. The client exchanges the code for the token at a new control plane endpoint. The code is bound to the client that started the login, with a PKCE-style challenge. The control plane also rejects a post-login redirect that is not a relative path.Old CLIs keep working. The control plane supports both methods first, and clients move to the code exchange next. A login without a challenge keeps the legacy
?t=callback, and the info endpoint tells new clients that the exchange is available. A later release denies the legacy callback by default, with an operator setting to allow it again. The legacy callback is deleted when the oldest supported CLI uses the exchange and legacy use is zero for one release cycle.Open questions for reviewers
None. The Decision Record (D-001 to D-010) lists the options that were rejected.
We would like two reviewers to approve this spec before it merges.
AI assistance: this spec was drafted with Claude Code and reviewed by the owner.
Refs #3626
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri using the eng-autopilot skill