Skip to content

v0.28.72

Choose a tag to compare

@zalando-robot zalando-robot released this 09 Nov 15:21
8092f7d

Changes

security fix: authz filter oidcClaimsQuery should evaluate on the cleaned request path (#4409)

Repro: on a route with oauthOidcAnyClaims(...) -> oidcClaimsQuery("/login:groups.#[==\"appX-Tester\"]", "/:@_:email%\"*@example.org\"") (the example from the filter docs), log
in as an example.org user who is not in appX-Tester. GET /login/page returns 401 as expected, but GET //login/page,
/./login/page and /x/../login/page return 200 and the backend
receives those paths unchanged. Backends that normalise the path, such
as nginx or Tomcat, then serve /login/page.
Cause: routing selects the route with httppath.Clean(r.URL.Path), but
oidcClaimsQuery (and its alias grantClaimsQuery) picks the first
matching prefix with strings.HasPrefix on the raw r.URL.Path. A
non-canonical spelling of /login misses the /login rule and is
checked against / instead.
Fix: evaluate the claim queries on the same cleaned path that routing
uses. The forwarded path is unchanged.
TestOIDCQueryClaimsFilterCleanPath logs in through / and requests
the four spellings of /login/page; the three non-canonical ones get
200 on master and 401 with the patch.

Multiarch Docker image

Multiarch Docker image is available in GitHub's docker registry:

docker run -it ghcr.io/zalando/skipper:v0.28.72 skipper --help