diff --git a/pkg/authz/middleware.go b/pkg/authz/middleware.go index 667a94e474..3d9ccb4d55 100644 --- a/pkg/authz/middleware.go +++ b/pkg/authz/middleware.go @@ -140,8 +140,8 @@ func shouldSkipSubsequentAuthorization(method string) bool { // "Unauthorized" message -- err (an authorizer failure) can carry policy detail that // security.md forbids returning to callers, so it is logged server-side instead. // Cedar's evaluation context can embed decoded JWT claim values (see the claim-keys- -// only rule in authorizers/cedar/core.go), so err must never be promoted to a -// structured field routed to an aggregator beyond this log line. +// only rule in authorizers/cedar/core.go), so err must not be surfaced to the client, +// nor copied into additional log lines or fields beyond the single Warn below. func handleUnauthorized(w http.ResponseWriter, msgID interface{}, err error) { if err != nil { slog.Warn("authorization denied", "error", err) diff --git a/pkg/mcp/tool_filter.go b/pkg/mcp/tool_filter.go index 5b7b30fd70..e3446c45cd 100644 --- a/pkg/mcp/tool_filter.go +++ b/pkg/mcp/tool_filter.go @@ -697,7 +697,9 @@ func processEventStream( } else if len(buffer) >= 1 && buffer[len(buffer)-1] == '\r' { linesep = []byte("\r") } else { - return fmt.Errorf("unsupported separator: %s", string(buffer)) + // Length only, not the buffer: buffer is the full pre-filter payload + // (e.g. the unfiltered tools/list), and this error is logged upstream. + return fmt.Errorf("unsupported SSE line separator in %d-byte buffer", len(buffer)) } var linesepTotal, linesepCount int