From 716489ceed1f520b23986485aeebe57796630d53 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Mon, 3 Apr 2023 08:00:12 -0400 Subject: [PATCH] key_type is a GAMism, use type to identify SA file. --- src/gam/auth/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gam/auth/__init__.py b/src/gam/auth/__init__.py index 5bba4ac6..6ef9c9d9 100644 --- a/src/gam/auth/__init__.py +++ b/src/gam/auth/__init__.py @@ -39,7 +39,7 @@ def get_admin_credentials(api=None): with open(credential_file) as f: creds_data = json.load(f) # Validate that enable DASA matches content of authorization file - if GC_Values[GC_ENABLE_DASA] and 'key_type' in creds_data: + if GC_Values[GC_ENABLE_DASA] and creds_data.get('type') == 'service_account': audience = f'https://{api}.googleapis.com/' key_type = creds_data.get('key_type', 'default') if key_type == 'default':