pmcp 2.7.0__tar.gz → 2.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pmcp-2.7.2/.consiliency/plans/detailed-limit-bound-20260829-1500.md +178 -0
- pmcp-2.7.2/.consiliency/plans/detailed-public-host-check-20260830-1200.md +248 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/CHANGELOG.md +56 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/PKG-INFO +14 -8
- {pmcp-2.7.0 → pmcp-2.7.2}/README.md +13 -7
- {pmcp-2.7.0 → pmcp-2.7.2}/SECURITY.md +11 -1
- {pmcp-2.7.0 → pmcp-2.7.2}/pyproject.toml +1 -1
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/__init__.py +1 -1
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/auth.py +132 -10
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/client/manager.py +14 -8
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/types.py +18 -12
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_auth.py +176 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_client_manager.py +29 -17
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_policy_fail_open.py +65 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/uv.lock +1 -1
- {pmcp-2.7.0 → pmcp-2.7.2}/.claude/docs-catalog.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.claude/plans/ticklish-inventing-stearns.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/evidence/bypass-proofs-187.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/evidence/mutation-175.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/evidence/mutation-180.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/evidence/mutation-183.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/evidence/mutation-189.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/notes/derive_npm_flags.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/notes/differential_npm_corpus.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/notes/mutate.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/notes/sse-stream-ended-investigation-20260812.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/notes/verify_tables.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-anyio-transport-task-ownership-20260811-0204.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-catalog-indexing-hardening-20260827-1745.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-ci-job-timeouts-20260826-0400.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-ci-workflow-guards-20260826-2205.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-installed-version-from-runner-cache-20260817-1600.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-installed-version-from-serverinfo-20260817-0400.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-nopt-backed-npm-identity-20260826-2150.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-npm-flag-classification-20260826-1130.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-package-identity-parsing-20260825-0900.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-policy-fail-open-20260829-1200.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-remove-automatic-update-notices-20260819-0100.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-spawn-time-version-provenance-20260817-1800.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-stale-notice-package-identity-20260817-0300.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-update-server-resolution-residuals-20260816-1824.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-update-server-toctou-20260820-1300.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-value-flag-collisions-20260826-0500.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-verify-host-enumerated-types-20260827-1730.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.consiliency/plans/detailed-version-probe-ask-the-server-20260817-2000.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.dockerignore +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.env.example +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/CODEOWNERS +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/actions/pipeline-bootstrap-setup/action.yml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/dependabot.yml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/probe/p1_probe_client.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/probe/p1_probe_server.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/workflows/docker.yml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/workflows/maintenance.yml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/workflows/pipeline-bootstrap.yml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/workflows/release.yml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.github/workflows/test.yml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.gitignore +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.mcp-gateway/descriptions.yaml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.mcp.json.example +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.opencode/agent/fast-build-spark.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.opencode/agent/impl-codex53.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.opencode/agent/planner-gemini.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.opencode/agent/qa-debug.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.opencode/agent/research-spark.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/.pr_details.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/CONTRIBUTING.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/Dockerfile +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/LICENSE +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/SPEC_COMPLIANCE.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/agent-manifest.yaml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/catalog-info.yaml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/config/.mcp.json.example +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/diagnostics/issue-79-1b/.gitignore +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/diagnostics/issue-79-1b/RUNBOOK.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/diagnostics/issue-79-1b/repro_client.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/diagnostics/issue-79-1b/run.sh +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/diagnostics/issue-79-1b/slow_server.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/diagnostics/issue-79-1b/synthetic.mcp.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/docker-compose.yml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/examples/gateway-only.mcp.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/examples/gateway-policy.yaml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/examples/sample-backends.mcp.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/examples/scoped-advisor-policy.yaml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/generated/.gitkeep +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/HANDOFF-agent-board-mcp-registration.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/ROADMAP-pmcp-agent-board-mcp.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/agent-board-overlay.template.jsonc +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/codebase-review-2026-06-15.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/detailed-103-scoped-advisor-audit-20260726.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/detailed-describe-nested-schema-and-indexit-stdio-20260706-0920.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/detailed-idle-timeout-downstream-calls-20260628-0646.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/detailed-mcp-2x-spec-2026-07-28-stage1-20260805-1740.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/detailed-overlay-server-env-patch-20260801-1530.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/detailed-private-manifest-overlay-20260629-0841.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/manifest.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v1-config.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v1-observe.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v1-resolver.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v1-runtime.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v11-P1.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v11-P2.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v11-P3B.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v11-P5.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v11-P6CLEAN.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v11-PG.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v12-FANOUT.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v12-TRISTATE.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v12-UPDPATH.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v2-lifecycle.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v2-ops.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v2-refresh.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v2-serialize.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v2-soak.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v3-auth.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v3-config.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v3-conform.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v3-observe.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v3-proto.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v3-tasks.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v4-authobs.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v4-authsoak.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v4-elicit.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v4-remote.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v4-safeurl.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v4-store.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v5-catalogcli.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v5-clihint.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v5-climatch.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v5-clisoak.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v5-reqcli.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v6-hostcontract.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v6-hostmeta.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v6-hostpolicy.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v6-hostreg.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v6-hostsoak.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v7-AUTHRS.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v7-CONCURR.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v7-ENVFIX.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v7-MANIFEST.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v7-REDACT.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v7-REGISTRY.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v8-AUTHFIX.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v8-COMPLETE.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v8-MATCHFIX.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v8-REGFIX.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v8-RELEASE.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/phase-plan-v9-SPECCURRENCY.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/v7-code-review-findings.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/plans/v7-issue-tracker.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/_mutate_workflow.sh +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/check_workflows.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/pipeline-bootstrap/emit-event.mjs +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/pipeline-bootstrap/package-lock.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/pipeline-bootstrap/package.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/pipeline-bootstrap/run.mjs +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/pipeline-bootstrap/shims/README.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/pipeline-bootstrap/shims/claude +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/pipeline-bootstrap/shims/codex +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/pipeline-bootstrap/shims/gemini +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/probes/_serverkill_runner.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/probes/run_sse_flake_probe.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/probes/run_sse_flake_probe_interrupt.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/probes/sse_flake_probe.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/probes/sse_flake_probe_interrupt.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/probes/sse_flake_probe_serverkill.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/probes/sse_flake_probe_sigkill.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/scripts/probes/sse_flake_probe_sigkill_connect.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/server.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/README.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/active/pmcp-gateway-orchestration-plan.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v1.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v10.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v11.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v12.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v2.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v3.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v4.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v5.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v6.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v7.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v8.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/phase-plans-v9.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/specs/tenant-code-mode-host-contract.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/__main__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/cli.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/cli_commands/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/cli_commands/doctor.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/cli_commands/install.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/cli_commands/secrets.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/client/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/config/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/config/guidance.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/config/loader.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/env_store.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/errors.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/identity.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/_npm_resolve.js +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/code_patterns.yaml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/code_patterns_loader.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/environment.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/installer.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/loader.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/manifest.yaml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/matcher.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/npm_resolver.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/refresher.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/registry.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/sync.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/manifest/version_checker.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/policy/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/policy/policy.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/py.typed +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/remote_auth.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/resources/code_execution_guide.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/scoped_advisor_audit.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/server.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/subscriptions.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/summary/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/summary/generator.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/summary/template_fallback.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/templates/code_examples.yaml +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/templates/code_snippets_loader.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/tools/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/tools/handlers.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/transport/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/transport/http.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/src/pmcp/validation.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/team_announcement.md +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/conftest.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/fixtures/npm/schema.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/fixtures/registry/v0_servers_page1.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/fixtures/registry/v0_servers_page2.json +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/mcp2x/test_catalog_publishers.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/mcp2x/test_client_transport.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/mcp2x/test_dependency_bounds.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/mcp2x/test_get_retirement.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/mcp2x/test_listen_over_http.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/mcp2x/test_listen_registration.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/mcp2x/test_server_handlers.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/mcp2x/test_subscription_contract.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/__init__.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/conftest.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/fake_remote.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/fake_stdio_server.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/harness.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_downstream_handshake_era.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_downstream_remote.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_downstream_stdio.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_emitter_harness.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_get_retired.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_harness.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_publisher_coverage.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_subscriptions_e2e.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_wire_handshake_era.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/runtime/test_wire_modern_era.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_auth_origin_wiring.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_baseline_constraints.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_cli.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_cli_p4.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_client_manager_reconnect.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_config_loader.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_credential_boot.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_credential_child_env.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_credential_gates_handlers.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_credential_gates_startup.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_credential_optionality_e2e.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_credential_predicate_guard.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_credential_requirement.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_env_store.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_errors.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_guidance_config.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_http_dos.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_http_transport.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_identity.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_install_command.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_integration.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_lazy_start.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_manifest.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_manifest_overlay.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_manifest_provision.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_npm_resolver.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_offline_discovery.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_package_metadata.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_phase4_e2e.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_phase6_tenant_code_mode.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_policy.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_progressive_disclosure.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_provision_validation.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_refresher.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_registry.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_scoped_advisor_audit.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_secrets_command.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_server.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_server_lifecycle.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_setup_command.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_singleton_lock_scope.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_ssrf_registry.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_startup_resolver.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_summary.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_tools.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_transport_http.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_version_checker.py +0 -0
- {pmcp-2.7.0 → pmcp-2.7.2}/tests/test_workflow_guards.py +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Detailed plan: bound `max_tools_per_server`, and stop the code arguing against it
|
|
2
|
+
|
|
3
|
+
> **Revision 2 (2026-08-29).** Boarded 3 AGREE, no blocking defects. Three
|
|
4
|
+
> corrections applied, one of them a **misattributed citation of mine** that
|
|
5
|
+
> argued the opposite of what the source says.
|
|
6
|
+
|
|
7
|
+
## Task
|
|
8
|
+
|
|
9
|
+
Close Consiliency/pmcp#207. Add `Field(ge=1)` to
|
|
10
|
+
`LimitsPolicy.max_tools_per_server`, and correct three comments that state the
|
|
11
|
+
reason it was omitted — a reason #202 removed.
|
|
12
|
+
|
|
13
|
+
## Research summary
|
|
14
|
+
|
|
15
|
+
Verified in this worktree.
|
|
16
|
+
|
|
17
|
+
**Why the bound was blocked, and why it no longer is.** #175 proposed it, then
|
|
18
|
+
dropped it: `PolicyManager._load_policy(..., fatal=False)` swallowed validation
|
|
19
|
+
errors and fell back to an **allow-all** default, so making `0` schema-invalid
|
|
20
|
+
would have silently discarded an operator's whole policy file. #202 made a
|
|
21
|
+
discovered policy that *parses but fails validation* terminate startup, so a
|
|
22
|
+
schema bound can no longer silently unrestrict anything.
|
|
23
|
+
|
|
24
|
+
**`0` is not a meaningful setting.** At `0`, `_parse_tool_entries` empties its
|
|
25
|
+
result before examining a single entry, and no documented semantic assigns `0` a
|
|
26
|
+
"disable tool indexing" meaning.
|
|
27
|
+
|
|
28
|
+
**WAS WRONG (rev 1):** it supported this by citing `manager.py:107` — "the cap is
|
|
29
|
+
a runaway guard, not a catalog-size limit". That sentence is about
|
|
30
|
+
`_MAX_LISTING_PAGES = 500`, **not** `max_tools_per_server`, and the same passage
|
|
31
|
+
describes `max_tools_per_server`'s default of 100 as a *legitimate catalog size*
|
|
32
|
+
— the opposite of the point it was quoted for. The conclusion survives on
|
|
33
|
+
`_parse_tool_entries`; the citation does not, and is removed rather than
|
|
34
|
+
reworded.
|
|
35
|
+
|
|
36
|
+
**Two independent axes.** `LimitsPolicy.max_tools_per_server` (`types.py:973`) is
|
|
37
|
+
the policy/schema surface. `ClientManager.__init__`'s `max_tools_per_server: int = 100`
|
|
38
|
+
(`manager.py:936`) is a separate constructor parameter, and
|
|
39
|
+
`manager.py:2169` guards `< 1` — so it already handles zero *and negatives*
|
|
40
|
+
defensively. #207 is about the schema axis; the constructor axis is deliberately
|
|
41
|
+
left alone (see Non-goals).
|
|
42
|
+
|
|
43
|
+
**What currently pins `0` as valid.** `tests/test_client_manager.py:6110`
|
|
44
|
+
asserts `LimitsPolicy(max_tools_per_server=0).max_tools_per_server == 0`, and
|
|
45
|
+
`:6116` constructs `ClientManager(max_tools_per_server=0)`. The first must
|
|
46
|
+
invert; the second must **stay**, because it exercises the constructor axis and
|
|
47
|
+
the log behaviour, both of which survive this change.
|
|
48
|
+
|
|
49
|
+
## The migration consequence, stated plainly
|
|
50
|
+
|
|
51
|
+
**This change plus #202 converts a working configuration into a hard boot
|
|
52
|
+
failure.** An operator whose discovered policy contains `max_tools_per_server: 0`
|
|
53
|
+
starts fine today (with a now-accurate log saying nothing was indexed); after
|
|
54
|
+
this, that file fails validation and #202 terminates startup.
|
|
55
|
+
|
|
56
|
+
That is the intended direction — a nonsensical value should be rejected loudly
|
|
57
|
+
rather than silently indexing nothing — but it is a real behaviour change for
|
|
58
|
+
anyone holding that value, and it must be in the CHANGELOG under `### Changed`,
|
|
59
|
+
not buried as a fix. The affected population is plausibly zero, since `0` yields
|
|
60
|
+
a gateway that indexes no tools at all, but "plausibly zero" is not "none".
|
|
61
|
+
|
|
62
|
+
## Changes
|
|
63
|
+
|
|
64
|
+
### `src/pmcp/types.py` (modify)
|
|
65
|
+
|
|
66
|
+
- `LimitsPolicy.max_tools_per_server` (`:973` — rev 1 said `:960`, which is the
|
|
67
|
+
docstring) — modify — `Field(default=100, ge=1)`.
|
|
68
|
+
- `LimitsPolicy` docstring (`:957-970`) — modify — it currently says the field
|
|
69
|
+
**deliberately carries no `Field(ge=1)`** and explains why, citing the
|
|
70
|
+
swallow-and-fall-back-to-allow-all behaviour. That reason is now false. Replace
|
|
71
|
+
it with a short record that the bound was blocked until #202 made discovered
|
|
72
|
+
policy validation fatal. Keeping the history matters: without it, the next
|
|
73
|
+
person to consider a schema bound has no way to know the hazard existed or that
|
|
74
|
+
it was removed.
|
|
75
|
+
|
|
76
|
+
### `src/pmcp/client/manager.py` (modify)
|
|
77
|
+
|
|
78
|
+
- The comment at `:2174-2177` — modify — same correction. It currently justifies
|
|
79
|
+
the missing bound by the fail-open.
|
|
80
|
+
- The comment at `:683-687` — modify — it tells the operator to "fix their policy
|
|
81
|
+
file", which after the bound is unreachable via a policy file; that path is
|
|
82
|
+
constructor-only.
|
|
83
|
+
- `:2169`'s `< 1` guard and the "so none were indexed" log at `:690` —
|
|
84
|
+
**unchanged**. They remain reachable through the constructor axis, and the log
|
|
85
|
+
fix from #175 is correct independently of whether the schema accepts `0`.
|
|
86
|
+
|
|
87
|
+
### `tests/test_client_manager.py` (modify)
|
|
88
|
+
|
|
89
|
+
- `:6110` — modify — invert: `LimitsPolicy(max_tools_per_server=0)` must now
|
|
90
|
+
raise `ValidationError`. Also assert `-1` raises, since `ge=1` covers it and
|
|
91
|
+
the old bound covered neither.
|
|
92
|
+
- `:6116` and the rest of `TestZeroLimitLogsAccurately` — **keep**. They drive
|
|
93
|
+
`ClientManager(max_tools_per_server=0)` directly, which is still legal, and
|
|
94
|
+
they pin the accurate-log behaviour. Deleting them because "0 is now invalid"
|
|
95
|
+
would remove coverage of a path that still exists.
|
|
96
|
+
- The class docstring at `:6066-6075` — modify — it explains the log fix by
|
|
97
|
+
reference to a policy file setting `0`, which is no longer possible. Reframe to
|
|
98
|
+
the constructor axis so the test's stated reason matches its actual mechanism.
|
|
99
|
+
|
|
100
|
+
### `tests/test_policy_fail_open.py` or a sibling (modify/create)
|
|
101
|
+
|
|
102
|
+
- Add the end-to-end consequence: a **discovered policy file** containing
|
|
103
|
+
`max_tools_per_server: 0` now makes `PolicyManager()` raise **`ValueError`** —
|
|
104
|
+
`PolicyManager` wraps pydantic errors, so this test must follow
|
|
105
|
+
`test_policy_fail_open.py`'s existing `ValueError` / `Invalid policy file`
|
|
106
|
+
pattern and its `_discovery_paths` helper. Only the schema-level test in
|
|
107
|
+
`test_client_manager.py` sees a raw `ValidationError`, and it needs the pydantic
|
|
108
|
+
import. This is the
|
|
109
|
+
interaction between #207 and #202, and neither issue's tests cover it alone —
|
|
110
|
+
#207's tests are schema-level and #202's use a different invalid key.
|
|
111
|
+
|
|
112
|
+
## Documentation impact
|
|
113
|
+
|
|
114
|
+
- `CHANGELOG.md` — add — in a **fresh `[Unreleased]`** section. **2.7.0 is now
|
|
115
|
+
cut**, so #175's and #202's entries — including the sentence saying
|
|
116
|
+
`LimitsPolicy` still accepts `0` and that the bound is left to a follow-up —
|
|
117
|
+
sit under `## [2.7.0]` as shipped history. Leave them; they were true of that
|
|
118
|
+
release. Under `### Changed`, not `### Fixed`: a policy file with
|
|
119
|
+
`max_tools_per_server: 0` is now rejected, and via #202 that terminates
|
|
120
|
+
startup. Name the value explicitly so an affected operator can search for it.
|
|
121
|
+
- `README.md` — modify **only if** it documents `max_tools_per_server` or shows a
|
|
122
|
+
policy example carrying it; check both before editing.
|
|
123
|
+
|
|
124
|
+
## Dependencies & order
|
|
125
|
+
|
|
126
|
+
1. The `ge=1` bound and the inverted schema test.
|
|
127
|
+
2. The four comment corrections — `types.py` docstring, `manager.py:2174-2177`,
|
|
128
|
+
`manager.py:683-687`, and the `TestZeroLimitLogsAccurately` docstring.
|
|
129
|
+
3. The end-to-end discovered-policy test.
|
|
130
|
+
4. CHANGELOG.
|
|
131
|
+
|
|
132
|
+
## Verification
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
uv run pytest -q tests/test_client_manager.py -k "ZeroLimit or Limits"
|
|
136
|
+
uv run pytest -q tests/test_policy_fail_open.py
|
|
137
|
+
uv run pytest -q
|
|
138
|
+
uv run ruff check src/ tests/ && uv run ruff format --check src/ tests/ && uv run mypy src/
|
|
139
|
+
|
|
140
|
+
# The zero-limit log path must still be reachable and still accurate:
|
|
141
|
+
# construct ClientManager(max_tools_per_server=0) directly and assert the
|
|
142
|
+
# message names the limit and does not say "unparseable".
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Edge cases: `max_tools_per_server: -1` in a policy file; the value absent
|
|
146
|
+
(default 100 still applies); an explicit `--policy` carrying `0` (already fatal
|
|
147
|
+
via `fatal=True`, but assert it, since that path's message differs); a policy
|
|
148
|
+
with `limits: {}`.
|
|
149
|
+
|
|
150
|
+
## Acceptance criteria
|
|
151
|
+
|
|
152
|
+
- [ ] `LimitsPolicy(max_tools_per_server=0)` and `(-1)` both raise
|
|
153
|
+
`ValidationError`; the default of 100 still applies when the field is absent.
|
|
154
|
+
- [ ] A **discovered policy file** containing `max_tools_per_server: 0` makes
|
|
155
|
+
`PolicyManager()` raise — the #207 × #202 interaction, proven end-to-end
|
|
156
|
+
rather than inferred from the schema test.
|
|
157
|
+
- [ ] `ClientManager(max_tools_per_server=0)` **still works** and still logs the
|
|
158
|
+
accurate zero-limit message. A change that removes this path because the
|
|
159
|
+
schema now rejects `0` must not pass — the constructor axis is untouched by
|
|
160
|
+
this issue.
|
|
161
|
+
- [ ] None of the three corrected comments still asserts that auto-discovery
|
|
162
|
+
swallows validation errors — grep for `swallow` and `fatal=False` across
|
|
163
|
+
`src/` and `tests/` returns nothing describing current behaviour.
|
|
164
|
+
- [ ] Full suite green.
|
|
165
|
+
|
|
166
|
+
## Non-goals
|
|
167
|
+
|
|
168
|
+
- **Bounding `ClientManager.__init__`'s parameter.** It is a programmatic API, its
|
|
169
|
+
`< 1` guard already handles the value defensively, and #175's own review noted
|
|
170
|
+
it is not required to close the finding. Mirroring `ge=1` there is defensible
|
|
171
|
+
but is a separate decision about how strict a Python constructor should be.
|
|
172
|
+
- Any further policy-schema tightening. This is the first bound added after #202
|
|
173
|
+
removed the hazard; adding one at a time keeps the blast radius legible.
|
|
174
|
+
|
|
175
|
+
## Execution Policy
|
|
176
|
+
|
|
177
|
+
- execute: effort=low, reason=a one-field schema bound plus comment corrections;
|
|
178
|
+
the only subtlety is which existing tests invert and which must survive
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# Detailed plan: fix the IP-literal classification, and stop the docs overclaiming
|
|
2
|
+
|
|
3
|
+
> **Revision 6 (2026-08-30).** The rev-4 board found a defect of a **different
|
|
4
|
+
> class** than the five rounds before it: legacy numeric IPv4 forms
|
|
5
|
+
> (`2852039166`, `0xA9FEA9FE`, `0177.0.0.1`) fail `ip_address()`, fall into the
|
|
6
|
+
> "it's a DNS name" branch, and are **accepted** — while the resolver interprets
|
|
7
|
+
> them directly as `169.254.169.254` and `127.0.0.1`. No DNS lookup is involved.
|
|
8
|
+
> This is the most serious finding in the issue and it is **not** the deferred
|
|
9
|
+
> #211 question.
|
|
10
|
+
>
|
|
11
|
+
> **Revision 5 (2026-08-30).** Rev 4's rule was still incomplete: I found two
|
|
12
|
+
> more accepted bypasses by probing it — `::10.0.0.5` / `::127.0.0.1`
|
|
13
|
+
> (IPv4-compatible IPv6) and `::0:5efe:a00:5` (ISATAP). **This is the fifth round
|
|
14
|
+
> of "find another spelling", and that pattern is itself the finding** — see
|
|
15
|
+
> "Why this keeps happening". Rev 5's rule is verified against 26 literals,
|
|
16
|
+
> 0 mismatches.
|
|
17
|
+
>
|
|
18
|
+
> **Revision 4 (2026-08-30).** Rev 3 boarded 2 DISAGREE. Its prescribed recipe —
|
|
19
|
+
> "prefer `is_global`" — **would have left `fec0::1` broken and regressed the
|
|
20
|
+
> existing multicast test**. A rule I then drafted myself was wrong in both
|
|
21
|
+
> directions too. Rev 4 carries a rule verified against 19 literals, 0
|
|
22
|
+
> mismatches.
|
|
23
|
+
>
|
|
24
|
+
> **Revision 3 (2026-08-30).** Two board rounds. Rev 1 claimed no
|
|
25
|
+
> attacker-influenced path reached a fetch or relay — disproved. Rev 2 proposed a
|
|
26
|
+
> trust split — the board showed it would kill the elicitation feature and that
|
|
27
|
+
> its own acceptance criterion would **freeze two live classification bugs**.
|
|
28
|
+
> Scope narrowed on the operator's instruction: land the self-contained
|
|
29
|
+
> IP-literal fix here; the trust split moves to **#211** with the evidence.
|
|
30
|
+
|
|
31
|
+
## Task
|
|
32
|
+
|
|
33
|
+
Close Consiliency/pmcp#210's verifiable half. `_is_public_auth_host` classifies
|
|
34
|
+
two non-public address ranges as public, and three user-facing sentences promise
|
|
35
|
+
more than the code checks.
|
|
36
|
+
|
|
37
|
+
## What is actually broken — measured
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
100.64.0.1 CGNAT / RFC 6598 shared public=True <-- wrong
|
|
41
|
+
fec0::1 IPv6 site-local (RFC 3879) public=True <-- wrong
|
|
42
|
+
169.254.169.254 link-local IMDS public=False correct
|
|
43
|
+
::ffff:10.0.0.5 IPv4-mapped RFC1918 public=False correct
|
|
44
|
+
8.8.8.8 genuinely public public=True correct
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`_is_public_auth_host` tests `is_private or is_loopback or is_link_local or
|
|
48
|
+
is_multicast or is_unspecified`. That misses **RFC 6598 shared address space**
|
|
49
|
+
(`100.64.0.0/10`, used by carrier-grade NAT and by some cloud metadata paths) and
|
|
50
|
+
**deprecated IPv6 site-local** (`fec0::/10`). Both are non-public and both pass.
|
|
51
|
+
|
|
52
|
+
**A seat also claimed `::ffff:169.254.169.254` passes. It does not** — verified
|
|
53
|
+
above; Python's `is_private` handles the IPv4-mapped form. Recorded so the next
|
|
54
|
+
reader does not re-derive it.
|
|
55
|
+
|
|
56
|
+
**WAS WRONG (rev 2):** its acceptance criterion said "IP literals still behave as
|
|
57
|
+
today", which would have **pinned both bugs as intended behaviour**. That is the
|
|
58
|
+
same entrenching error the board caught in rev 1's criterion, in the criterion
|
|
59
|
+
written to replace it.
|
|
60
|
+
|
|
61
|
+
## Changes
|
|
62
|
+
|
|
63
|
+
### `src/pmcp/auth.py` (modify)
|
|
64
|
+
|
|
65
|
+
- `_is_public_auth_host` (`:127`) — modify — **unwrap, then classify positively.**
|
|
66
|
+
The verified rule, 19 literals, 0 mismatches on Python 3.10:
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
# Every IPv6 form that carries an IPv4 address in its low 32 bits.
|
|
70
|
+
_V4_EMBEDDING = [
|
|
71
|
+
ip_network("::ffff:0:0/96"), # RFC 4291 IPv4-mapped
|
|
72
|
+
ip_network("::/96"), # RFC 4291 IPv4-compatible (deprecated)
|
|
73
|
+
ip_network("64:ff9b::/96"), # RFC 6052 NAT64 well-known prefix
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
def _unwrap(a):
|
|
77
|
+
if isinstance(a, IPv6Address):
|
|
78
|
+
for net in _V4_EMBEDDING:
|
|
79
|
+
if a in net:
|
|
80
|
+
return IPv4Address(int(a) & 0xFFFFFFFF)
|
|
81
|
+
if (int(a) >> 32) & 0xFFFF == 0x5EFE: # RFC 5214 ISATAP
|
|
82
|
+
return IPv4Address(int(a) & 0xFFFFFFFF)
|
|
83
|
+
return a
|
|
84
|
+
|
|
85
|
+
addr = _unwrap(ip_address(hostname))
|
|
86
|
+
return (addr.is_global
|
|
87
|
+
and not getattr(addr, "is_site_local", False)
|
|
88
|
+
and not addr.is_multicast)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**WAS WRONG (rev 4):** it unwrapped only `ipv4_mapped` and NAT64. Probing it
|
|
92
|
+
found `::10.0.0.5` and `::127.0.0.1` (IPv4-compatible) and `::0:5efe:a00:5`
|
|
93
|
+
(ISATAP) still **accepted**. 6to4 (`2002::/16`) and Teredo (`2001::/32`) happen
|
|
94
|
+
to be safe because both are already non-global — luck, not design, and worth a
|
|
95
|
+
test so it stays true.
|
|
96
|
+
|
|
97
|
+
### The numeric-form bypass — a second, distinct defect
|
|
98
|
+
|
|
99
|
+
`_is_public_auth_host` treats *"`ip_address()` raised"* as *"this is a hostname,
|
|
100
|
+
accept it"*. That conflates two very different things: a name whose target is
|
|
101
|
+
unknowable without resolving (the #211 question), and **an IP address written in
|
|
102
|
+
a form this code cannot parse**. Verified:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
2852039166 ip_address() fails -> accepted resolver -> 169.254.169.254
|
|
106
|
+
0xA9FEA9FE ip_address() fails -> accepted resolver -> 169.254.169.254
|
|
107
|
+
0177.0.0.1 ip_address() fails -> accepted resolver -> 127.0.0.1
|
|
108
|
+
167772161 ip_address() fails -> accepted resolver -> 10.0.0.1
|
|
109
|
+
10.0.0.1 ip_address() parses -> rejected
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Fix:** before deciding a host is a name, try to canonicalise it as a numeric
|
|
113
|
+
address — decimal, hex, octal, and dotted variants — and if it resolves to one,
|
|
114
|
+
classify it as a literal. A host that is *not* a name must not be granted a
|
|
115
|
+
name's benefit of the doubt.
|
|
116
|
+
|
|
117
|
+
**Do not fix this by resolving.** The correct rule is: if it can be read as a
|
|
118
|
+
number, it is a literal, and literals go through the classifier. Only genuinely
|
|
119
|
+
non-numeric hosts reach the accepted-unresolved path that #211 covers.
|
|
120
|
+
|
|
121
|
+
## Why this keeps happening
|
|
122
|
+
|
|
123
|
+
Five rounds have each found another spelling of the same idea: *an IPv6 literal
|
|
124
|
+
that carries an IPv4 address*. That is the identical failure mode as this repo's
|
|
125
|
+
npm parser, which took five production fixes for the same reason — enumerating
|
|
126
|
+
forms of a thing instead of modelling it.
|
|
127
|
+
|
|
128
|
+
The difference, and the reason enumeration is defensible **here**: the set of
|
|
129
|
+
IPv4-embedding IPv6 formats is closed and specified by RFCs (4291 mapped and
|
|
130
|
+
compatible, 6052 NAT64, 3056 6to4, 4380 Teredo, 5214 ISATAP). It is a finite list
|
|
131
|
+
with citations, not an open-ended vocabulary. The rule above covers all six —
|
|
132
|
+
three by unwrapping, two because they are already non-global, one by pattern.
|
|
133
|
+
|
|
134
|
+
What makes that safe to rely on is the **test**, not the code: the matrix must
|
|
135
|
+
name every format and its RFC, so a seventh format added to the standards is a
|
|
136
|
+
visible gap rather than a silent one. Do not let the list live only in the
|
|
137
|
+
implementation.
|
|
138
|
+
|
|
139
|
+
**WAS WRONG (rev 3):** "prefer `is_global`, falling back to an explicit check".
|
|
140
|
+
`is_global` exists on every supported Python, so the fallback never runs — and
|
|
141
|
+
`is_global` is **`True` for `fec0::1`**, leaving one of the two named defects in
|
|
142
|
+
place. Two seats caught it.
|
|
143
|
+
|
|
144
|
+
**Also wrong — a rule I drafted after rev 3**, recorded because it is the
|
|
145
|
+
instructive failure: `is_global and not is_site_local and not is_reserved`
|
|
146
|
+
**rejects `::ffff:8.8.8.8`** (every IPv4-mapped address is `is_reserved`) and
|
|
147
|
+
**accepts `224.0.0.1` and `ff02::1`** (multicast is `is_global` on 3.10),
|
|
148
|
+
which would have regressed the existing multicast test at
|
|
149
|
+
`tests/test_auth.py:751`. Getting it wrong in both directions is why the rule
|
|
150
|
+
above is stated as verified output rather than reasoning.
|
|
151
|
+
|
|
152
|
+
Three mapped/embedded forms drove the design, none of which the issue named:
|
|
153
|
+
`::ffff:100.64.0.1` (mapped CGNAT — `is_private` unwraps but CGNAT is not
|
|
154
|
+
IPv4-private, so it stayed public), and `64:ff9b::a00:5` / `64:ff9b::7f00:1`
|
|
155
|
+
(NAT64 embedding `10.0.0.5` and `127.0.0.1`). NAT64 wrapping a genuinely public
|
|
156
|
+
address — `64:ff9b::808:808` → `8.8.8.8` — must still be **accepted**, which is
|
|
157
|
+
what makes unwrapping the right move rather than rejecting the prefix wholesale.
|
|
158
|
+
- The docstring — modify — state plainly that **a DNS name is accepted without
|
|
159
|
+
resolution**. That limitation is real and stays; it is #211's subject, and it
|
|
160
|
+
must be visible here rather than implied.
|
|
161
|
+
- `sanitize_public_auth_url`'s error message (`:143`) — modify — stop claiming
|
|
162
|
+
the host "must be public". Say what was checked: a non-public **IP literal**
|
|
163
|
+
was rejected. Do not imply a name was verified.
|
|
164
|
+
|
|
165
|
+
### `tests/test_auth.py` (modify)
|
|
166
|
+
|
|
167
|
+
- Extend the existing public-URL test with the two fixed ranges and the
|
|
168
|
+
already-correct ones, each named: `100.64.0.1` and `fec0::1` **rejected**;
|
|
169
|
+
`169.254.169.254`, `::ffff:10.0.0.5`, `10.0.0.5`, `127.0.0.1`, `localhost`
|
|
170
|
+
rejected; `8.8.8.8` and a public DNS name accepted.
|
|
171
|
+
- Add a test asserting the **name limitation** explicitly — that a DNS name is
|
|
172
|
+
accepted unresolved — with a comment pointing at #211. Pinning a limitation is
|
|
173
|
+
only right when it is *documented as a limitation*; rev 2's mistake was pinning
|
|
174
|
+
it as correctness.
|
|
175
|
+
|
|
176
|
+
## Documentation impact
|
|
177
|
+
|
|
178
|
+
- `CHANGELOG.md` — add — `### Fixed`: two non-public IP ranges were accepted by
|
|
179
|
+
the auth-URL host check.
|
|
180
|
+
- `README.md:168`, `README.md:173`, `SECURITY.md:39` — modify — all three promise
|
|
181
|
+
a "public host" or claim private/link-local/loopback/multicast hosts are
|
|
182
|
+
rejected. True only for IP literals. Qualify each. **`README:173` was found by a
|
|
183
|
+
seat and is absent from rev 2's list**; `SECURITY.md` was absent from rev 1's.
|
|
184
|
+
|
|
185
|
+
## Dependencies & order
|
|
186
|
+
|
|
187
|
+
1. The classification fix and its unit tests.
|
|
188
|
+
2. The message and docstring.
|
|
189
|
+
3. The three documentation sentences.
|
|
190
|
+
4. CHANGELOG.
|
|
191
|
+
|
|
192
|
+
## Verification
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
uv run pytest -q tests/test_auth.py -k public_auth_url
|
|
196
|
+
uv run pytest -q
|
|
197
|
+
uv run ruff check src/ tests/ && uv run ruff format --check src/ tests/ && uv run mypy src/
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
This host's `/tmp/package.json` and `/tmp/node_modules` make the npm identity
|
|
201
|
+
tests fail locally in a way that reproduces on a clean `main` export
|
|
202
|
+
(`tests/conftest.py`). Verify against `main` before blaming this diff, and do not
|
|
203
|
+
claim a green local suite that was not green.
|
|
204
|
+
|
|
205
|
+
## Acceptance criteria
|
|
206
|
+
|
|
207
|
+
- [ ] **All eight newly-rejected literals** fail against `main` and pass here:
|
|
208
|
+
`100.64.0.1`, `::ffff:100.64.0.1`, `fec0::1`, `64:ff9b::a00:5`,
|
|
209
|
+
`64:ff9b::7f00:1`, `::10.0.0.5`, `::127.0.0.1`, `::0:5efe:a00:5`.
|
|
210
|
+
RED-on-main required for each. Rev 3 named two of these and rev 4 named
|
|
211
|
+
five; a fix satisfying either could still admit the rest.
|
|
212
|
+
- [ ] **6to4 and Teredo are asserted rejected** (`2002:0a00:0005::1`,
|
|
213
|
+
`2001:0:0:0:0:0:0a00:0005`) even though they pass today by being
|
|
214
|
+
non-global — so the behaviour is pinned rather than incidental.
|
|
215
|
+
- [ ] **The test matrix names each embedding format with its RFC.** The list must
|
|
216
|
+
be readable as a specification, so a future format is a visible gap.
|
|
217
|
+
- [ ] **Legacy numeric forms are rejected**: `2852039166`, `0xA9FEA9FE`,
|
|
218
|
+
`0177.0.0.1`, `167772161`, and the dotted-hex/octal variants. Each must
|
|
219
|
+
fail against `main`, where all are currently accepted. Two of them resolve
|
|
220
|
+
to the cloud-metadata address.
|
|
221
|
+
- [ ] **A genuinely non-numeric host is still accepted** (`auth.example.com`), so
|
|
222
|
+
the canonicalisation does not swallow the DNS path that #211 covers.
|
|
223
|
+
- [ ] **All five must-accept literals** still pass: `8.8.8.8`, `93.184.216.34`,
|
|
224
|
+
`2001:4860:4860::8888`, `::ffff:8.8.8.8`, and `64:ff9b::808:808`. The last
|
|
225
|
+
two are the over-rejection traps — a rule using `is_reserved` fails both.
|
|
226
|
+
- [ ] **The existing multicast/link-local rejections still hold**: `224.0.0.1`,
|
|
227
|
+
`ff02::1`, `169.254.169.254`, `10.0.0.5`, `::ffff:10.0.0.5`, `127.0.0.1`,
|
|
228
|
+
`localhost`, `fc00::1`, `2001:db8::1`, `::`. A rule built on bare
|
|
229
|
+
`is_global` regresses the first two.
|
|
230
|
+
- [ ] A public DNS name is still accepted, and a test says **in its name** that
|
|
231
|
+
this is a known limitation tracked by #211 — not a correctness assertion.
|
|
232
|
+
- [ ] No error message claims a host "must be public" or was verified public.
|
|
233
|
+
Asserted on message text.
|
|
234
|
+
- [ ] `README.md:168`, `README.md:173` and `SECURITY.md:39` no longer promise
|
|
235
|
+
more than IP-literal filtering.
|
|
236
|
+
- [ ] Full suite green.
|
|
237
|
+
|
|
238
|
+
## Non-goals
|
|
239
|
+
|
|
240
|
+
- **The trust split, the fetch primitive, and the relay path** — all moved to
|
|
241
|
+
**#211**, which carries the board's evidence and the open design questions.
|
|
242
|
+
- **DNS resolution**, and **suffix denylists**. Both rejected with reasons
|
|
243
|
+
recorded in #211.
|
|
244
|
+
|
|
245
|
+
## Execution Policy
|
|
246
|
+
|
|
247
|
+
- execute: effort=low, reason=a classification predicate, its tests, and three
|
|
248
|
+
documentation sentences; the subtlety is in not pinning the bugs as behaviour
|
|
@@ -7,6 +7,62 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.7.2] - 2026-08-30
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **The public auth-URL host check accepted several non-public hosts.** Two
|
|
14
|
+
distinct defects in `_is_public_auth_host`, both reachable through auth
|
|
15
|
+
metadata, elicitation, and `resource_server_jwks_url`:
|
|
16
|
+
- The classifier subtracted a list of bad properties (`is_private`,
|
|
17
|
+
`is_loopback`, `is_link_local`, `is_multicast`, `is_unspecified`), and that
|
|
18
|
+
list had holes. RFC 6598 CGNAT (`100.64.0.0/10`) and deprecated RFC 3879
|
|
19
|
+
IPv6 site-local (`fec0::/10`) were classified as public, as were IPv4
|
|
20
|
+
addresses embedded in IPv6 literals — `64:ff9b::7f00:1` (RFC 6052 NAT64
|
|
21
|
+
carrying `127.0.0.1`), `::10.0.0.5` (RFC 4291 IPv4-compatible) and
|
|
22
|
+
`::0:5efe:a00:5` (RFC 5214 ISATAP). The check now unwraps every
|
|
23
|
+
IPv4-embedding IPv6 format and then classifies positively.
|
|
24
|
+
- **Legacy numeric host forms bypassed the check entirely.** `ip_address()`
|
|
25
|
+
raises on them, and the code read "raised" as "this is a DNS name, accept
|
|
26
|
+
it" — while a stock resolver reads `2852039166` and `0xA9FEA9FE` as
|
|
27
|
+
`169.254.169.254` and `0177.0.0.1` as `127.0.0.1`, with no DNS lookup
|
|
28
|
+
involved. Such hosts are now canonicalised (not resolved) and classified as
|
|
29
|
+
the literals they are.
|
|
30
|
+
|
|
31
|
+
Genuinely public addresses are unaffected, including public addresses carried
|
|
32
|
+
inside an embedding format (`::ffff:8.8.8.8`, `64:ff9b::808:808`) and addresses
|
|
33
|
+
that merely resemble one: ISATAP is matched on its full RFC 5214 §6.1
|
|
34
|
+
interface identifier (`00-00-5E-FE`, or `02-00-5E-FE` with the u/g bit set),
|
|
35
|
+
not on the `5efe` hextet alone, so an ordinary global address such as
|
|
36
|
+
`2606:4700::1234:5efe:a00:5` is still accepted.
|
|
37
|
+
|
|
38
|
+
Two limitations remain, both name-shaped and both tracked in #211: a DNS name
|
|
39
|
+
is accepted **without being resolved**, and so is a trailing-dot IPv4 such as
|
|
40
|
+
`169.254.169.254.`, which POSIX `inet_aton` also rejects as an address. The
|
|
41
|
+
DNS-name limitation is now stated in the docstring, `README.md` and
|
|
42
|
+
`SECURITY.md` instead of being implied away. The error message no longer claims
|
|
43
|
+
the host "must be public", since only IP literals are ever checked. (#210)
|
|
44
|
+
|
|
45
|
+
## [2.7.1] - 2026-08-30
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
- **A policy file setting `max_tools_per_server: 0` is now rejected, and via
|
|
49
|
+
#202 that terminates startup.** `LimitsPolicy.max_tools_per_server` is bounded
|
|
50
|
+
at `ge=1`; `0` — and any negative value — no longer validates. **This can stop
|
|
51
|
+
a gateway that starts today.** If your policy file (`.mcp-gateway-policy.yaml`
|
|
52
|
+
/ `.json`, or `~/.claude/gateway-policy.yaml` / `.json`) contains the literal
|
|
53
|
+
line `max_tools_per_server: 0`, the gateway will refuse to start with
|
|
54
|
+
`Invalid policy file ...`; remove the line to take the default of `100`, or
|
|
55
|
+
set the number of tools you actually want indexed. Such a gateway indexed no
|
|
56
|
+
tools at all before, so the value is unlikely to be in deliberate use — but
|
|
57
|
+
the failure is a hard one and worth searching for. 2.7.0 shipped the log fix
|
|
58
|
+
for this value and deliberately left the bound out: at that time a discovered
|
|
59
|
+
policy that failed validation was discarded in favour of the allow-all
|
|
60
|
+
default, so rejecting one value would have silently discarded the operator's
|
|
61
|
+
entire policy file. #202, in the same release, made that case fatal, which is
|
|
62
|
+
what makes the bound safe to add. `ClientManager`'s `max_tools_per_server`
|
|
63
|
+
constructor parameter is a separate, programmatic axis and is unchanged — it
|
|
64
|
+
still accepts `0` and still logs that nothing was indexed. (#207)
|
|
65
|
+
|
|
10
66
|
## [2.7.0] - 2026-08-29
|
|
11
67
|
|
|
12
68
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pmcp
|
|
3
|
-
Version: 2.7.
|
|
3
|
+
Version: 2.7.2
|
|
4
4
|
Summary: PMCP - Progressive MCP: Minimal context bloat with on-demand tool discovery
|
|
5
5
|
Project-URL: Repository, https://github.com/Consiliency/pmcp
|
|
6
6
|
Project-URL: Homepage, https://github.com/Consiliency/pmcp
|
|
@@ -229,15 +229,21 @@ audience is bound to the configured `resource_server_audience` (the server's
|
|
|
229
229
|
canonical resource URI, per RFC 8707); it is never derived from the request
|
|
230
230
|
Host header. `resource-server` mode fails closed at startup if the issuer,
|
|
231
231
|
JWKS URL, or audience is missing, and `resource_server_jwks_url` must be an
|
|
232
|
-
`https` URL
|
|
233
|
-
operator-configured
|
|
234
|
-
`RS256`/`ES256`); the
|
|
232
|
+
`https` URL and is rejected when its host is a non-public IP literal. Token
|
|
233
|
+
signatures are only accepted for the operator-configured
|
|
234
|
+
`resource_server_allowed_algorithms` allowlist (default `RS256`/`ES256`); the
|
|
235
|
+
token's own `alg` header is never trusted. JWKS is fetched
|
|
235
236
|
asynchronously and cached, so validation never blocks the event loop; an
|
|
236
237
|
unreachable JWKS endpoint returns `503` while an invalid token returns `401`.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
In public auth metadata URLs it rejects hosts written as non-public **IP
|
|
239
|
+
literals** — private, CGNAT, link-local, loopback, multicast, site-local, and
|
|
240
|
+
unspecified — including IPv4 addresses embedded in IPv6 literals and legacy
|
|
241
|
+
numeric forms such as `2852039166`. This is a filter on literals only: a DNS
|
|
242
|
+
name is accepted **without being resolved**, so a name that points at an
|
|
243
|
+
internal address still passes
|
|
244
|
+
([#211](https://github.com/Consiliency/pmcp/issues/211)). PMCP is still not an
|
|
245
|
+
Authorization Server and does not provide dynamic client registration, SSO,
|
|
246
|
+
RBAC, billing, or a complete multi-tenant identity service.
|
|
241
247
|
|
|
242
248
|
Auth mode and OAuth resource-server parameters are configurable from the CLI or
|
|
243
249
|
environment (CLI flags take precedence; env values are read only when the flag
|
|
@@ -165,15 +165,21 @@ audience is bound to the configured `resource_server_audience` (the server's
|
|
|
165
165
|
canonical resource URI, per RFC 8707); it is never derived from the request
|
|
166
166
|
Host header. `resource-server` mode fails closed at startup if the issuer,
|
|
167
167
|
JWKS URL, or audience is missing, and `resource_server_jwks_url` must be an
|
|
168
|
-
`https` URL
|
|
169
|
-
operator-configured
|
|
170
|
-
`RS256`/`ES256`); the
|
|
168
|
+
`https` URL and is rejected when its host is a non-public IP literal. Token
|
|
169
|
+
signatures are only accepted for the operator-configured
|
|
170
|
+
`resource_server_allowed_algorithms` allowlist (default `RS256`/`ES256`); the
|
|
171
|
+
token's own `alg` header is never trusted. JWKS is fetched
|
|
171
172
|
asynchronously and cached, so validation never blocks the event loop; an
|
|
172
173
|
unreachable JWKS endpoint returns `503` while an invalid token returns `401`.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
In public auth metadata URLs it rejects hosts written as non-public **IP
|
|
175
|
+
literals** — private, CGNAT, link-local, loopback, multicast, site-local, and
|
|
176
|
+
unspecified — including IPv4 addresses embedded in IPv6 literals and legacy
|
|
177
|
+
numeric forms such as `2852039166`. This is a filter on literals only: a DNS
|
|
178
|
+
name is accepted **without being resolved**, so a name that points at an
|
|
179
|
+
internal address still passes
|
|
180
|
+
([#211](https://github.com/Consiliency/pmcp/issues/211)). PMCP is still not an
|
|
181
|
+
Authorization Server and does not provide dynamic client registration, SSO,
|
|
182
|
+
RBAC, billing, or a complete multi-tenant identity service.
|
|
177
183
|
|
|
178
184
|
Auth mode and OAuth resource-server parameters are configurable from the CLI or
|
|
179
185
|
environment (CLI flags take precedence; env values are read only when the flag
|
|
@@ -36,7 +36,8 @@ PMCP is a local-first MCP gateway. Its default security posture assumes:
|
|
|
36
36
|
are only accepted for the operator-configured algorithm allowlist (default
|
|
37
37
|
`RS256`/`ES256`); the token's own `alg` header is never trusted. The mode
|
|
38
38
|
fails closed at startup without an issuer, JWKS URL, and audience, and the
|
|
39
|
-
JWKS URL must be `https`
|
|
39
|
+
JWKS URL must be `https` and is rejected when its host is a non-public IP
|
|
40
|
+
literal (see the DNS-name limitation below). JWKS is fetched asynchronously and
|
|
40
41
|
cached so validation never blocks the event loop; an unreachable JWKS endpoint
|
|
41
42
|
returns `503` while an invalid or wrong-audience token returns `401`.
|
|
42
43
|
- Timing oracle attacks on token comparison (`hmac.compare_digest`)
|
|
@@ -64,6 +65,15 @@ PMCP is a local-first MCP gateway. Its default security posture assumes:
|
|
|
64
65
|
|
|
65
66
|
### Known limitations
|
|
66
67
|
|
|
68
|
+
- **The auth-URL host check filters IP literals only**: a public auth metadata
|
|
69
|
+
or JWKS URL is rejected when its host is a non-public IP literal — private,
|
|
70
|
+
CGNAT, link-local, loopback, multicast, site-local or unspecified, including
|
|
71
|
+
IPv4 addresses embedded in IPv6 literals (RFC 4291 mapped and compatible,
|
|
72
|
+
RFC 6052 NAT64, RFC 3056 6to4, RFC 4380 Teredo, RFC 5214 ISATAP) and legacy
|
|
73
|
+
numeric forms such as `2852039166` or `0177.0.0.1`. **A DNS name is accepted
|
|
74
|
+
without being resolved**, so a name pointing at an internal address is not
|
|
75
|
+
caught. Tracked in
|
|
76
|
+
[#211](https://github.com/Consiliency/pmcp/issues/211).
|
|
67
77
|
- **No mTLS**: clients are not authenticated by certificate; only Bearer token.
|
|
68
78
|
- **No per-tool ACL on HTTP**: any valid token can invoke any tool. Tool-level policy is
|
|
69
79
|
enforced at the MCP layer, not the HTTP layer.
|