Skip to content

fix: keep MCP payloads and credentials out of logs - #2648

Open
erichare wants to merge 5 commits into
fix/mcp-setup-errorsfrom
fix/mcp-safe-logging
Open

erichare wants to merge 5 commits into
fix/mcp-setup-errorsfrom
fix/mcp-safe-logging

Conversation

@erichare

@erichare erichare commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

Keeps MCP payloads and credentials out of normal logs. HTTP and command completion share a server-generated request ID, including callbacks on another worker. Diagnostic stack traces expire within 15 minutes.

Which issue(s) this PR fixes:

Fixes #2635. Deployment logging is tracked in #2634. Builds on #2653 and is the base for #2649. Full stack.

Verification

85 focused Java tests passed on JDK 25 at 02ebbecec. The log tests wait for server completion before asserting which fields were written. GitHub checks.

./mvnw -o -B -ntp clean test \
  -DskipITs -Dfmt.skip=true -Dxml-format.skip=true -Dsurefire.failIfNoSpecifiedTests=false \
  -Dquarkus.http.test-port=19281 -Dtest=McpCustomPathLoggingTest,McpDiagnosticLoggingTest,McpEndpointConfigSourceFactoryTest,McpLoggingFilterTest,McpLoggingTest,McpRequestContextProviderTest,McpResourceTest,McpSetupErrorsTest

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

📈 Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 57.12%
This PR 58.04%
Delta 🟢 +0.92%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 58.04% -0.23% 🍏
Files changed 73.66% 🍏

File Coverage
McpRequestLogging.java 100% 🍏
McpRequestContextProvider.java 100% 🍏
McpEndpointConfigSourceFactory.java 98.08% -1.92% 🍏
McpLoggingFilter.java 97.47% -2.53% 🍏
McpResource.java 90.87% -6.32% 🍏
DynamicTTLCache.java 84.12% 🍏
CqlSessionFactory.java 81.49% 🍏
RequestContext.java 56.9% 🍏
GeneralCommandTools.java 22.58% -55.91% ❌
KeyspaceCommandTools.java 0% -70.82% ❌

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

📈 Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 72.75%
This PR 72.84%
Delta 🟢 +0.10%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 72.84% -0.12% 🍏
Files changed 86.04% 🍏

File Coverage
KeyspaceCommandTools.java 100% 🍏
GeneralCommandTools.java 100% 🍏
McpRequestContextProvider.java 91.43% -8.57% 🍏
RequestContext.java 89.39% 🍏
McpRequestLogging.java 89.13% -10.87% 🍏
McpResource.java 84.19% -7.91% 🍏
McpLoggingFilter.java 80.3% -19.7% 🍏
McpEndpointConfigSourceFactory.java 78.85% -21.15% 🍏
CqlSessionFactory.java 72.49% -5.14% ❌
DynamicTTLCache.java 71.73% 🍏

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

📈 Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 74.21%
This PR 74.30%
Delta 🟢 +0.09%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 74.3% -0.12% 🍏
Files changed 86.04% 🍏

File Coverage
KeyspaceCommandTools.java 100% 🍏
GeneralCommandTools.java 100% 🍏
McpRequestContextProvider.java 91.43% -8.57% 🍏
RequestContext.java 89.39% 🍏
McpRequestLogging.java 89.13% -10.87% 🍏
McpResource.java 84.19% -7.91% 🍏
McpLoggingFilter.java 80.3% -19.7% 🍏
McpEndpointConfigSourceFactory.java 78.85% -21.15% 🍏
CqlSessionFactory.java 72.49% -5.14% ❌
DynamicTTLCache.java 71.73% 🍏

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP: Protect payloads and OAuth credentials in logs

1 participant