Skip to content

fix(auth): use stable session identity#66

Merged
michiosw merged 1 commit intomainfrom
feat/cli-auth-identity
Apr 18, 2026
Merged

fix(auth): use stable session identity#66
michiosw merged 1 commit intomainfrom
feat/cli-auth-identity

Conversation

@michiosw
Copy link
Copy Markdown
Contributor

@michiosw michiosw commented Apr 16, 2026

Summary

  • Stores the OIDC sub claim in CLI sessions and uses issuer#subject as the stable managed-session identity.
  • Keeps email/name as display-only terminal text.
  • Hard-cutover: legacy keyring sessions without subject now ask users to run kontext login.

Why

Session attribution should be stable even when display text is missing or changes. This removes the confusing Authenticated as authenticated output and stops display labels from leaking into backend identity.

Before / After Terminal Capture

Before, an ID token without display claims produced a fake identity:

✓ Authenticated as authenticated
✓ Session: MacBookPro - kontext-cli (239f433e)

After, display text is separate from attribution and no fake account name is shown:

✓ Authenticated
✓ Session: MacBookPro - kontext-cli (239f433e)

With a display claim, the terminal remains human-readable while backend attribution uses the stable key:

✓ Authenticated as dev@example.com
# CreateSession.user_id = https://api.kontext.security#user_123

Verification

  • Ran go test ./... on this branch.

Migration note

Users with old stored sessions must run kontext login again.

Copy link
Copy Markdown
Contributor Author

michiosw commented Apr 16, 2026

chatgpt-codex-connector[bot]

This comment was marked as resolved.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

@michiosw michiosw force-pushed the feat/cli-auth-identity branch from 5f60603 to 6010307 Compare April 17, 2026 07:02
@michiosw michiosw requested a review from tumberger April 17, 2026 07:09
Copy link
Copy Markdown
Contributor Author

michiosw commented Apr 18, 2026

Merge activity

  • Apr 18, 12:43 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 18, 12:43 PM UTC: @michiosw merged this pull request with Graphite.

@michiosw michiosw merged commit 60ba8f3 into main Apr 18, 2026
5 checks passed
@michiosw michiosw deleted the feat/cli-auth-identity branch April 18, 2026 12:43
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