Repository navigation
[Automated] Draft docs (agentgateway): csrf: treat Origin: null as a cross-origin request (+1 related) - #1381
Open
github-actions[bot] wants to merge 4 commits into
Open
github-actions[bot] wants to merge 4 commits into
github-actions[bot] wants to merge 4 commits into
Conversation
…cross-origin request (+1 related) Signed-off-by: GitHub Action <action@github.com>
Deploying agentproxy with
|
| Latest commit: |
9d59db9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6535c671.agentproxy.pages.dev |
| Branch Preview URL: | https://pr-tracker-draft-agentgatewa-kjj4.agentproxy.pages.dev |
Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Signed-off-by: Art Berger <art.berger@solo.io>
- The Origin check compares host and port (URI authority), not the host alone. Verified live on b75bb313: https://localhost vs Host localhost:4301 is rejected, and https://localhost:4301 is allowed. - additionalOrigins: null exempts Origin: null whether or not the request sends Sec-Fetch-Site (csrf.rs is_request_exempt). - Gate the asset text with upstream version tokens only. Signed-off-by: Art Berger <art.berger@solo.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[agentgateway/agentgateway#4090 + agentgateway/agentgateway#4091](agentgateway/agentgateway#4090 and agentgateway/agentgateway#4091) — CSRF origin handling
Docs versions:
standalone/main,kubernetes/mainWhat changes for users: CSRF validation treats
Origin: nullas cross-origin on requests withoutSec-Fetch-Site, so those requests are rejected unlessadditionalOriginsincludesnull. The same-origin fallback compares theOriginhost to the requestHostand ignores the scheme, which covers TLS-terminating proxy setups.What the docs now say: The standalone CSRF page now lists the scheme-insensitive same-origin check, the
Origin: nullrejection, and theadditionalOriginsexception. The Kubernetes CSRF guide now says the same for kubernetes/main through a version-gated shared asset.Not verified: No cluster or local proxy was run; the configuration and request examples are unrun.
How
agentgateway-4090was drafted, and what was not verifiedPlan, and what changed it
changed-functions.mdshowed one shared CSRF behavior change;hugo.yamlandversion-gates.mdshowed that the Kubernetes body is a shared asset that needs a main-only gate.Why a documentation change is necessary
The existing CSRF pages already explain same-origin checks and
additionalOrigins, but they did not say how the fallback treats schemes or opaque origins. #4090 removes the special case that treatedOrigin: nullas no origin, so a request withoutSec-Fetch-Siteis rejected unlessnullis trusted. #4091 changes the same-origin fallback to compare only theOriginhost with the requestHost, so readers behind a TLS-terminating proxy need the scheme-insensitive rule.What changed on disk
assets/agw-docs/pages/security/csrf.md- Added a kubernetes/main-only note about scheme-insensitive host matching andOrigin: null, plus theadditionalOriginsexception in the field table.content/docs/standalone/main/documentation/configuration/security/csrf.md- Added the same behavior to the standalone main CSRF page and updated the allowed/blocked request lists.How to verify this change
content/docs/kubernetes/main/documentation/security/csrf.md, then send a state-changing request withHost: www.example.com,Origin: null, and noSec-Fetch-Siteheader. The response is403 Forbidden.Host: www.example.com,Origin: https://www.example.com, and noSec-Fetch-Siteheader. The response is200 OK, because the fallback compares only the host.nulltospec.traffic.csrf.additionalOriginsand repeat theOrigin: nullrequest. The response is200 OK.What was not verified
The configuration was not applied to a cluster, and the standalone proxy was not run locally. All commands and requests in this report are unrun.
Counterpart sections not drafted:
kgateway-dev/kgateway.dev:assets/kgw-docs/pages/security/csrf.mdhas a metrics section, but the dossier does not include CSRF metric names or metric behavior changes for agentgateway.kgateway-dev/kgateway.dev:assets/kgw-docs/pages/security/csrf.mdhas separate Before you begin and Cleanup sections. The Kubernetes page already has prerequisites and cleanup content, and the standalone target is a configuration reference page rather than a full traffic guide.How the pages were chosen (triage report)
Feature clusters
These pull requests document one feature between them:
assets/agw-docs/pages/security/csrf.md, so this looks like one change split across pull requests and separate drafts would conflictDraft a documentation change
agentgateway/agentgateway#4090 — csrf: treat Origin: null as a cross-origin request
agentgateway/websiteOrigin: nullto "no Origin", which is then allowed. Go does not do this: only an empty Origin is allowed, and "null" parses with an empty host that never matches the request host, so it is rejected.agentgateway/agentgateway#4091 — csrf: compare only the Origin host, ignoring scheme
agentgateway/websiteOrigin: https://example.comnever matched ourhttp://example.comand every state-changing request was rejected.Release notes
This pull request also adds its release-note entries:
content/docs/kubernetes/main/release-notes/release-notes.md: csrf: treat Origin: null as a cross-origin request (fix, under Security)content/docs/standalone/main/release-notes/release-notes.md: csrf: treat Origin: null as a cross-origin request (fix, under Security)Check these release-note links and names. Each note is on its page, but a link may not reach the drafted content there, or a name may belong to the other mode:
content/docs/kubernetes/main/release-notes/release-notes.md: csrf: treat Origin: null as a cross-origin request agentgateway#4090's note namesOrigin: null, whichcontent/docs/standalone/mainmentions andcontent/docs/kubernetes/maindoes not. Check that this tree's readers can set it, or word the note for this mode.content/docs/kubernetes/main/release-notes/release-notes.md: csrf: treat Origin: null as a cross-origin request agentgateway#4090's note namesSec-Fetch-Site, whichcontent/docs/standalone/mainmentions andcontent/docs/kubernetes/maindoes not. Check that this tree's readers can set it, or word the note for this mode.Draft branch:
pr-tracker-draft-agentgateway-4090-plus1Important
The test suite has not run on this pull request. It was opened by
github-actions[bot], and GitHub does not start workflows for pull requests opened with the repository's own token. Doc tests, link checking and the static checks are held asaction_requireduntil somebody presses Approve and run on the Checks tab. Cloudflare Pages and DCO are GitHub Apps rather than Actions, so those two do run on their own.Please approve the checks before reviewing the content: an absence of failures here means the tests have not run, not that they passed.