-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Role} az ad sp create-for-rbac: Show warning when --scopes defaults to subscription
#20965
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
|
Removing the default value of |
| if role and not scopes: | ||
| logger.warning(SCOPE_WARNING) | ||
| scopes = ['/subscriptions/' + role_client.config.subscription_id] |
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.
Unlike #20924, the default value assignment is done in our own custom function, instead of letting knack assign the default value and set is_default.
|
Just out of curiosity, ask another related question: If users do not pass in |
|
@yonzhan / @chasewilson , Why do we have hidden defaults anywhere? Can't we handle all defaults with a I do like @zhoxing-ms 's question and would like to put in my vote for a 2nd warning message. Although it doesn't seem logical to |
In the future, this usage will trigger an error. |
Description
A temporary warning for #20806
For
az ad sp create-for-rbac, when--roleis given,--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 when
--roleis specified but--scopesis not: