Skip to content

Host policy needs wildcard/callable matching and a misconfiguration warning (proxied and multi-tenant sellers) #2010

Backlog

Description

@bokelley

Since the A2A Host/Origin policy landed, a seller behind a reverse proxy or serving per-tenant hostnames has two options: list every Host value exactly, or turn DNS-rebinding protection off. Matching is exact or port-only (server/serve.py:2775 _expand_allowed_hosts), and loopback is always allowed (server/http_policy.py:39-43).

Failure mode: one missing entry answers 421 to MCP, A2A and agent-card discovery at once. Nothing at startup says the policy only admits loopback.

Asks:

  1. Accept wildcard subdomain patterns (*.agents.example.com) or a callable host_validator(host) -> bool in adcp's policy. Don't block on Add wildcard pattern support for allowed_hosts in transport security modelcontextprotocol/python-sdk#2141.
  2. Log a startup WARNING when protection is on and allowed_hosts contains only loopback or dev hosts.
  3. Document that the Origin check applies to protocol POSTs, not GET discovery (handler-authoring.md#http-host-and-origin-policy).
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions