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

{Identity} Do not set logging_enable for Azure Identity credentials #16728

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/azure-cli-core/azure/cli/core/_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,19 @@ def __init__(self, authority=None, tenant_id=None, client_id=None, **kwargs):
from azure.cli.core._debug import change_ssl_cert_verification_track2
self._credential_kwargs = {}
self._credential_kwargs.update(change_ssl_cert_verification_track2())
# Turn on NetworkTraceLoggingPolicy to show DEBUG logs
self._credential_kwargs['logging_enable'] = True

# Turn on NetworkTraceLoggingPolicy to show DEBUG logs.
# WARNING: This argument is only for development purpose. It will make credentials be printed to
# - console log, when --debug is specified
# - file log, when logging.enable_log_file is enabled, even without --debug
# Credentials include and are not limited to:
# - Authorization code
# - Device code
# - Refresh token
# - Access token
# - Service principal secret
# - Service principal certificate
# self._credential_kwargs['logging_enable'] = True

def _load_msal_cache(self):
# sdk/identity/azure-identity/azure/identity/_internal/msal_credentials.py:95
Expand Down