Enterprise MCP registry unreachable on macOS: rustls rejects private CA cert (Apple -67901), fail-closed blocks all MCP
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Describe the bug
On macOS, Copilot CLI 1.0.78 fails to validate MCP servers against an enterprise custom MCP registry because TLS verification rejects the registry's private-CA certificate with Apple error -67901 (certificate is not standards compliant).
The CLI then treats the registry as unreachable and fail-closes: all non-default / custom MCP servers are reported as blocked by policy, even though:
- the registry is reachable over HTTPS from the same machine (
curl/ Nodefetchreturn HTTP 200) - Chrome trusts and displays the certificate without issue
- the same servers are listed in the enterprise registry and were usable with an earlier CLI version (allowlist check previously went through the Node/JS path)
This looks like a regression from moving the MCP registry allowlist HTTP client into the Rust runtime (reqwest + rustls-platform-verifier / Apple Security.framework), which applies stricter Apple TLS rules than Node/Chrome.
Affected version
- GitHub Copilot CLI 1.0.78 (auto-updated ~2026-08-03 / 2026-08-04)
- macOS 26.x (Apple Silicon)
- Enterprise / org Copilot policy: custom MCP Registry URL + Registry only allowlist
Previously worked on an earlier 1.x CLI where registry allowlist verification still lived in the JS/app.js path (Node TLS). After 1.0.78, the same check appears in the native runtime (rustls_platform_verifier::verification::apple) and fails.
Steps to reproduce
- Configure an org/enterprise Copilot MCP registry URL pointing at an internal HTTPS registry (private PKI), with Restrict MCP access to registry servers = Registry only.
- Add one or more registry-listed MCP servers to
~/.copilot/mcp-config.json(or via/mcp add). - Start Copilot CLI with
--log-level debug(or run/mcp reload). - Observe custom MCP servers blocked by policy.
Expected behavior
- Registry HTTPS fetch should succeed for a certificate that the OS / Chrome / Node already trust for that host, or
- If Apple TLS policy rejects the leaf (e.g. validity period), the CLI should surface a clear TLS/certificate error (not a generic “blocked by policy”), and ideally provide a documented enterprise path (fail-open option, private-CA guidance, or less strict verification for admin-configured registry URLs).
Actual behavior
User-facing:
! 3 MCP servers were blocked by policy: '<server-a>', '<server-b>', '<server-c>'
Debug log (redacted host):
[DEBUG] Registry https://<REDACTED-INTERNAL-REGISTRY>/: servers will be verified against this registry
[DEBUG] starting new connection 'Some("<REDACTED-INTERNAL-REGISTRY>")'
[ERROR] failed to verify TLS certificate: invalid peer certificate: Other(OtherError("“*.<REDACTED-INTERNAL-DOMAIN>” certificate is not standards compliant: -67901"))
log.target=rustls_platform_verifier::verification::apple
[DEBUG] Registry https://<REDACTED-INTERNAL-REGISTRY>/ unreachable when checking server "<server-id>" after 3 attempts:
error sending request for url (https://<REDACTED-INTERNAL-REGISTRY>/v0.1/servers/<server-id>/versions/latest)
[ERROR] MCP server "<server-id>" filtered: Registry https://<REDACTED-INTERNAL-REGISTRY>/ was unreachable
Telemetry kinds observed: mcp_policy_check, mcp_allowlist_policy_check.
Same host from the same machine:
curl→ TLS OK, HTTP 200 on/v0/serversand/v0.1/servers- Node
fetch→ OK - Chrome certificate viewer → trusts leaf issued by internal CA
Certificate details (redacted)
- Subject CN / SAN:
*.<REDACTED-INTERNAL-DOMAIN> - Issuer: internal enterprise PKI (private CA)
- Validity window: ~1095 days (issued Jan 2026 → expires Jan 2029)
- Apple trusted-certificate guidance requires leaf validity ≤ 825 days for certs issued after 2019 — this is the likely trigger for
-67901/ “not standards compliant” - Fingerprint available privately if needed; hostnames intentionally redacted
Additional context / analysis
Local package comparison on disk:
| CLI package | Allowlist / registry verify strings | TLS stack for that check |
|---|---|---|
| 1.0.58 / 1.0.59 / 1.0.61 | Present in app.js |
Node |
| 1.0.78 | Present in runtime.node, removed from app.js |
Rust + rustls_platform_verifier (Apple) |
So this is not “registry down” and not (yet) an identity fingerprint mismatch (does not match the registered server identity). The allowlist never reaches a successful registry HTTP response.
Related but distinct issues: #2481 / #2498 (policy fetch 404), #3934 (identity mismatch), #4346 (403 in CI). This report is specifically TLS verification of the enterprise registry URL on macOS after the Rust migration.
Asks
- Confirm whether enterprise MCP registry fetches are intentionally pinned to
rustls-platform-verifieron macOS. - Improve error UX: distinguish TLS/cert rejection from policy deny / true unreachability.
- Consider enterprise-friendly options: honor OS trust more like Chrome for admin-configured registry URLs, document Apple 825-day constraint for private PKI, or provide a supported workaround short of reissuing certs / switching policy to Allow all.
- Optionally fail-open (or cache last-good registry allowlist) when the configured registry URL fails TLS, similar to other managed-settings fail-open work in 1.0.78 — today MCP custom servers are hard-blocked.
Happy to provide more info if needed!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
app.js と runtime.node のレジストリ検証パスを比較し、続いて macOS の失敗を rustls_platform_verifier::verification::apple 経由で追跡します。デバッグログを有効にしてプライベート CA のケースを再現し、証明書の拒否とポリシーによる拒否を区別します。失敗が正確に表面化され、サポートされるエンタープライズ向けの処理が文書化されるか、issue で選択した設計によってカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- macos, node.js, rust
- 領域
- cli, networking, security
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100