remote: add excludes for AzureDefaultCredentials (#6359)

add additional excludes to DefaultAzureCredential
which are needed in a Windows Environment to
use az cli provided credentials, etc.

Co-authored-by: Alexander Meier <[email protected]>
This commit is contained in:
meierale
2021-07-23 16:02:16 +03:00
committed by GitHub
co-authored by Alexander Meier
parent d5722e3edf
commit 985c0328c7
2 changed files with 18 additions and 2 deletions
+5 -1
View File
@@ -189,7 +189,11 @@ SCHEMA = {
"tenant_id": str,
"client_id": str,
"client_secret": str,
"allow_anonymous_login": bool,
"allow_anonymous_login": Bool,
"exclude_environment_credential": Bool,
"exclude_visual_studio_code_credential": Bool,
"exclude_shared_token_cache_credential": Bool,
"exclude_managed_identity_credential": Bool,
**REMOTE_COMMON,
},
"oss": {
+13 -1
View File
@@ -108,7 +108,19 @@ class AzureFileSystem(ObjectFSWrapper):
):
with fsspec_loop():
login_info["credential"] = DefaultAzureCredential(
exclude_interactive_browser_credential=False
exclude_interactive_browser_credential=False,
exclude_environment_credential=config.get(
"exclude_environment_credential", False
),
exclude_visual_studio_code_credential=config.get(
"exclude_visual_studio_code_credential", False
),
exclude_shared_token_cache_credential=config.get(
"exclude_shared_token_cache_credential", False
),
exclude_managed_identity_credential=config.get(
"exclude_managed_identity_credential", False
),
)
for login_method, required_keys in [ # noqa