8000 Repeated-leading-slash path can bypass policy-enforcer denial · Issue #266 · keycloak/keycloak-client · GitHub
[go: up one dir, main page]

Skip to content

Repeated-leading-slash path can bypass policy-enforcer denial #266

< 7463 svg data-component="Octicon" aria-hidden="true" focusable="false" class="octicon octicon-issue-opened statusLabelIcon__ARJYXr" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom">Backlog

Description

@mjatin2007

Describe the bug

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0