Cloudflare Tunnel: docs imply top-level originRequest.access applies to all ingress rules, but cloudflared silently ignores it
Maintainer thường phản hồi trong vòng 1 ngày
@nikitacano đang làm issue này rồi.
Từ ngày 10/7/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Which pages are affected?
- https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/do-more-with-tunnels/local-management/configuration-file/#origin-configuration
(source:src/content/partials/cloudflare-one/tunnel/locally-managed/configuration-file.mdx) - https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/configure-tunnels/origin-parameters/#access-settings
(source:src/content/partials/cloudflare-one/tunnel/origin-parameters.mdx)
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
- In the configuration-file partial's "Origin configuration" section, note that
accessis an exception to top-level inheritance and must be set on each ingress rule. - In the origin-parameters partial's
accesssection, state explicitly that the block must be placed underoriginRequestof each individual ingress rule, and that a top-level block is not enforced.
- Ngôn ngữ chính
- MDX
- Star
- 5.4k
- Fork
- 17.3k
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 498
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 cloudflare/cloudflare-docs
-
effort:medium engineering
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
cloudflare/cloudflare-docs#34994 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
BIMI records for DNSCó thể đã có người làm @ayushkrsingh946 đã nhận 9 ngày trước. Đang mởcontent:new documentation effort:very-high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
cloudflare/cloudflare-docs#34744 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
effort:medium engineering
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
cloudflare/cloudflare-docs#34619 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Incorrect local link is used in Stream documentationCó thể đã có người làm @AiAlchemist0 đã nhận 16 ngày trước. Đang mởeffort:medium engineering
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
cloudflare/cloudflare-docs#34497 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
meeting.chatSynced bugĐang mởeffort:medium engineering
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
cloudflare/cloudflare-docs#34464 ·
Maintainer thường phản hồi trong vòng 1 ngày