René's URL Explorer Experiment


Title: feat(cli): allow keyring session token storage together with `--global-config` · Issue #29105 · coder/coder · GitHub

Open Graph Title: feat(cli): allow keyring session token storage together with `--global-config` · Issue #29105 · coder/coder

X Title: feat(cli): allow keyring session token storage together with `--global-config` · Issue #29105 · coder/coder

Description: Problem ensureTokenBackend() in cli/root.go forces the file-based backend whenever --global-config / CODER_CONFIG_DIR is set to anything other than config.DefaultDir(), regardless of --use-keyring: assumeExtensionInUse := r.globalConfig ...

Open Graph Description: Problem ensureTokenBackend() in cli/root.go forces the file-based backend whenever --global-config / CODER_CONFIG_DIR is set to anything other than config.DefaultDir(), regardless of --use-keyring:...

X Description: Problem ensureTokenBackend() in cli/root.go forces the file-based backend whenever --global-config / CODER_CONFIG_DIR is set to anything other than config.DefaultDir(), regardless of --use-keyring:...

Opengraph URL: https://github.com/coder/coder/issues/29105

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(cli): allow keyring session token storage together with `--global-config`","articleBody":"## Problem\n\n`ensureTokenBackend()` in `cli/root.go` forces the file-based backend whenever `--global-config` / `CODER_CONFIG_DIR` is set to anything other than `config.DefaultDir()`, regardless of `--use-keyring`:\n\n```go\nassumeExtensionInUse := r.globalConfig != config.DefaultDir() && !r.useKeyringWithGlobalConfig\nkeyringSupported := runtime.GOOS == \"windows\" || runtime.GOOS == \"darwin\"\nif r.useKeyring && !assumeExtensionInUse && keyringSupported {\n\t...\n}\n```\n\nThis was introduced in #20943 as a compatibility shim after #20851 enabled keyring storage by default, since editor extensions invoke the CLI with `--global-config` and assumed the session token would be readable from disk. The code comment already flags it as temporary.\n\nTwo consequences today:\n\n1. **Keyring and per-deployment config isolation are mutually exclusive.** Any client that needs its own config directory (editor extensions, CI wrappers, multi-deployment setups) is forced back to a plaintext `session` file on disk. There is no way to opt in.\n2. **Clients cannot hold independent tokens for the same deployment.** The keyring entry is a single JSON credentials map keyed only by normalized host, stored under the `coder-v2-credentials` service name (`cli/sessionstore/sessionstore.go`). Any two clients pointing at the same deployment necessarily share one credential, so a logout in one revokes the session for the other.\n\n## Proposal\n\nAllow `--use-keyring` to be honored when `--global-config` is set, and give callers a way to scope their credential so it does not collide with the shared default entry. Rough shape:\n\n- Drop the `assumeExtensionInUse` short-circuit and treat `--use-keyring` as authoritative. Keep file storage as the default when `--global-config` is set so existing callers are unaffected unless they explicitly opt in.\n- Support a distinct keyring namespace per caller, either derived from the config directory or set explicitly (the existing `keyringServiceName` field is test-only today, `WithKeyringServiceName`). Callers that want to share credentials with Coder Desktop keep using `DefaultServiceName`; callers that want isolation get their own.\n\n## Open questions\n\n- Should the namespace be derived from the config directory path, or an explicit flag? A derived value is transparent to callers but makes the credential name depend on a filesystem path, which is awkward to document and to clean up.\n- If a caller uses an isolated namespace, credential sharing with Coder Desktop and the JetBrains Toolbox plugin is lost for that caller. Is that acceptable as opt-in behavior?\n- What should happen on `logout` when both a default-namespace and an isolated credential exist for the same host?\n- Linux still has no keyring implementation (`sessionstore_other.go` returns `ErrNotImplemented`), so this stays macOS/Windows only.\n\n## Related\n\n- #20851 - enabled keyring usage by default in the CLI\n- #20943 / #20953 - added the `--global-config` short-circuit this issue proposes to lift\n- #19403 - original keyring storage tracking issue\n\nCreated on behalf of @EhabY","author":{"url":"https://github.com/apps/blinkagent","@type":"Person","name":"blinkagent"},"datePublished":"2026-09-08T15:43:44Z","url":"https://github.com/coder/coder/issues/29105"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:eb454afe-2416-a8d1-d3d2-2a0c66eb7131
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8672:36A3E:CF9B84:11604C8:6B010086
html-safe-noncef90aebf958b928b17d44ab06c37f1af119f1d25c9b860701cffed86618059682
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjcyOjM2QTNFOkNGOUI4NDoxMTYwNEM4OjZCMDEwMDg2IiwidmlzaXRvcl9pZCI6IjU0MzgyNTYwOTI3MDAyNzg5MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacea1915cf6308ab117f9d489d1e299a9bcdd1ee7d42945e03195b99b25ec9ae02
hovercard-subject-tagissue:5388846563
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/29105/issue_layout
twitter:imagehttps://opengraph.githubassets.com/784769a3b10dc80831bfe65ba0e66b7fd2f356817ad71e8b5079ad16372faaf5/coder/coder/issues/29105
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/784769a3b10dc80831bfe65ba0e66b7fd2f356817ad71e8b5079ad16372faaf5/coder/coder/issues/29105
og:image:altProblem ensureTokenBackend() in cli/root.go forces the file-based backend whenever --global-config / CODER_CONFIG_DIR is set to anything other than config.DefaultDir(), regardless of --use-keyring:...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameblinkagent[bot]
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/29105#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F29105
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F29105
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/29105
Reloadhttps://github.com/coder/coder/issues/29105
Reloadhttps://github.com/coder/coder/issues/29105
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests468 (468)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/29105
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/29105
#32392https://github.com/coder/coder/pull/32392
feat(cli): allow keyring session token storage together with --global-confighttps://github.com/coder/coder/issues/29105#top
#32392https://github.com/coder/coder/pull/32392
https://github.com/EhabY
cliArea: CLIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22cli%22
featurehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22feature%22
https://github.com/apps/blinkagent
blinkagenthttps://github.com/apps/blinkagent
on Sep 8, 2026https://github.com/coder/coder/issues/29105#issue-5388846563
#20943https://github.com/coder/coder/pull/20943
#20851https://github.com/coder/coder/pull/20851
feat(cli)!: enable keyring usage by default #20851https://github.com/coder/coder/pull/20851
fix(cli): remove defaulting to keyring when --global-config set #20943https://github.com/coder/coder/pull/20943
fix(cli): remove defaulting to keyring when --global-config set (cherry-pick) #20953https://github.com/coder/coder/pull/20953
Optionally store CLI authentication tokens in OS keyring #19403https://github.com/coder/coder/issues/19403
@EhabYhttps://github.com/EhabY
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Sep 8, 2026https://github.com/coder/coder/issues/29105#issuecomment-5587854710
Linear Codehttps://linear.app
ENG-3327https://linear.app/codercom/issue/ENG-3327
EhabYhttps://github.com/EhabY
cliArea: CLIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22cli%22
featurehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22feature%22
on Sep 8, 2026https://github.com/coder/coder/issues/29105#event-30767566218
https://github.com/eugenie-coder
eugenie-coderhttps://github.com/eugenie-coder
on Sep 10, 2026https://github.com/coder/coder/issues/29105#issuecomment-5617666433
@EhabYhttps://github.com/EhabY
@matifalihttps://github.com/matifali
matifalihttps://github.com/matifali
cliArea: CLIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22cli%22
on Sep 15, 2026https://github.com/coder/coder/issues/29105#event-31191678807
jeremyruppelhttps://github.com/jeremyruppel
cliArea: CLIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22cli%22
on Nov 9, 2026https://github.com/coder/coder/issues/29105#event-35602242576
jeremyruppelhttps://github.com/jeremyruppel
EhabYhttps://github.com/EhabY
on Nov 9, 2026https://github.com/coder/coder/issues/29105#event-35602247230
EhabYhttps://github.com/EhabY
on Nov 18, 2026https://github.com/coder/coder/issues/29105#event-36583285150
feat: honor --use-keyring together with --global-confighttps://github.com/coder/coder/commit/e5fe4b28784785ff593d9ab110a2d8f57873d03d
e5fe4b2https://github.com/coder/coder/commit/e5fe4b28784785ff593d9ab110a2d8f57873d03d
feat: honor --use-keyring together with --global-confighttps://github.com/coder/coder/commit/557d1abfcb7c77100d71f00422bb8f56fcb174c8
557d1abhttps://github.com/coder/coder/commit/557d1abfcb7c77100d71f00422bb8f56fcb174c8
feat: honor --use-keyring together with --global-config (#32392)https://github.com/coder/coder/commit/d807abc2e3a8d1e48c1dc2f0e2904a2fde0279e0
#32392https://github.com/coder/coder/pull/32392
d807abchttps://github.com/coder/coder/commit/d807abc2e3a8d1e48c1dc2f0e2904a2fde0279e0
EhabYhttps://github.com/EhabY
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#32392https://github.com/coder/coder/pull/32392
on Nov 20, 2026https://github.com/coder/coder/issues/29105#event-36787218111
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/29105
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/29105
EhabYhttps://github.com/EhabY
cliArea: CLIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22cli%22
featurehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22feature%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.