debug stepping to figure out where we die...

This commit is contained in:
Jay Lee
2023-08-18 18:49:38 +00:00
parent d2bbbb3b73
commit e9ea536aaf

View File

@ -4328,15 +4328,20 @@ class signjwtSignJwt(google.auth.crypt.Signer):
def sign(self, message): def sign(self, message):
''' Call IAM Credentials SignJWT API to get our signed JWT ''' ''' Call IAM Credentials SignJWT API to get our signed JWT '''
print('step 1...')
try: try:
credentials, _ = google.auth.default(scopes=[API.IAM_SCOPE], credentials, _ = google.auth.default(scopes=[API.IAM_SCOPE],
request=getTLSv1_2Request()) request=getTLSv1_2Request())
except (google.auth.exceptions.DefaultCredentialsError, google.auth.exceptions.RefreshError) as e: except (google.auth.exceptions.DefaultCredentialsError, google.auth.exceptions.RefreshError) as e:
systemErrorExit(API_ACCESS_DENIED_RC, str(e)) systemErrorExit(API_ACCESS_DENIED_RC, str(e))
print('step 2...')
httpObj = transportAuthorizedHttp(credentials, http=getHttpObj()) httpObj = transportAuthorizedHttp(credentials, http=getHttpObj())
print('step 3...')
iamc = getService(API.IAM_CREDENTIALS, httpObj) iamc = getService(API.IAM_CREDENTIALS, httpObj)
print('step 4...')
response = callGAPI(iamc.projects().serviceAccounts(), 'signJwt', response = callGAPI(iamc.projects().serviceAccounts(), 'signJwt',
name=self.name, body={'payload': json.dumps(message)}) name=self.name, body={'payload': json.dumps(message)})
print('step 5...')
signed_jwt = response.get('signedJwt') signed_jwt = response.get('signedJwt')
return signed_jwt return signed_jwt