Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Mar 19, 2021

Description

az ad sp create-for-rbac: Add usage link to --sdk-auth's help message

Reference email: Deprecate generating JSON auth file in Azure CLI

Testing Guide

> az ad sp create-for-rbac --help

    --sdk-auth         : Generate a JSON dictionary compatible with Azure SDK. For how to use it
                         with Azure SDK, see https://aka.ms/azsdk/python/azidmigration.  Allowed
                         values: false, true.

@@ -1469,6 +1469,8 @@ def create_service_principal_for_rbac(
raise
sp_oid = aad_sp.object_id

logger.warning(CREDENTIAL_WARNING_MESSAGE)
Copy link
Member Author

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
{
  ...
}

@yonzhan yonzhan added this to the S185 milestone Mar 19, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 19, 2021

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, '
Copy link
Member

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"

@yonzhan yonzhan modified the milestones: S185, S186 Apr 10, 2021
@yonzhan yonzhan modified the milestones: S186, S187 May 1, 2021
@yonzhan yonzhan modified the milestones: S187, S188 May 21, 2021
@yonzhan yonzhan modified the milestones: S188, S189 Jun 13, 2021
@yonzhan yonzhan modified the milestones: S189, Jul 2021 (2021-08-03) Jul 2, 2021
@jsntcy jsntcy closed this Jul 26, 2021
@jsntcy jsntcy reopened this Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants