Repository navigation
Replies: 3 comments
|
I changed the code to MAC sign a claims token. I'm signing with the services client secret and is sent from the resource server, but the user's token is issued for a public client. Any way I can do this? |
|
Hi @dsmith-to, Did you solve this problem? I am also trying to ABAC using my own custom javascript policy and I would like to pass extra 'attributes' to keycloak which will be used in evaluation. How to do this? These attributes are dynamic - meaning. Depending on instance of 'resource', it can be different. Resource Server will know this attribute from 'REST API request' sent by client. Resource Server will extract these "attributes" and pass it to Keycloak (PDP). |
|
You could achieve that using Keycloak Policy enforcer, and enhance the REST endpoint with “ Claim Information Point”. I have done that and the endpoint will be called automatically to retrieve additional. A sample how to add Claim Information Point: And the in a JavaScript Policy you can access this data and put it you policy business logic, below a sample code of JS Policy that uses the data supplied by the Claim Information Point: I hope this could help you find a solution for your requirement. |
Uh oh!
There was an error while loading. Please reload this page.
We have Java services that use AuthzClient to retrieve permission for a user. Until now we have been using primarily for RBAC policies.
We have a new ABAC requirements for which we have enable Javascript policies. These policies require addition context from the service to evaluate the permissions. Specifically, we want to pass a company_id and grant access based on users inclusion in company-specific roles.
I was led to believe (by a chatbot) that we could provided additional context attributes to the JS-policy using AuthorizationRequest.setClaims but this doesn't seem to be the case. Is there any way to do this?
All reactions