-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[KeyVault] Fix #11871: AKV10032: Invalid issuer error for operations in nondefault tenant/subscription #18162
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
Changes from all commits
be9e57e
686d740
558b9e7
6fc0781
4d554c4
f862d04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,7 +125,7 @@ def _keyvault_mgmt_client_factory(cli_ctx, _): | |
| return _keyvault_mgmt_client_factory | ||
|
|
||
|
|
||
| def keyvault_data_plane_factory(cli_ctx, _): | ||
| def keyvault_data_plane_factory(cli_ctx, *_): | ||
| from azure.keyvault import KeyVaultAuthentication, KeyVaultClient | ||
| from azure.cli.core.util import should_disable_connection_verify | ||
|
|
||
|
|
@@ -134,7 +134,8 @@ def keyvault_data_plane_factory(cli_ctx, _): | |
| def get_token(server, resource, scope): # pylint: disable=unused-argument | ||
| import adal | ||
| try: | ||
| return Profile(cli_ctx=cli_ctx).get_raw_token(resource)[0] | ||
| return Profile(cli_ctx=cli_ctx).get_raw_token(resource=resource, | ||
| subscription=cli_ctx.data.get('subscription_id'))[0] | ||
evelyn-ys marked this conversation as resolved.
Show resolved
Hide resolved
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just keep it as it is |
||
| except adal.AdalError as err: | ||
| # pylint: disable=no-member | ||
| if (hasattr(err, 'error_response') and | ||
|
|
@@ -170,7 +171,8 @@ def keyvault_private_data_plane_factory_v7_2_preview(cli_ctx, _): | |
| def get_token(server, resource, scope): # pylint: disable=unused-argument | ||
| import adal | ||
| try: | ||
| return Profile(cli_ctx=cli_ctx).get_raw_token(resource)[0] | ||
| return Profile(cli_ctx=cli_ctx).get_raw_token(resource=resource, | ||
| subscription=cli_ctx.data.get('subscription_id'))[0] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| except adal.AdalError as err: | ||
| # pylint: disable=no-member | ||
| if (hasattr(err, 'error_response') and | ||
|
|
||
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.
If
*_is ignored, why it is here?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.
When creating from keyvault's command handler, a
command_argswill be passed in so we can't delete*_directly. See L100azure-cli/src/azure-cli/azure/cli/command_modules/keyvault/_command_type.py
Lines 86 to 138 in c3b56d8