Repository navigation
feat(mcp): fnox replaces Doppler for key rotation and the PowerShell setup - #89
Merged
Merged
Conversation
…setup Closes #85. #84 moved bash's MCP launch to fnox; key rotation and the Windows installer still spoke Doppler, which no fleet machine runs. mcp-key-rotate: a fnox backend, auto-detected when fnox holds the service's active key. - Reads go through HOME, as mcp-fnox-inject reads at server launch, so a repository's fnox.toml is never read; a name fnox lacks reads as empty. - A rotation is written to the fnox.toml in KEY_ROTATE_FNOX_DIR, the file the keys come from, with the value on stdin (never in argv), and read back before it counts. Without the folder it refuses: HOME may read a deployed copy that a write would be lost from. - It says whether the new key is active now or reaches each machine once its copy of the file updates. KEY_ROTATE_FNOX_PROVIDER names the provider for a key the file lacks. KEY_ROTATE_BACKEND accepts fnox, dotenv or auto, and refuses anything else. PowerShell setup: per server, as bash does, mcp-fnox-inject with that server's key alone where fnox decrypts it, else mcp-env-inject; OpenCode alike; setup.ps1 installs mcp-fnox-inject. The Doppler code, docs and tests are gone; the secret guard keeps ~/.doppler among the paths it protects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hanges before a deploy build on each other Cross-review found reads from HOME (a deployed copy) and writes to the source fnox.toml: a second --add or rotation before the copy updated started from stale data, and dropped the first. With KEY_ROTATE_FNOX_DIR set, every read of a change now goes to that file; HOME stays for detection and for saying whether this machine reads the result already. - A first key goes in as the active key before the pool, so a failed pool write still leaves a key that works. - The refusal without KEY_ROTATE_FNOX_DIR says what to run, which the auto-rotate hook relays; a failed store says to check fnox can decrypt. - PowerShell asks fnox once per name per run, and only its exit code and answer decide, never a warning on stderr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l to change, and detect fnox from the source too Without the folder, a rotation or --add read HOME's copy first, and a copy that lagged at one key stopped at "nothing to rotate to" instead of the refusal that says what to run. Detection also accepts the named source file, for a machine whose HOME does not import it yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #85.
Problem
#84 moved MCP server launch in the bash setup onto fnox, through
mcp-fnox-inject. Two things still used Doppler, which no fleet machine runs:mcp-key-rotate: itsdopplerbackend did the reads and writes, and was the one auto-detected.lib/setup-ps/mcp.ps1,opencode.ps1): it detected Doppler and registered servers behinddoppler run.Change
mcp-key-rotategets a fnox backendIt is auto-detected when fnox holds the service's active key.
Reads
$HOME, the waymcp-fnox-injectreads at server launch, so a repository'sfnox.tomlis never read.Writes
--add, is written to thefnox.tomlinKEY_ROTATE_FNOX_DIR, the file the keys come from.fnox seton stdin, never as an argument wherepswould show it.KEY_ROTATE_FNOX_DIR, writes are refused with the reason:$HOMEmay read a deployed copy through an import, and a write there is lost on the next deploy.--statusand--quotastill work.Afterwards
$HOMEview already shows it) or reaches each machine once its copy of the file updates (commit and push it).Settings
KEY_ROTATE_FNOX_PROVIDERnames the provider for a key the file doesn't hold yet. Otherwise fnox keeps each secret's existing provider.KEY_ROTATE_BACKENDacceptsfnox,dotenvorauto. Anything else,dopplerincluded, exits 2.PowerShell setup, at parity with bash
Get-McpBackend -Keydecides per server. A server getsmcp-fnox-injectwith only its own key when fnox, asked from$HOME, can decrypt that key, andmcp-env-injectotherwise. OpenCode entries follow the same rule.setup.ps1now installsmcp-fnox-injectnext tomcp-env-inject.Test-McpEnvVarreports each server's source.Doppler removed
The Doppler code, docs,
.env.exampleline and test mocks are gone. Two exceptions:~/.doppler, for anyone who has it.KEY_ROTATE_BACKEND=doppleris refused.Tests
$HOMEview from the sourcefnox.tomland logs each call's folder and arguments. 8 new cases cover:tests/powershell-checks.ps1: PSScriptAnalyzer is clean.just lintandjust format-checkare clean.🤖 Generated with Claude Code