Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the JSPolicyEvaluationContext #29267

Open
bahner opened this issue May 3, 2024 · 0 comments
Open

Extend the JSPolicyEvaluationContext #29267

bahner opened this issue May 3, 2024 · 0 comments
Labels
kind/enhancement Categorizes a PR related to an enhancement status/triage

Comments

@bahner
Copy link

bahner commented May 3, 2024

Description

The evaluation available in JavaScript policies is very restricted. Concretely I wanted to create a "DebySelfElevation" policy which matched the id of the context identity() with the userId being added to a group. I could for example have solved this by parsing the requestPath, but that is not available, as far as I can tell.

Please consider add the KeycloakSession to the evaluation context or a subset there of.

Discussion

No response

Motivation

I will greatly enhance what's possible to achieve in javascript policies

Details

Adding this data to $evaluation, seem like a minor task. setXXX() functions should not be available and as such there doesnæt seem to be any major security vectors, which arise from this. Since JavaScripts policies are provided as jar files, this is also not something that users will be able to exploit in any meaningful way with regards to leakage of PII.

@bahner bahner added kind/enhancement Categorizes a PR related to an enhancement status/triage labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes a PR related to an enhancement status/triage
Projects
None yet
Development

No branches or pull requests

1 participant