-
Notifications
You must be signed in to change notification settings - Fork 3.4k
'az keyvault role assignment' does not check for valid OIDs #25990
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamKeyVaultaz keyvaultaz keyvaultService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamKeyVaultaz keyvaultaz keyvaultService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
The below command should validate the --assignee parameter before creating the role assignment.
Related command
az keyvault role assignment create --hsm-name "YourMHSM" --role 'Managed HSM Crypto User' --assignee 'application_object_id' --scope /keys/keynameDescribe the bug
In the above, we can specify any Application ID as assignee and the command will execute. This triggers an error when accessing the key's RBAC assignments in the portal. The portal bug is currently being investigated.
To Reproduce
Expected behavior
The command should not create a role assignment if given an invalid OID.
Following the docs, Application IDs should not be allowed: Managed HSM role management
"To allow a security principal (such as a user, a service principal, group or a managed identity) to perform managed HSM data plane operations, they must be assigned a role that permits performing those operations."
Additional context