Skip to content

MCP: Protect payloads and OAuth credentials in logs #2635

Open

Description

@erichare

Keep document contents, queries, and OAuth credentials out of normal MCP logs. The current message logging setting truncates payloads, which can still expose sensitive values. Production exposure has not been established. This work is required for the launch in #2408.

Disable normal payload logging and keep useful command categories, errors, and correlation IDs. Diagnostic logging must require explicit configuration and bounded retention. Credentials must stay redacted in diagnostic mode too.

This ticket is done when synthetic payload markers are absent from normal logs and synthetic credential markers are absent from normal logs, diagnostics, and errors. #2634 verifies the deployed configuration before release.

Status on October 23, 2026

PR #2648 implements this and is still open in the MCP stack. Its focused suite passed 85 tests locally. A new trace-to-log correlation test failed before the fix and passed after it in all three logging profiles. It has no CI run yet because it does not target main. Deployed logging and retention checks remain in #2634.

Implementation requirements and source references

Tracking issue: #2408.

Tracking correspondence: L6 credential-safe operational logging. Protocol notifications are #2625/#2626. Shared requirement IDs remain stable across the delivery plan and #2408.

Why

The checked-in configuration enables MCP traffic logging and truncates each message to 1,000 characters. That can still include document contents, queries, or returned data. Truncating a message does not remove sensitive values. Production log exposure has not been established.

This existing logging-default issue also owns credential-safe logging required for the OAuth launch.

Work

  • Disable MCP message-payload logging in normal deployment configuration.
  • Redact access/refresh tokens, authorization codes, PKCE verifiers, registration secrets and credential headers from normal logs, errors and diagnostics.
  • Keep an explicit diagnostic opt-in with bounded duration/retention. Document its permitted payload exposure. Credentials must remain redacted even in diagnostic mode.
  • Preserve useful operational command/error categories and correlation identifiers without exposing payloads or credentials.

Done when

Synthetic document/query markers are absent from normal logs. Synthetic credential markers are absent from both normal and diagnostic logs and error output. Operational logs remain useful, diagnostic logging requires explicit configuration and its bounded retention is documented.

This is a launch gate for #2634 (L6). Protocol-level notification opt-in/removal behavior belongs to #2625 and is verified by #2626. Related #2559 and #2330 cover broader command logging and metrics.

Current configuration.

Changelog traceability

Normative detail: Streamable HTTP, authorization, caching.

Activity

  1. changed the title [-]Disable MCP payload logging by default[/-] [+]MCP: Disable payload logging by default[/+] on Oct 12, 2026
  2. added
    MCP nice-to-haveIndependent MCP improvements that do not block the package upgrade.
    on Oct 12, 2026
  3. removed
    MCP nice-to-haveIndependent MCP improvements that do not block the package upgrade.
    on Oct 12, 2026
  4. changed the title [-]MCP: Disable payload logging by default[/-] [+]MCP: Protect payloads and OAuth credentials in logs[/+] on Oct 12, 2026
  5. added
    MCP launch requiredRelease gate for the OAuth and modern-protocol MCP launch
    MCP launchMCP deployment, operations and user onboarding
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    MCP launchMCP deployment, operations and user onboardingMCP launch requiredRelease gate for the OAuth and modern-protocol MCP launch

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions