Files
coder/coderd/database
Steven Masley 33d7bf1760 feat(coderd/mcp): user-headers GET/PUT/DELETE endpoints
Adds three experimental endpoints under /api/experimental/mcp/servers/
{mcpServer}/user-headers that let a user manage their own values for
the admin-marked custom_headers_user_keys on an MCP server.

- GET returns an MCPServerUserHeaderValues with a HasValues map keyed
  by every admin-marked user key. Values are never returned, only
  booleans indicating whether the caller has stored a non-empty value.
- PUT upserts a subset of values. Unknown keys are rejected with 400.
  Keys are matched case-insensitively but stored under the admin's
  canonical casing. A partial PUT preserves existing values for keys
  the request did not touch; sending an empty string clears a single
  value.
- DELETE removes the row entirely and is idempotent.

The Upsert dbauthz wrapper switches to insertWithAction so the first
write does not require a pre-existing row.
2026-05-29 19:18:38 +00:00
..