Repository navigation
feat(auth): doctor section, auth tokens commands and login pre-flight for encrypted OAuth tokens - #1891
Merged
Conversation
… accessor for OAuth token rows
…up=false and warn about retained backups
…d auth status shows it distinctly
…oken cannot be decrypted
…ip with a raw config.db scan
…ation and compaction
… in the OAuth read-path inventory
…eport a missing key before the database check, and correct the packaged-service and dry-run docs
…atch the daemon pre-flight on the current row's bucket key, and tighten the e2e raw scans
…ntrypoint overridden, and make the e2e key-leak scans immune to pipefail
…il the log scan when a log cannot be read
…ent match in every raw check
…y key and place oauth_token_storage under data
…ext from freed pages
Deploying mcpproxy-docs with
|
| Latest commit: |
cb06fb0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://52abab94.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://feat-oauth-token-encryption-5i02.mcpproxy-docs.pages.dev |
Dumbris
enabled auto-merge (squash)
November 12, 2026 01:47
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 43136852991 --repo smart-mcp-proxy/mcpproxy-go
|
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Dumbris
added a commit
that referenced
this pull request
Nov 20, 2026
`roadmap.yaml` had no epics after Spec 117. This PR adds them and regenerates `ROADMAP.md`. - **Shipped:** 118 auto-rescan (#1689), 118 pin visibility boundary (#1684, #1688, #1821), 119 (#1740), 120 (#1781), 122 (#1818) and 123 (#1886, #1887, #1888, #1891). - **In review:** 121 install surfaces (#1711). There is no `spec:` link yet because its folder exists only on the PR branch. - **In progress:** 124 (PR-1 #1918 done; PR-2 CLI and PR-3 Web UI to do) and 125 (spec plus PR-1..3 done; PR-4 Web UI to do). Merged PRs are listed as done child tasks, so `--check-github` doesn't flag a merged PR under an in-progress epic. - **Spec-only PRs:** 127 (#1943), 128 (#1944) and 129 (#1945). Merge this after #1943, #1944 and #1945. Until then, `--check-github` reports their `spec:` links as unresolved; `--check`, the pre-commit hook, passes. Not covered: Spec 126 (#1940, open) and the unsynced tasks.md checkboxes for 123 and 124.
1 task done
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.
Summary
Spec 123 PR-3: the operator surfaces for the encrypted upstream OAuth rows that #1888 introduced. Refs #1697.
mcpproxy doctorprints an OAuth Token Storage section, andGET /api/v1/diagnosticscarries it asdata.oauth_token_storage(row counts by class, key source, compaction advice, leftoverconfig.db.bak, warnings). Each undecryptable server also appears once in the runtime warnings.mcpproxy auth tokens status|encrypt [--dry-run]|decrypt --yes [--leave-undecryptable]: offline commands for the rows. Exit 3 when the core holdsconfig.db, 4 with no or an unusable key, 1 when rows remain.mcpproxy db compact --keep-backup=falseclears the compaction-advised marker; a retained backup is reported separately.auth loginexplains an undecryptable row instead of starting a flow that cannot be stored, standalone (reads the row) and through the daemon (matches the current row's bucket key).auth statusshows the state distinctly.docs/features/oauth-token-encryption.md(doctor output, commands, rotation, compaction, packaged service, container, downgrade),docs/cli/command-reference.md,docs/cli/db-commands.md,docs/api/rest-api.md,docs/errors/MCPX_OAUTH_TOKEN_UNDECRYPTABLE.md.No new dependencies.
Decisions worth a second look
auth tokens decryptrefuses up front when any row cannot be opened, unless--leave-undecryptableis passed (it then still exits 1).auth tokens decryptleaves the compaction marker untouched; onlydb compact --keep-backup=falseclears it. The marker is cleared even when an olderconfig.db.bakexists, as the spec says; the backup is reported on its own (stale_backup_path, warningbackup_file_present).auth loginno longer falls back to in-memory storage whenconfig.dbcannot be opened; it stops with the open error (exit 3 for a locked database).statusand--dry-runare documented as "change no OAuth row" rather than read-only, because opening the database can run open-time maintenance.systemd-run ... LoadCredential=example for a credential-only key was written from the systemd documentation and has not been run on a live systemd host.Testing
go test -race ./cmd/mcpproxy/ ./internal/management/... ./internal/storage/... ./internal/upstream/cli/... ./internal/httpapi/... ./internal/oauth/... ./internal/config/... ./internal/tokenseal/...golangci-lintv2 with.github/.golangci.yml, bare and--build-tags server./scripts/test-oauth-token-encryption-e2e.sh(status / decrypt / encrypt / compact round trip with rawconfig.dbscans, including a control that the token text is still in freed pages before the no-backup compaction)frontend/tests/unit/oauth-undecryptable-signin.spec.ts