René's URL Explorer Experiment


Title: bug: keyring session store keys entries by host, so http and https deployments share a token · Issue #29290 · coder/coder · GitHub

Open Graph Title: bug: keyring session store keys entries by host, so http and https deployments share a token · Issue #29290 · coder/coder

X Title: bug: keyring session store keys entries by host, so http and https deployments share a token · Issue #29290 · coder/coder

Description: Is there an existing issue for this? I have searched the existing issues Current Behavior The keyring session store keys entries by host only. normalizeHost in cli/sessionstore/sessionstore.go returns strings.ToLower(u.Host), so http://c...

Open Graph Description: Is there an existing issue for this? I have searched the existing issues Current Behavior The keyring session store keys entries by host only. normalizeHost in cli/sessionstore/sessionstore.go retu...

X Description: Is there an existing issue for this? I have searched the existing issues Current Behavior The keyring session store keys entries by host only. normalizeHost in cli/sessionstore/sessionstore.go retu...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: keyring session store keys entries by host, so http and https deployments share a token","articleBody":"### Is there an existing issue for this?\n\n- [X] I have searched the existing issues\n\n### Current Behavior\n\nThe keyring session store keys entries by host only. `normalizeHost` in `cli/sessionstore/sessionstore.go` returns `strings.ToLower(u.Host)`, so `http://coder.example.com` and `https://coder.example.com` map to the same entry. Every command that runs with `--url http://coder.example.com` and `--use-keyring=true` therefore uses the token that was stored for the `https` deployment:\n\n* `coder login token --url http://coder.example.com` prints the `https` token.\n* `coder logout --url http://coder.example.com` sends that token to `http://coder.example.com` in `client.Logout()` and then deletes the shared entry, signing the `https` session out.\n* Any other command, such as `coder ssh`, sends the `https` token in cleartext to the `http` URL.\n* `coder login http://coder.example.com --use-token-as-session` overwrites the `https` entry with the `http` token.\n\n**File** mode already guards against this. `coder login token` compares the stored URL with `--url` and refuses with `file session token storage only supports one server at a time` when they differ. The keyring path has no such check.\n\nThe main way to hit this is a mistyped or misconfigured URL: a user who is signed in to `https://coder.example.com` in the terminal and points a client at `http://coder.example.com` leaks the `https` token over plaintext. The VS Code extension defaults `coder.useKeyring` to `true` in coder/vscode-coder#1107 and shares the CLI's store, so the same host-keyed entry is used by both.\n\n### Relevant Log Output\n\n```shell\n$ coder login https://coder.example.com --use-keyring=true\n# ...signed in...\n$ coder login token --url http://coder.example.com --use-keyring=true\n\u003cprints the https session token>\n```\n\n### Expected Behavior\n\nKeyring entries are scoped to the full origin (scheme, host, and port), or the keyring read compares the stored URL with `--url` the way file mode does and refuses on a mismatch. Either way, `coder login token --url http://coder.example.com` fails with a clear error instead of printing a token for a different scheme.\n\n### Steps to Reproduce\n\n1. On macOS or Windows, run `coder login https://coder.example.com --use-keyring=true` and sign in.\n2. Run `coder login token --url http://coder.example.com --use-keyring=true`.\n3. The `https` session token is printed. Running `coder logout --url http://coder.example.com --use-keyring=true` sends it to the `http` URL and removes the `https` session.\n\n### Environment\n\n* **Host OS**: macOS or Windows (any platform with keyring support)\n* **Coder Version**: main at 9548f239a8bdfe74d0f62eafc41c97b2d7adca91 (after 2.32.0)\n\n### Additional Context\n\nRelated to #29105, which also touches how clients share the CLI's keyring store.","author":{"url":"https://github.com/EhabY","@type":"Person","name":"EhabY"},"datePublished":"2026-09-14T14:23:47Z","url":"https://github.com/coder/coder/issues/29290"}

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:41e465f3-477d-086c-ce95-cc9ff7dbf18b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE3B6:3D97C8:BB8793:FB7A44:6B00F65B
html-safe-nonceb490c49dabeed25be8ee22f8cb3eba71dbc2cdb3829699939ea4ddd34f58fab8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0I2OjNEOTdDODpCQjg3OTM6RkI3QTQ0OjZCMDBGNjVCIiwidmlzaXRvcl9pZCI6Ijg4MzU4OTk0NTA5MTc0NTEzNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf0e29f83b4c39f0746de88cb9294cb180683aa208273ce903c67d40ddf8d2db9
hovercard-subject-tagissue:5450578063
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/29290/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9a861a07e9c1a62be5f538f2b91abbd1ad74ffecbb2b684aa2641f16344af13e/coder/coder/issues/29290
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9a861a07e9c1a62be5f538f2b91abbd1ad74ffecbb2b684aa2641f16344af13e/coder/coder/issues/29290
og:image:altIs there an existing issue for this? I have searched the existing issues Current Behavior The keyring session store keys entries by host only. normalizeHost in cli/sessionstore/sessionstore.go retu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameEhabY
hostnamegithub.com
expected-hostnamegithub.com
Nonee208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187
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
release7dafd017fb7809a839c443dba08622af38e63c09
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/29290#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F29290
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%2F29290
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/29290
Reloadhttps://github.com/coder/coder/issues/29290
Reloadhttps://github.com/coder/coder/issues/29290
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/29290
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/29290
#29764https://github.com/coder/coder/pull/29764
bug: keyring session store keys entries by host, so http and https deployments share a tokenhttps://github.com/coder/coder/issues/29290#top
#29764https://github.com/coder/coder/pull/29764
https://github.com/RyanL2
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/EhabY
EhabYhttps://github.com/EhabY
on Sep 14, 2026https://github.com/coder/coder/issues/29290#issue-5450578063
coder/vscode-coder#1107https://github.com/coder/vscode-coder/pull/1107
9548f23https://github.com/coder/coder/commit/9548f239a8bdfe74d0f62eafc41c97b2d7adca91
#29105https://github.com/coder/coder/issues/29105
EhabYhttps://github.com/EhabY
cliArea: CLIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22cli%22
on Sep 14, 2026https://github.com/coder/coder/issues/29290#event-31107321066
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Sep 14, 2026https://github.com/coder/coder/issues/29290#issuecomment-5665517783
Linear Codehttps://linear.app
DEVEX-972https://linear.app/codercom/issue/DEVEX-972
EhabYhttps://github.com/EhabY
on Sep 14, 2026https://github.com/coder/coder/issues/29290#event-31108423018
fix: skip CLI credential steps without a binary and ask before signin…https://github.com/coder/vscode-coder/commit/a4e4fefc279b81cd880c44e24386e8ac9a8e4b31
a4e4fefhttps://github.com/coder/vscode-coder/commit/a4e4fefc279b81cd880c44e24386e8ac9a8e4b31
fix: skip CLI credential steps without a binary and ask before signin…https://github.com/coder/vscode-coder/commit/ba61678b642f802552b8fe5610c5347f8171c68b
ba61678https://github.com/coder/vscode-coder/commit/ba61678b642f802552b8fe5610c5347f8171c68b
fix: skip CLI credential steps without a binary and ask before signin…https://github.com/coder/vscode-coder/commit/b3ae7321b885cbb3426ff0b87ed89fb43f320f39
b3ae732https://github.com/coder/vscode-coder/commit/b3ae7321b885cbb3426ff0b87ed89fb43f320f39
jeremyruppelhttps://github.com/jeremyruppel
featurehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22feature%22
on Sep 14, 2026https://github.com/coder/coder/issues/29290#event-31111900650
EhabYhttps://github.com/EhabY
on Sep 14, 2026https://github.com/coder/coder/issues/29290#event-31113093261
fix: skip CLI credential steps without a binary and ask before signin…https://github.com/coder/vscode-coder/commit/b14afd426228418bec63c87a376bc368b6c9444c
b14afd4https://github.com/coder/vscode-coder/commit/b14afd426228418bec63c87a376bc368b6c9444c
fix: skip CLI credential steps without a binary and ask before signin…https://github.com/coder/vscode-coder/commit/d59211f15fdcd665f5f4501a688d3303689985a4
d59211fhttps://github.com/coder/vscode-coder/commit/d59211f15fdcd665f5f4501a688d3303689985a4
RyanL2https://github.com/RyanL2
on Sep 22, 2026https://github.com/coder/coder/issues/29290#event-31637227980
fix(cli/sessionstore): scope keyring credentials to the deployment or…https://github.com/RyanL2/coder/commit/15ce4a925c00ee03367a5ebf4d38116679a00ac6
https://docs.github.com/articles/closing-issues-via-commit-messages
15ce4a9https://github.com/RyanL2/coder/commit/15ce4a925c00ee03367a5ebf4d38116679a00ac6
https://github.com/RyanL2
RyanL2https://github.com/RyanL2
on Sep 23, 2026https://github.com/coder/coder/issues/29290#issuecomment-5787177964
#29764https://github.com/coder/coder/pull/29764
EhabYhttps://github.com/EhabY
RyanL2https://github.com/RyanL2
on Oct 27, 2026https://github.com/coder/coder/issues/29290#event-34385827071
EhabYhttps://github.com/EhabY
on Oct 27, 2026https://github.com/coder/coder/issues/29290#event-34394754594
fix(cli): scope keyring credentials to the deployment origin (#29764)https://github.com/coder/coder/commit/bc65edc7370bdc446e71088ea8708363b3be4616
#29764https://github.com/coder/coder/pull/29764
https://docs.github.com/articles/closing-issues-via-commit-messages
bc65edchttps://github.com/coder/coder/commit/bc65edc7370bdc446e71088ea8708363b3be4616
EhabYhttps://github.com/EhabY
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#29764https://github.com/coder/coder/pull/29764
on Oct 27, 2026https://github.com/coder/coder/issues/29290#event-34394754964
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/29290
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/29290
RyanL2https://github.com/RyanL2
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.