You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(headers): stop redacting REST + SSE responses; scope reveal_secret_headers to MCP tool only
User feedback on the previous round: the Server Detail edit form refused
to save when any header value still contained the `***REDACTED***`
sentinel, and pushed users at the `reveal_secret_headers: true` config
flag to unblock themselves. That trade-off was wrong — it punished the
human UI to protect an agent code path.
The actual threat model:
- REST API (`/api/v1/servers`, SSE `/events`): gated by the local
per-install API key. Same trust boundary as access to
`~/.mcpproxy/mcp_config.json` on disk where these values are already
stored in plaintext. Redacting in the response bought no real
security, only broke the Web UI + macOS tray edit-and-save round-trip.
- MCP `upstream_servers` tool: invoked by AI agents, output gets
read back to the LLM context. THIS is the agent-context exposure
`reveal_secret_headers` was created to protect — and that redaction
was already implemented separately in `internal/server/mcp.go:~2545`,
unaffected by this change.
Backend changes:
- internal/httpapi/server.go: drop `redactServerHeaders` calls in
`handleGetServers` (both code paths) and remove the now-unused method.
- internal/runtime/event_bus.go: drop the `redactServerHeaders` call on
SSE `servers.changed` payloads and remove the now-unused method.
- internal/runtime/event_bus_payload_test.go: rewrite the redaction test
to assert the new policy — SSE must now carry plaintext, the test name
changes from `…_RedactsSensitiveHeaders` to `…_SendsPlaintextHeaders`.
- internal/config/config.go: update the `RevealSecretHeaders` doc to
explicitly scope the flag to the MCP tool. REST + SSE always send
plaintext from now on.
UI cleanup (the redaction sentinel is no longer expected on the wire):
- macOS Swift `saveEdits()`: drop the elaborate redacted-save guard
(refused save when ***REDACTED*** literal still in textarea OR a
redacted key was deleted). Both cases became impossible once the REST
API serves plaintext.
- macOS Swift `kvRow()`: drop the `value != "***REDACTED***"` check
that disabled the Convert-to-secret button.
- macOS Swift `performConvertToSecret()`: drop the matching guard.
- Vue `KVValueCell.vue`: drop the `isBackendRedacted` computed flag
and the "Backend redacted this value, set reveal_secret_headers"
tooltip. Reveal and Convert are always available on literal values.
- Vue `ServerDetail.vue::commitConvert()`: drop the same guard.
Verified end-to-end on macOS and Web UI:
- REST: `curl /api/v1/servers` → `Authorization: Bearer 1d386f...`
(the real 71-char token).
- MCP tool: `upstream_servers list` → `"Authorization":"***REDACTED***"`
(still hidden from agents).
- macOS Server Detail → synapbus → Edit → Headers textarea pre-populated
with the real Bearer token; Save no longer blocked.
- Web UI synapbus Config → Headers row shows `••••59 (71 chars)` with
reveal eye, Convert-to-secret 🔒, edit, delete — all functional.
OAS spec regenerated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: frontend/src/views/ServerDetail.vue
-8Lines changed: 0 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2106,14 +2106,6 @@ function closeConvertModal() {
2106
2106
asyncfunction commitConvert() {
2107
2107
const m =convertModal.value
2108
2108
if (!m.secretName||!m.rawValue) return
2109
-
if (m.rawValue==='***REDACTED***') {
2110
-
systemStore.addToast({
2111
-
type: 'error',
2112
-
title: 'Cannot convert',
2113
-
message: 'Backend is redacting this value (reveal_secret_headers: false). The literal cannot be read from this side; edit the value first or enable reveal_secret_headers in your config.',
editError ="Cannot save: the backend redacted these headers and the real values are not visible here: \(offenders). Set `reveal_secret_headers: true` in your config to view + edit them, then try again."
0 commit comments