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

{Auth} Rename option token_encryption to encrypt_token_cache #20432

Merged
merged 1 commit into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion src/azure-cli-core/azure/cli/core/_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ def _create_identity_instance(cli_ctx, *args, **kwargs):

# Only enable encryption for Windows (for now).
fallback = sys.platform.startswith('win32')
encrypt = cli_ctx.config.getboolean('core', 'token_encryption', fallback=fallback)
# encrypt_token_cache affects both MSAL token cache and service principal entries.
encrypt = cli_ctx.config.getboolean('core', 'encrypt_token_cache', fallback=fallback)

return Identity(*args, encrypt=encrypt, **kwargs)
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/auth/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, authority, tenant_id=None, client_id=None, encrypt=False):
:param tenant_id: Tenant GUID, like 00000000-0000-0000-0000-000000000000. If unspecified, default to
'organizations'.
:param client_id: Client ID of the CLI application.
:param encrypt: Whether to encrypt token cache and service principal entries.
:param encrypt: Whether to encrypt MSAL token cache and service principal entries.
"""
self.authority = authority
self.tenant_id = tenant_id
Expand Down