-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Role} az role assignment create: Show warning if --scope argument is not specified
#24755
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
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to #20965, we can't give an exact version yet.
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.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should also be consistent with the content on line 688.
We can mention something like "breaking change of Fall of 2023".
dcaro
left a comment
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.
@jiasli just a suggestion about the name.
We need to give a more specific timeline.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiasli We should be specific about the timeline.
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.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 <[email protected]>
|
We will also need to refine the conceptual doc: https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli |
dcaro
left a comment
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.
LGTM
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.