-
Notifications
You must be signed in to change notification settings - Fork 90
feat(jans-cedarling): implement mapping JWT payload to cedar-policy
entity
#10169
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
Conversation
…tityMetadata Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…n deserializing Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…schema Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…hema and prepare to `TokenPayload` mapping Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…sion` and `get_record_expression` Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…` method Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
… entities Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…es to policies in PolicyStore to be more consistent with documentation Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
test case `success_test_user_data_in_id_token` Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…r-policy` types in schema also this commit consist fixes Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…aling-issue-10151 Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
DryRun Security SummaryThe pull request covers a wide range of updates to the Cedarling application, focusing on improving the security and flexibility of the authorization and policy management system, including enhancements to token handling, claim mapping, error handling, and policy management. Expand for full summarySummary: The code changes in this pull request cover a wide range of updates to the Cedarling application, focusing on various aspects of the authorization and policy management system. The changes include improvements to error handling, token metadata handling, claim mapping, and the introduction of new entity types, such as the From an application security perspective, the key points to highlight are:
Files Changed:
Code AnalysisWe ran Riskiness🟢 Risk threshold not exceeded. |
Error: Hi @olehbozhok, You did not reference an open issue in your PR. I attempted to create an issue for you. |
cedar-policy
entity
Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
693bd19
to
be4ce78
Compare
Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…okens_data` Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
…dar-policy` types Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good to me. I think we need to test it to see.
|
||
**Note**: You can include a `role_mapping` in each token but only the first one that get parsed will be recognized by Cedarling. Cedarling parses the `role_mapping`s for each token in this order: | ||
You can include a `role_mapping` in each token but only the first one that get parsed will be recognized by Cedarling. Cedarling parses the `role_mapping`s for each token in this order: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? If the id_token says roles are contained in the role
claim, and the access_token says in the member_of
claim, why can't the cedarling instantiate add'l roles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never discussed that we should get roles from different tokens. And it looks little strange if different tokens generated for same person have different roles set...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me.
Prepare
Description
Add mapping custom types from
cedar-policy
schemaTarget issue
link
closes #10169
Implementation Details
Implemented mapping custom types from
cedar-policy
schemaMapping can be used only if JWT token is related to
trusted issuer
and has fieldiss
On using regex mapping if in
group
found empty string is used default value instead.Mapping types can be only:
String
Number
Boolean
also added parsing
userinfo_token
entity. (it was missed)Test and Document the changes
Please check the below before submitting your PR. The PR will not be merged if there are no commits that start with
docs:
to indicate documentation changes or if the below checklist is not selected.Closes #10170,