You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Repeated-leading-slash path can bypass policy-enforcer denial #266
With the generic Jakarta policy-enforcer filter on Tomcat, a repeated-leading-slash path can produce a different authorization result instead of going through normal permission evaluation. The same defect is publicly tracked in keycloak/keycloak#55374; I am opening this here because the fix belongs in Keycloak Client.
Version
Current keycloak-client main (4e8dc2a47cbf9151830c080c9ee07f2dc13fe8d2).
Expected behavior
A repeated-leading-slash request to a protected resource should go through normal permission evaluation. The loop-prevention shortcut should continue to apply to the exact local deny page using the existing normalized comparison.
Actual behavior
A repeated-leading-slash request can take the deny-page shortcut and produce an inconsistent authorization result for an authenticated user without a matching permission.
How to Reproduce?
See the affected-scope discussion in keycloak/keycloak#55374. Regression coverage and commit-bound validation results will accompany the pull request. AI-agent-run validation so far was limited to a signed-token test environment; other containers, proxies, HTTP/2 and a full production login/session were not tested.
Anything else?
The proposed change is limited to policy-enforcer deny-page handling and its regression tests. Excluding other absolute and authority-bearing request forms from the shortcut is hardening; no additional bypass was demonstrated. Discovery and reporting: Yunfei Yang. Proposed implementation and validation contribution: Jatin Mannepalli.
AI agents also ran the validation described above.
An AI agent was used to generate a complete solution from a prompt. I understand the changes and am responsible for explaining and revising them, responding to review feedback, and ensuring Apache-2.0 licensing compliance.
Activity