Backend: mcp 1.30, uv 0.13 and dnspython 2.9 for their advisories; MCP tokens checked against the resource URL
This commit is contained in:
@@ -71,6 +71,9 @@ class _JWTVerifier:
|
||||
client_id=client_id,
|
||||
scopes=[security.MCP_SCOPE],
|
||||
subject=str(payload.get("sub", "")),
|
||||
# `decode_oauth_token` has checked the audience; the SDK compares
|
||||
# this against its own resource URL as well.
|
||||
resource=settings.mcp_resource,
|
||||
)
|
||||
|
||||
|
||||
@@ -170,6 +173,7 @@ def build_http_app(app: object) -> ASGIApp:
|
||||
issuer_url=AnyHttpUrl(settings.oauth_issuer),
|
||||
resource_server_url=AnyHttpUrl(settings.mcp_resource),
|
||||
required_scopes=None,
|
||||
validate_token_resource=True,
|
||||
)
|
||||
server.mcp.settings.transport_security = _transport_security()
|
||||
# The SDK only takes a verifier through its constructor, and the instance is
|
||||
|
||||
Reference in New Issue
Block a user