-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Compute] az vm/vmss create: Add warning log and modify help to inform that the default value Contributor of --role will be removed
#20924
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
az vm/vmss create: Add warning log and modify help to inform that the default value "Contributor" of "--role" will be removedaz vm/vmss create: Add warning log and modify help to inform that the default value Contributor of --role will be removed
|
Compute |
|
@zhoxing-ms / @yonzhan , can this PR also include updates to _help.py with corrected code samples? |
015a513 to
51aa2b7
Compare
|
@dbradish-microsoft Thank you for your reminder. It has been updated |
|
|
||
| for scope in ['vm create', 'vmss create']: | ||
| with self.argument_context(scope) as c: | ||
| arg_group = 'Managed Service Identity' if scope.split()[-1] == 'create' else None |
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.
scope.split()[-1] == 'create' will always be True, right? 😉
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.
Good catch! updated
|
|
||
| for scope in ['vm identity assign', 'vmss identity assign']: | ||
| with self.argument_context(scope) as c: | ||
| arg_group = 'Managed Service Identity' if scope.split()[-1] == 'create' else None |
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 here, scope.split()[-1] == 'create' will never be True.
Co-authored-by: Jiashuo Li <[email protected]>
Co-authored-by: Jiashuo Li <[email protected]>
Description
As the security team raised the security concern: the permission of
Contributoris too high to be used as the default role for the creation of VM and VMSS, so the default valueContributorof--rolewill be removed in the future.Therefore, the first step is to prompt users that parameters
--roleand--scopeshould be passed in at the same time when assigning role to the managed identity to reduce the impact of breaking change.The specific effects are as follows:



Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.