{Role} az role assignment create: Show warning if --scope argument is not specified#24755
{Role} az role assignment create: Show warning if --scope argument is not specified#24755
az role assignment create: Show warning if --scope argument is not specified#24755Conversation
|
Role |
c30e32b to
db424a7
Compare
| "The output includes credentials that you must protect. Be sure that you do not include these credentials in " | ||
| "your code or check the credentials into your source control. For more information, see https://aka.ms/azadsp-cli") | ||
|
|
||
| SCOPE_WARNING = "In a future release, --scope argument will become required for creating a role assignment. " \ |
There was a problem hiding this comment.
Similar to #20965, we can't give an exact version yet.
There was a problem hiding this comment.
@jiasli , but can't we at least give the anticipated breaking change (BK) window as are BKs are moving to a bi-annual schedule?
There was a problem hiding this comment.
this should also be consistent with the content on line 688.
We can mention something like "breaking change of Fall of 2023".
| helps['role assignment create'] = """ | ||
| type: command | ||
| short-summary: Create a new role assignment for a user, group, or service principal. | ||
| long-summary: In a future release, --scope argument will become required for creating a role assignment. Please explicitly specify --scope. |
There was a problem hiding this comment.
@jiasli We should be specific about the timeline.
There was a problem hiding this comment.
| long-summary: In a future release, --scope argument will become required for creating a role assignment. Please explicitly specify --scope. | |
| long-summary: --scope argument will become required for creating a role assignment in the breaking change release of the fall of 2023. Please explicitly specify --scope. |
| "The output includes credentials that you must protect. Be sure that you do not include these credentials in " | ||
| "your code or check the credentials into your source control. For more information, see https://aka.ms/azadsp-cli") | ||
|
|
||
| SCOPE_WARNING = "In a future release, --scope argument will become required for creating a role assignment. " \ |
There was a problem hiding this comment.
@jiasli , but can't we at least give the anticipated breaking change (BK) window as are BKs are moving to a bi-annual schedule?
Co-authored-by: Delora Bradish <dbradish@microsoft.com>
|
We will also need to refine the conceptual doc: https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli |
az role assignment create: Show warning when scope defaults to subscriptionaz role assignment create: Show warning when --scope argument is not specified
az role assignment create: Show warning when --scope argument is not specifiedaz role assignment create: Show warning if --scope argument is not specified
…t is not specified (Azure#24755)
Description
Similar to #20965
A temporary warning for #24753
For
az role assignment create,--scopedefaults to the subscription. Without explicit consent from the user on the--scope, this behavior is considered Elevation of Privilege.This PR adds a warning if
--scopeis not specified:Even if
--resource-groupor--subscriptionis specified, we still show this warning because as described in #24753, we may drop--resource-groupand--subscription, so--scopeshould always be used as the unified, all-in-one argument for specifying the role assignment scope.Related PR: #25283
History Notes
[Role]
az role assignment create: Show warning if--scopeargument is not specified:--scopeargument will become required for creating a role assignment in the breaking change release of the fall of 2023. Please explicitly specify--scope.