-
Notifications
You must be signed in to change notification settings - Fork 3k
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
{Role} az ad sp create-for-rbac
: Add usage link to --sdk-auth
's help message
#17362
Conversation
@@ -1469,6 +1469,8 @@ def create_service_principal_for_rbac( | |||
raise | |||
sp_oid = aad_sp.object_id | |||
|
|||
logger.warning(CREDENTIAL_WARNING_MESSAGE) |
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.
Adjust the order of warnings. Show credential warning first.
Before:
> az ad sp create-for-rbac --sdk-auth
In a future release, this command will NOT create a 'Contributor' role assignment by default. If needed, use the --role argument to explicitly create a role assignment.
Creating 'Contributor' role assignment under scope '/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590'
Retrying role assignment creation: 1/36
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
{
...
}
After:
> az ad sp create-for-rbac --sdk-auth
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
In a future release, this command will NOT create a 'Contributor' role assignment by default. If needed, use the --role argument to explicitly create a role assignment.
Creating 'Contributor' role assignment under scope '/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590'
Retrying role assignment creation: 1/36
{
...
}
Role |
@@ -90,7 +90,9 @@ def load_arguments(self, _): | |||
help='Skip creating the default assignment, which allows the service principal to access resources under the current subscription. ' | |||
'When specified, --scopes will be ignored. You may use `az role assignment create` to create ' | |||
'role assignments for this service principal later.') | |||
c.argument('show_auth_for_sdk', options_list='--sdk-auth', help='output result in compatible with Azure SDK auth file', arg_type=get_three_state_flag()) | |||
c.argument('show_auth_for_sdk', options_list='--sdk-auth', arg_type=get_three_state_flag(), | |||
help='Generate a JSON dictionary compatible with Azure SDK. For how to use it with Azure SDK, ' |
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.
Still misleading to me, since it's not compatible with SDK as a whole. I would be more explicit.
"SDK has deprecated usage of authentication file. More details here: aka"
Description
az ad sp create-for-rbac
: Add usage link to--sdk-auth
's help messageReference email: Deprecate generating JSON auth file in Azure CLI
Testing Guide