[compliance] Compliance Gap: Entra auth fields undocumented in spec 7.6 and OIDC missing-env behavior conflicts with 7.6.1
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go, json
- Lĩnh vực
- authentication, documentation
Hướng nghiên cứu
Start in docs/src/content/docs/reference/mcp-gateway.md at §7.6 and §7.6.1, then compare them with internal/config/validation_server.go (lines 233-256) and the schema at internal/config/schema/mcp-gateway-config.schema.json. Two tests, TestLoadFromFile_OIDCAuthMissingEnvVar in internal/config/config_core_test.go and internal/config/validation_test.go, show the fail-fast behavior. Done means maintainers have decided which contract is correct and the spec or the code has been changed to match, with the Azure fields documented or scoped as an extension.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
MCP Gateway Compliance Review — 2026-11-22
Summary
Reviewed commits 97e8cb6a8..6edab3233 (57 commits) against MCP Gateway Specification 1.18.0 (blob b3c82951, unchanged). Two Important findings. Everything else checked was compliant: digest-pinned container images (§4.1.2), forcePublicRepos precedence (§4.1.3.8), OIDC header overwrite and 60-second refresh margin (§7.6.1), and the redirect-suppression consolidation (no upstream path bypasses doWithoutFollowingRedirects).
Go tests could not run in this environment (module proxy TLS verification failed), so this review is static.
Important Issues (SHOULD / spec-drift)
1. Entra/Azure auth fields are implemented but not in the specification
Specification Section: 7.6 Upstream Authentication (OIDC) and 4.1.2 Server Configuration Fields
Current State: The auth object accepts provider (only "azure"), azureTenantId, azureClientId, azureScope, and azureCloud. These are implemented and enforced in:
internal/config/config_core.go:305-319(struct fields)internal/config/validation_server.go:233-243(required tenant and client ID whenprovider: "azure")internal/config/schema/mcp-gateway-config.schema.json(auth.properties,additionalProperties: false)internal/oidc/azure.go:23-25(AzureDefaultAudience = "(azureadtokenexchange/redacted)",AzureDefaultScope)internal/launcher/launcher.go:178-197(token exchange wiring)
Spec 1.18.0 §7.6.1 documents only type and audience, and contains no reference to Azure or Entra. The schema and implementation therefore exceed the specification.
Gap: Implementations and the schema accept fields the specification does not define, so conformance cannot be checked from the spec. Spec 4.3.1 requires rejecting unrecognized fields, which the spec's own field list does not cover for auth.
Suggested fix: Either document provider, azureTenantId, azureClientId, azureScope, and azureCloud in §7.6 (with a changelog entry and the Entra defaults), or confirm this is an out-of-spec extension and scope it accordingly. Related: #16955 (Entra OIDC support, closed).
2. Spec §7.6.1 step 2 conflicts with config-time OIDC fail-fast
Specification Section: 7.6.1 GitHub Actions OIDC, Behavior step 2
Requirement:
"If a server has
auth.type: "github-oidc"but the OIDC env vars are missing, the gateway MUST log an error at startup and MUST return an error when the server is first accessed."
Current State: internal/config/validation_server.go:245-256 rejects the configuration at load time when ACTIONS_ID_TOKEN_REQUEST_URL is unset. Tests TestLoadFromFile_OIDCAuthMissingEnvVar (internal/config/config_core_test.go:897) and internal/config/validation_test.go:1155 lock in this behavior. The launcher's defensive fallback (internal/launcher/launcher.go:100) only runs when validation was bypassed.
Gap: The code fails at config load (startup refuses to start with the server configured). The spec requires a startup log plus a deferred error on first access. The behavior was chosen deliberately in #3364 and #3538 (fail-fast), so the spec and implementation disagree. Spec owners should decide which contract is correct.
Suggested fix: Spec owners should either revise §7.6.1 step 2 to match fail-fast config validation (preferred, since it matches the merged decision), or the implementation should defer the error to first access. Do not change code until the spec direction is set.
Compliance Status
- ✅ Configuration Format and digest-pinned images (§4.1.2): Compliant
- ✅ forcePublicRepos precedence (§4.1.3.8): Compliant
- ✅ Protocol behavior, authentication header handling (§5, §7.1): Compliant
- ✅ OIDC header overwrite and refresh margin (§7.6.1 steps 3–4): Compliant
- ⚠️ OIDC auth fields (§7.6): Implemented beyond the spec (Finding 1)
- ⚠️ OIDC missing-env behavior (§7.6.1 step 2): Conflicts with implementation (Finding 2)
- ⚠️ Stdout error channel (§9.1/§9.2): Tracked separately in #16553 (closed, not_planned); not re-filed
References
- MCP Gateway Specification (v1.18.0)
- Related: #16553, #16955, #3364, #3538
- Commit range reviewed:
97e8cb6a8..6edab3233
Generated by Daily Compliance Checker · copilot · routed: haiku55 xhigh · ~44 AIC · ⊞ 8K · ◷
- Ngôn ngữ chính
- Go
- Star
- 190
- Fork
- 61
- Merge trung bình
- 7 giờ 35 phút
- Pull request đã merge (30 ngày)
- 215
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/gh-aw-mcpg
-
automated-analysis code-quality refactoring
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/gh-aw-mcpg#17105 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
smoke-copilot
Độ khó 3/5 1-3 giờ Mức phù hợp với người mới 8/100
github/gh-aw-mcpg#17112 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automation mcp-gateway test
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 5/100
github/gh-aw-mcpg#17110 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Smoke Copilot - Issue GroupĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 4/100
github/gh-aw-mcpg#17090 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Smoke Copilot - Issue GroupĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 5/100
github/gh-aw-mcpg#17089 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của github/gh-aw-mcpg
Issue tương tự
-
go good first issue test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[UI] Guard webApis against undefined window in SSR environmentsCó thể đã có người làm @madhavzanwar đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày