Update conformance tests with DNS rebinding protection
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
This commit is contained in:
parent
96c9bbe745
commit
5ed6063a07
4 changed files with 6 additions and 8 deletions
|
|
@ -15,13 +15,12 @@
|
||||||
- **Resources (4/6):** list, read-text, read-binary, templates-read
|
- **Resources (4/6):** list, read-text, read-binary, templates-read
|
||||||
- **Prompts (4/4):** list, simple, with-args, embedded-resource, with-image
|
- **Prompts (4/4):** list, simple, with-args, embedded-resource, with-image
|
||||||
- **SSE Transport (2/2):** Multiple streams
|
- **SSE Transport (2/2):** Multiple streams
|
||||||
- **Security (1/2):** Localhost validation passes
|
- **Security (2/2):** Localhost validation passes, DNS rebinding protection
|
||||||
|
|
||||||
### Failing (3/40)
|
### Failing (3/40)
|
||||||
|
|
||||||
1. **resources-subscribe** - Not implemented in SDK
|
1. **resources-subscribe** - Not implemented in SDK
|
||||||
2. **resources-unsubscribe** - Not implemented in SDK
|
2. **resources-unsubscribe** - Not implemented in SDK
|
||||||
3. **dns-rebinding-protection** - Missing Host/Origin validation (1/2 checks)
|
|
||||||
|
|
||||||
## Client Test Results
|
## Client Test Results
|
||||||
|
|
||||||
|
|
@ -44,7 +43,6 @@
|
||||||
|
|
||||||
1. **Resource Subscriptions:** SDK doesn't implement `resources/subscribe` and `resources/unsubscribe` handlers
|
1. **Resource Subscriptions:** SDK doesn't implement `resources/subscribe` and `resources/unsubscribe` handlers
|
||||||
2. **Client SSE Retry:** Client doesn't parse or respect the `retry:` field, reconnects immediately, and doesn't send Last-Event-ID header
|
2. **Client SSE Retry:** Client doesn't parse or respect the `retry:` field, reconnects immediately, and doesn't send Last-Event-ID header
|
||||||
3. **DNS Rebinding Protection:** Missing Host/Origin header validation in server transport
|
|
||||||
|
|
||||||
## Running Tests
|
## Running Tests
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,6 @@ server:
|
||||||
- resources-subscribe
|
- resources-subscribe
|
||||||
- resources-unsubscribe
|
- resources-unsubscribe
|
||||||
|
|
||||||
# DNS rebinding protection missing Host/Origin validation
|
|
||||||
- dns-rebinding-protection
|
|
||||||
|
|
||||||
client:
|
client:
|
||||||
# SSE retry field handling not implemented
|
# SSE retry field handling not implemented
|
||||||
# - Client does not parse or respect retry: field timing
|
# - Client does not parse or respect retry: field timing
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ The server has been validated against the official [MCP conformance test suite](
|
||||||
✅ **SSE Transport** (2/2)
|
✅ **SSE Transport** (2/2)
|
||||||
- Multiple streams support
|
- Multiple streams support
|
||||||
|
|
||||||
⚠️ **Security** (1/2)
|
✅ **Security** (2/2)
|
||||||
- ⚠️ DNS rebinding protection (SDK limitation)
|
- ✅ DNS rebinding protection
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import io.modelcontextprotocol.server.McpServer;
|
import io.modelcontextprotocol.server.McpServer;
|
||||||
import io.modelcontextprotocol.server.McpServerFeatures;
|
import io.modelcontextprotocol.server.McpServerFeatures;
|
||||||
|
import io.modelcontextprotocol.server.transport.DefaultServerTransportSecurityValidator;
|
||||||
import io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider;
|
import io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider;
|
||||||
import io.modelcontextprotocol.spec.McpSchema.AudioContent;
|
import io.modelcontextprotocol.spec.McpSchema.AudioContent;
|
||||||
import io.modelcontextprotocol.spec.McpSchema.BlobResourceContents;
|
import io.modelcontextprotocol.spec.McpSchema.BlobResourceContents;
|
||||||
|
|
@ -66,6 +67,8 @@ public class ConformanceServlet {
|
||||||
.builder()
|
.builder()
|
||||||
.mcpEndpoint(MCP_ENDPOINT)
|
.mcpEndpoint(MCP_ENDPOINT)
|
||||||
.keepAliveInterval(Duration.ofSeconds(30))
|
.keepAliveInterval(Duration.ofSeconds(30))
|
||||||
|
.securityValidator(
|
||||||
|
DefaultServerTransportSecurityValidator.builder().allowedOrigin("http://localhost:*").build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Build server with all conformance test features
|
// Build server with all conformance test features
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue