Cloudflare Tunnel: docs imply top-level originRequest.access applies to all ingress rules, but cloudflared silently ignores it

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

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

@nikitacano がすでに取り組んでいます。

2026年7月10日 から。

評価

この issue はまだ評価されていません。

説明

product:cloudflare-one stale

Which pages are affected?

What is wrong?

The "Origin configuration" section teaches that a top-level originRequest block sets defaults for all ingress rules, and the access parameter page says to "add the following rule to originRequest" without qualifying where. Following the two pages together, a reasonable reading is that this protects every service behind the tunnel:

originRequest:
  access:
    required: true
    teamName: <team>
    audTag:
      - <aud>

ingress:
  - hostname: app.example.com
    service: http://localhost:8000
  - service: http_status:404

In reality cloudflared silently ignores a top-level access block. The config validates, no warning is logged, and unauthenticated traffic is forwarded to the origin. The JWT validation middleware is only attached when the access block sits under an individual ingress rule: validateIngress in ingress/ingress.go reads the raw per-rule r.OriginRequest.Access, not the merged defaults (the merge in ingress/config.go copies the top-level block, but its result is never consulted for middleware attachment).

Verified on cloudflared 2026.7.1 with an A/B test against the same hostname (no Access app on the hostname, so no JWT on any request): top-level block returned 200 from the origin; the identical block moved under the ingress rule returned 403 from cloudflared.

This is a known cloudflared behaviour: cloudflare/cloudflared#784 (open since 2022) reports it, and a maintainer described it as "largely intended" because Access rules are tied to hostnames. The docs have not been updated to match, which matters because the failure mode is a security control that users believe is active but is not (see also the last comment on that issue).

Suggested fix

  1. In the configuration-file partial's "Origin configuration" section, note that access is an exception to top-level inheritance and must be set on each ingress rule.
  2. In the origin-parameters partial's access section, state explicitly that the block must be placed under originRequest of each individual ingress rule, and that a top-level block is not enforced.
主要言語
MDX
スター
5.4k
フォーク
17.3k
平均マージ
1日 20時間
マージ済み PR(30日)
525

環境構築

はじめの一歩

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

cloudflare/cloudflare-docs のほかの issue

cloudflare/cloudflare-docs の issue をすべて見る

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

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