-
Notifications
You must be signed in to change notification settings - Fork 91
fix(jans-cedarling)!: role entity not being created in the unsigned interface #11176
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
**breaking changes**: - renamed: EntityData.payload to EntityData.attributes Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.com>
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.com>
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.com>
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.com>
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.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.
Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.
jans-cedarling/cedarling/src/entity_builder/entity_id_getters.rs
Outdated
Show resolved
Hide resolved
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.com>
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.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.
How about adding unit tests in cedarling/src/tests/authorize_unsigned.rs
to verify that roles work?
attrs.into_iter().fold(HashMap::new(), |mut acc, attrs| { | ||
acc.extend(attrs); | ||
acc | ||
}) | ||
} else { |
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 can simplify code to
} else { | |
HashMap::from_iter(attrs.into_iter().flatten()) |
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.
resolved in b5a8d69
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.com>
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.com>
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.com>
There are already tests in The |
Signed-off-by: rmarinn <34529290+rmarinn@users.noreply.github.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.
Looks good to me. Role creation and RBAC policy works on python example.
Prepare
Description
This PR fixes the issue where
Role
entities are not getting created in the unsigned interface.Target issue
closes #11160
Implementation Details
New Implementations
CEDARLING_UNSIGNED_ROLE_ID_SRC
was added so that Cedarling knows what to use when creating aRole
entity in the unsigned interface.authorize_unsigned.rs
Breaking changes
EntityData.payload
has been renamed toEntityData.attributes
.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.