Repository navigation
Scoped writer credential (EMR_WRITER_API_KEY) - #118
Merged
Merged
Conversation
…ber/emr_upsert drafts, nothing else A second machine can write governed drafts without holding the ledger key. Same pattern as the recall credential, one step wider: credential_kind gains 'writer', MCP tools/list and tools/call are narrowed to WRITER_TOOLS, the two write tool routes accept the ledger or writer key (not recall), every other route refuses it, startup refuses a weak/duplicate/public writer key, the stdio proxy picks the narrowest key per tool, and 'jarvisctl keys writer-key-init' generates the key without printing it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Follow-up to the recall credential (#101): a scoped credential for a second machine that should recall and write governed drafts without holding the ledger key (the full operator credential).
emr_remember/emr_upsert, nothing else.emr_drift_check, the drift routes, the call log, the nx routes and every REST ledger route refuse it (401/403). MCPtools/listshows the nine;tools/callon anything else isAUTHORITY_DENIED/writer-credential-scope.Authorization: BearerorX-EMR-Writer-Key; notX-API-Key. The ledger key wins if both are presented and keeps working everywhere. The recall key stays read-only with a writer key configured.JARVIS_MCP_WRITE_ENABLED=true, are drafts, and are refused withoutuser_requested=true.jarvisctl keys writer-key-init(key to secrets/writer.key mode 600 + one app.env line; never overwritten, never printed).What it does not do: it does not let the server tell machines apart (records still carry a client-chosen
source_agent); that is RFC item 13, still unbuilt.Tests: tests/test_writer_credential_boundary.py (22): every route in the isolation registry run with only the writer key; tool sets written out; strict mode; public deployment; startup checks; stdio. tests/test_deploy_keys.py (+3) for writer-key-init. Mutation-checked: 9 mutants on the credential (writer==operator, drift check in the set, recall accepted on writes, writer in X-API-Key, startup check off, full MCP surface, stdio prefers ledger, identity binding in strict mode, public deployment) and 4 on the CLI; each is caught (one survived at first, the strict-mode identity binding, and got its own test). Note: three mcp_server files use CRLF line endings; edits preserve them.
Not deployed. Deploying means recreating the app with the new image, and writer-key-init for the key.
🤖 Generated with Claude Code