Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Changes to identify service principal with custom roles on Azure storage account for principal-prefix-access #1576
Changes to identify service principal with custom roles on Azure storage account for principal-prefix-access #1576
Changes from 10 commits
b401df7
c8e11c7
eb12247
8249513
90fdddd
f209ef8
17edf44
032130b
6f5cee2
47af729
4f0630a
c0262dc
a74d703
c092e73
806ec74
f5fb98a
6d1f9d1
edfeaf1
fbaca77
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It might make sense to let this return a list of privileges and select the highest privilege in
_map_storage
. Now the logic for selecting the highest priviliges is duplicated.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.
@JCZuurmond - The method _get_custom_role_privilege() gets the higher privilege for one custom role assignment. A custom role can contain multiple permissions, and this will get the higher privilege from these permissions. Method _map_storage() will get the higher privilege from a custom or builtin role if more than one role assignments exist for one principal. If I want to return a list of privileges for one custom role, then I will need to iterate through all permissions, whereas now I am exiting from the loop if I find one Write privilege. Please let me know if you think this makes sense.
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.
yes, that is also true. I am a bit indifferent about this, therefore, I would not let it block this PR.
Pros: exit loop early, a pattern you see more often in ucx
Cons: treating WRITE_FILES > READ_FILES in two location, speed gain is probably insignifficant