[compliance] Compliance Gap: Entra auth fields undocumented in spec 7.6 and OIDC missing-env behavior conflicts with 7.6.1

オープン
#17,106 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
15/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, json

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

automation compliance specification

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 when provider: "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

Generated by Daily Compliance Checker · copilot · routed: haiku55 xhigh · ~44 AIC · ⊞ 8K · ◷

主要言語
Go
スター
190
フォーク
61
平均マージ
7時間 35分
マージ済み PR(30日)
215

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/gh-aw-mcpg のほかの issue

github/gh-aw-mcpg の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。