Repository navigation
Conversation
…ion rows (#1698) Three audit gaps from #1698, none needing a schema change: - Caller identity on config_change and quarantine_change rows. The authenticated caller rides in the request context (ContextWithActor / RequestActor; the REST door stamps it in a middleware after authentication, the MCP management tools stamp the mcp surface) and the runtime copies it onto the activity event: actor_kind, actor_name, surface and request_id, the profile_change vocabulary. A change with no caller (file reload, admission gate at load) carries none of them. - REST / CLI server changes record a row. POST/PATCH/DELETE /servers, the quarantine toggles, security approve, enable/disable and a restart that re-enables a disabled server write server_added / server_updated (changed fields and their before/after values, computed against the committed entry) / server_removed (with the purge summary) / server_enabled|disabled, through the existing redaction. The MCP tool, which already recorded add/remove, now carries the agent's identity. - Token regenerate records a rotate row. POST /tokens/{name}/regenerate goes through CredentialsService.Regenerate, which writes one profile_change row with change rotate, the actor and the old/new token_prefix (never a secret); the store's refusals keep their sentinels so the 404 / 409 mapping is unchanged. Docs: activity-log.md (doors, actions, "Who changed it"), agent-tokens.md, mcp-credential-lifecycle.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 task done
Deploying mcpproxy-docs with
|
| Latest commit: |
d4ffdcf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7eccaaf7.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://claude-1698-audit-actor-gaps.mcpproxy-docs.pages.dev |
The round-8 door scan (internal/oauth TestNoDoorPublishesARawServerLeaf) flagged serverAddedValues: it copied sc.URL and sc.Command into a payload map and relied on the caller to redact. The two leaves now pass through redactActivityValue as they are read, so the function is a routed door on its own and the caller no longer re-redacts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 42487070854 --repo smart-mcp-proxy/mcpproxy-go
|
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
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
Closes the three audit gaps that need no schema change, as agreed on #1698: who changed the rules now shows up on the existing activity rows.
config_changeandquarantine_changerows. The authenticated caller travels in the request context (runtime.ContextWithActor/runtime.RequestActor; the REST door stamps it in a middleware after authentication, the MCP management tools stamp themcpsurface) and the runtime copies it onto the activity event, so the stored row carriesactor_kind,actor_name,surfaceandrequest_idunder the same keys aprofile_changerow already uses. A change with no caller behind it (config file edited on disk, admission gate at load) carries none of them: an absent actor means "no request", never an unknown one.POST /servers,PATCH /servers/{id},DELETE /servers/{id}, the quarantine toggles, security approve, enable/disable and the restart that re-enables a disabled server writeserver_added/server_updated(withchanged_fieldsand the before/after values of those fields only, computed against the committed entry so an admission-gate quarantine in the same commit is part of the delta) /server_removed(with the purge summary) /server_enabled|disabled. Values go through the existingredactActivityConfigValuesredaction. The MCP tool, which already recorded add/remove, now carries the agent's identity too.POST /api/v1/tokens/{name}/regenerate(mcpproxy token regenerate) goes throughCredentialsService.Regenerate, which writes oneprofile_changerow withchange: rotate, the actor and the old/newtoken_prefix(never a secret), the shape client rotation already has. The store's refusals keep their sentinels, so 404 / 409 mapping is unchanged.No new dependencies. Docs:
docs/features/activity-log.md(Config Change Events: doors, actions, "Who changed it"),docs/features/agent-tokens.md(regenerate),docs/features/mcp-credential-lifecycle.md.Verification
internal/runtime/activity_actor_test.go,credentials_regenerate_test.go,internal/server/activity_actor_rest_test.go,internal/httpapi/actor_middleware_test.go,tokens_regenerate_record_test.go, scanner and management tests).go test -raceon runtime, server, httpapi, management, security/scanner: green../scripts/test-api-e2e.sh: 70 passed, 0 failed.golangci-lint(CI config, bare and--build-tags server,--new-from-rev=origin/main): 0 issues.github-copilot/gpt-6.1-sol, three rounds. Round 1: 5 attribution gaps (MCP enable/registry-add surface, security approve, restart-enables, add row vs committed state, patch delta vs admission gate). Round 2: 6 more (add row read the live config instead of the create commit's snapshot, restart retry loop, MCP restart surface, scanEnsureConnected, secret-change restarts, legacy REST fallbacks). All fixed with tests; round 3:VERDICT: CLEAN.Out of scope (next step on #1698)
A fourth audit file event kind (
admin_action) for log shippers. This PR puts the actor on the activity rows so that spec has one vocabulary to lift.Refs #1698 (first phase; the issue stays open for the
admin_actionspec).🤖 Generated with Claude Code