-
Notifications
You must be signed in to change notification settings - Fork 756
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
Microsoft Sentinel - Playbook Permissions aka. Microsoft.Security uses random role assignment IDs #10564
Comments
Unfortunately this is a
I don't believe we have a fix or resolution, however:
E.g. // BUG: When setup via Azure Portal you will get a random GUID
var roleAssignmentName = guid(principalId, roleDefinitionID, subscription().id) Also consider to replace problem definition:
|
@brwilkinson
guid(principalId, roleDefinitionID, subscription().id)
guid(subscription().id, roleDefinitionID, principalId)
guid(principalId, roleDefinitionID, subscription().subscriptionId)
guid(principalId, roleDefinitionName, subscription().id) IMHO a helper function in bicep might be helpful for that:
|
@brwilkinson In the scope of Bicep/ARM, Azure-customers can solve this themselves using consistent Template code, or like a user-defined function. However, it's more that other Microsoft tooling/services uses different methods of generating the name/guid:
So I think it would help if this looked at by the team managing the "Microsoft.Authorization/roleAssignments" resource provider, maybe they should create a build-in/standardized validation from the combination Principal,Role,Scope, that always generates exactly the same name/guid in a future API version. I know backporting will be difficult. But once this new API is in place, you can granularly start updating tools/portals and more. At least we will have a path forward in 1 or 2 years time. And maybe the ARM/Bicep-deployed-way is not that bad, so when the resourceprovider team standardizes on something like this:
Then Bicep/ARM Deployments does not even have to be changed. |
Adding link to another discussion thread on the topic Adding this since there are a few extra notes there:
|
IMO, the roleAssignment id is the most broken feature in ARM template:
|
Bicep version
Not related to bicep version.
Describe the bug
Microsoft Sentinel - Playbook Permissions creates random role assignment IDs. This makes picking up/ importing those role assignments in bicep impossible (as bicep expects deterministic resource names.)
To Reproduce
Steps to reproduce the behavior:
=> Role Assignment IDs are different/ non deterministic.
The text was updated successfully, but these errors were encountered: