GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Support short-lived service account credentials (OAuth 2.0 access tokens) · Issue #346 · googleapis/google-auth-library-ruby Closed Labels type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design. DescriptionIs your feature request related to a problem? Please describe. Per googleapis/google-cloud-ruby#13121, impersonating a service account by generating a short-lived OAuth 2.0 access token does not seem to work with the Here is an example response from the token generation linked above: {
"accessToken": "ya29.a0ARrd...",
"expireTime": "2021-10-12T00:25:18Z"
}In the BigQuery scenario shown below the short-lived token is already set in token = "ya29.a0ARrd..." require "google/cloud/bigquery" client = Signet::OAuth2::Client.new client.access_token = token Google::Cloud::Bigquery.configure do |config| config.credentials = client end bigquery = Google::Cloud::Bigquery.new The example above results in the following error: irb(main):006:1* Google::Cloud::Bigquery.configure do |config| irb(main):007:1* config.credentials = client irb(main):008:0> end irb(main):009:0> irb(main):010:0> bigquery = Google::Cloud::Bigquery.new /Users/quartzmo/.rbenv/versions/3.0.1/gemsets/quartzmo/gems/googleauth-0.16.2/lib/googleauth/signet.rb:118:in `rescue in retry_with_error': Unexpected error: #<ArgumentError: Missing token endpoint URI.> (Signet::AuthorizationError) from /Users/quartzmo/.rbenv/versions/3.0.1/gemsets/quartzmo/gems/googleauth-0.16.2/lib/googleauth/signet.rb:107:in `retry_with_error' from /Users/quartzmo/.rbenv/versions/3.0.1/gemsets/quartzmo/gems/googleauth-0.16.2/lib/googleauth/signet.rb:80:in `fetch_access_token!' from /Users/quartzmo/.rbenv/versions/3.0.1/gemsets/quartzmo/gems/googleauth-0.16.2/lib/googleauth/credentials.rb:382:in `initialize' from /Users/quartzmo/.rbenv/versions/3.0.1/gemsets/quartzmo/gems/google-cloud-bigquery-1.29.0/lib/google/cloud/bigquery.rb:78:in `new' from /Users/quartzmo/.rbenv/versions/3.0.1/gemsets/quartzmo/gems/google-cloud-bigquery-1.29.0/lib/google/cloud/bigquery.rb:78:in `new' Describe the solution you'd like If Describe alternatives you've considered I can't think of any practical alternatives. Activity
MetadataMetadataAssigneesLabelstype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |