Repository navigation
feat(hub): a store for the secrets of upstream MCP servers (ADR-0069) - #325
Merged
Merged
Conversation
The first part of ADR-0069: `secrets::Secrets` keeps a secret per upstream in the OS keychain (`keyring` 4: Windows Credential Manager, macOS Keychain, the Linux Secret Service). A Linux machine without a Secret Service gets a `secrets.json` in the hub's state directory, readable by the user alone; a probe entry decides. Nothing uses it yet and no route hands a secret out. ADR-0069 amended with the spike: the crate, its licences, the Linux fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 2026
7schmiede
added a commit
that referenced
this pull request
Oct 27, 2026
…he hub (ADR-0069) (#329) The first part of ADR-0069 (card on #316, approved 2026-10-27, points 1, 4, 7): `upstreams.toml` per user in the hub's state directory, no secret in it; the hub's own OAuth login (RFC 9728 and RFC 8414 discovery, RFC 7591 registration where offered, PKCE S256, RFC 8707 resource, a one-time `state` for ten minutes, the browser back at `/oauth/upstream/callback` on the hub's port); a static token the user gives the hub; credentials in the keychain store of #325; refresh before expiry with rotation. The dashboard's page *MCP upstreams* (sidebar) adds, changes, logs in and out, and removes them. No route returns a secret. Their tools in `devstack mcp` follow. The OAuth flow is written against `ureq` rather than the `oauth2` crate (another HTTP client); `base64` added for PKCE, `sha2` was there. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First part of ADR-0069 (Refs #316): where the hub keeps the secrets of the user's upstream MCP servers. Nothing uses it yet; nothing user-visible, so no changelog entry.
What
crates/devstack-hub/src/secrets.rs:Secrets::open(dir)→get/set/deleteper upstream,kind()(Keychain|File).keyring4 (servicedevstack, accountupstream:<name>): Windows Credential Manager, macOS Keychain, Linux Secret Service.secrets.jsonin the hub's state directory,0600(the hub'swrite_private). Windows and macOS never fall back: a refusing keychain is said when a secret is used.Spike
keyring4.2.0 and its store crates: MIT OR Apache-2.0, Rust ≤ 1.88 (ours 1.98). All 128 crates of its tree, every platform, are ondeny.toml's licence list (checked withcargo metadata; this PR'sdenyjob checks bans too).Tests
a_secret_is_kept_given_back_and_forgottenagainst the machine's real store, under a service of its own per run (Windows and macOS: the keychain; Linux CI: whichever the probe finds);the_file_is_the_users_alone(0600on Unix). macOS and Linux run them in CI here.🤖 Generated with Claude Code