You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The gcloud cli allows signing a JWT token on behalf of a service account using user credentials. The Ruby library does not. The following code results in the error below:
Results in: /.../.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/google-api-client-0.25.0/lib/google/apis/core/http_command.rb:228:in 'check_status': accessNotConfigured: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the iamcredentials.googleapis.com. We recommend that most server applications use service accounts instead. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/. (Google::Apis::ClientError)
Describe the solution you'd like
The library should be able to sign a JWT token successfully. The expected behavior should match the gcloud cli (ran locally):
$ gcloud beta iam service-accounts sign-jwt login_request.json signed_jwt.json --iam-account=<my service account>
signed jwt [login_request.json] as [signed_jwt.json] for [<my service account>] using key [<scrubbed key>]
Describe alternatives you've considered
The alternative is to download a json key of a GCP service account with access token signing permissions. However, then the code needs be aware of that json key, and it is a hassle to pass it around to other devs, and makes setup more difficult.
System Info
Ruby 2.5.1
googleauth (0.6.6)
google-api-client (0.25.0)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The gcloud cli allows signing a JWT token on behalf of a service account using user credentials. The Ruby library does not. The following code results in the error below:
Results in:
/.../.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/google-api-client-0.25.0/lib/google/apis/core/http_command.rb:228:in 'check_status': accessNotConfigured: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the iamcredentials.googleapis.com. We recommend that most server applications use service accounts instead. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/. (Google::Apis::ClientError)
Describe the solution you'd like
The library should be able to sign a JWT token successfully. The expected behavior should match the gcloud cli (ran locally):
Describe alternatives you've considered
The alternative is to download a json key of a GCP service account with access token signing permissions. However, then the code needs be aware of that json key, and it is a hassle to pass it around to other devs, and makes setup more difficult.
System Info
The text was updated successfully, but these errors were encountered: