From 39258cacafa5c770fb40d99075a97b8e6427adba Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Tue, 27 Apr 2021 13:49:38 -0700 Subject: [PATCH] fix: Stop attempting to get the project from gcloud when applying self-signed JWTs (#317) --- lib/googleauth/service_account.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/googleauth/service_account.rb b/lib/googleauth/service_account.rb index dbedf4a1..de2cfd03 100644 --- a/lib/googleauth/service_account.rb +++ b/lib/googleauth/service_account.rb @@ -123,8 +123,10 @@ def apply! a_hash, opts = {} def apply_self_signed_jwt! a_hash # Use the ServiceAccountJwtHeaderCredentials using the same cred values cred_json = { - private_key: @signing_key.to_s, - client_email: @issuer + private_key: @signing_key.to_s, + client_email: @issuer, + project_id: @project_id, + quota_project_id: @quota_project_id } key_io = StringIO.new MultiJson.dump(cred_json) alt = ServiceAccountJwtHeaderCredentials.make_creds json_key_io: key_io