google-iam-credentials-v1 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5829210018c42479a8912c0eeea260a3ee6e5e563716450bbcba314c77a18e4
4
- data.tar.gz: 9b94c349ce14587ff2bd4aa76316427c1561151ff9d29b272de68a69eb0826ab
3
+ metadata.gz: ba1c2265f108a3b4c4c4fc7fe152c8c710f898eef227b9112169fd050905a961
4
+ data.tar.gz: 8846283261b2ad64ea933239f679dbdd4ab75b72bba20378658e34cde0c7a35f
5
5
  SHA512:
6
- metadata.gz: e82ac6e2dd8ce2a2a72245086bcfeecd9681901441b40f3e482eaa32ed36669b9c242238066cbd0d0ee6853a274e916fb9650efede8f0d38576ed8ae5692172b
7
- data.tar.gz: 92df0692d03bad6104d8cb9f78cecb944806398304b8e21ad9f7199deb241a6575cece768f1cc331876c3be3e6a099022894f2e6795835bec0b9d9f60fe5ee1f
6
+ metadata.gz: e84740ebee8230ee5d43bfda5d5b7f65fb3a9f49ee245411c79e6ac182d0a4aebb62fa9835e21cfdd6d005d2c523181649045726129e1b381ebb35b0a4bb3dc9
7
+ data.tar.gz: 220b7ef8e4e5ddcf175cd729e114fb1759fe17a53c759363fc9a38adfc905a69cd1bd527a77561a07bb4d9eef639f4c19211f9931ef6b0bd8e592805d0494b75
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the IAM Service Account Credentials V1 API
2
2
 
3
- API Client library for the IAM Service Account Credentials V1 API
3
+ Creates short-lived, limited-privilege credentials for IAM service accounts.
4
4
 
5
5
  The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens.
6
6
 
@@ -46,8 +46,8 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/iam/credentials/v1/common.proto
3
4
 
@@ -8,46 +9,33 @@ require 'google/api/resource_pb'
8
9
  require 'google/protobuf/duration_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/iam/credentials/v1/common.proto", :syntax => :proto3) do
13
- add_message "google.iam.credentials.v1.GenerateAccessTokenRequest" do
14
- optional :name, :string, 1
15
- repeated :delegates, :string, 2
16
- repeated :scope, :string, 4
17
- optional :lifetime, :message, 7, "google.protobuf.Duration"
18
- end
19
- add_message "google.iam.credentials.v1.GenerateAccessTokenResponse" do
20
- optional :access_token, :string, 1
21
- optional :expire_time, :message, 3, "google.protobuf.Timestamp"
22
- end
23
- add_message "google.iam.credentials.v1.SignBlobRequest" do
24
- optional :name, :string, 1
25
- repeated :delegates, :string, 3
26
- optional :payload, :bytes, 5
27
- end
28
- add_message "google.iam.credentials.v1.SignBlobResponse" do
29
- optional :key_id, :string, 1
30
- optional :signed_blob, :bytes, 4
31
- end
32
- add_message "google.iam.credentials.v1.SignJwtRequest" do
33
- optional :name, :string, 1
34
- repeated :delegates, :string, 3
35
- optional :payload, :string, 5
36
- end
37
- add_message "google.iam.credentials.v1.SignJwtResponse" do
38
- optional :key_id, :string, 1
39
- optional :signed_jwt, :string, 2
40
- end
41
- add_message "google.iam.credentials.v1.GenerateIdTokenRequest" do
42
- optional :name, :string, 1
43
- repeated :delegates, :string, 2
44
- optional :audience, :string, 3
45
- optional :include_email, :bool, 4
46
- end
47
- add_message "google.iam.credentials.v1.GenerateIdTokenResponse" do
48
- optional :token, :string, 1
12
+
13
+ descriptor_data = "\n&google/iam/credentials/v1/common.proto\x12\x19google.iam.credentials.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa9\x01\n\x1aGenerateAccessTokenRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x02 \x03(\t\x12\x12\n\x05scope\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12+\n\x08lifetime\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\"d\n\x1bGenerateAccessTokenResponse\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"s\n\x0fSignBlobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x03 \x03(\t\x12\x14\n\x07payload\x18\x05 \x01(\x0c\x42\x03\xe0\x41\x02\"7\n\x10SignBlobResponse\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x13\n\x0bsigned_blob\x18\x04 \x01(\x0c\"r\n\x0eSignJwtRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x03 \x03(\t\x12\x14\n\x07payload\x18\x05 \x01(\tB\x03\xe0\x41\x02\"5\n\x0fSignJwtResponse\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x12\n\nsigned_jwt\x18\x02 \x01(\t\"\x92\x01\n\x16GenerateIdTokenRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x02 \x03(\t\x12\x15\n\x08\x61udience\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rinclude_email\x18\x04 \x01(\x08\"(\n\x17GenerateIdTokenResponse\x12\r\n\x05token\x18\x01 \x01(\tB\xac\x02\n#com.google.cloud.iam.credentials.v1B\x19IAMCredentialsCommonProtoP\x01ZEcloud.google.com/go/iam/credentials/apiv1/credentialspb;credentialspb\xf8\x01\x01\xaa\x02\x1fGoogle.Cloud.Iam.Credentials.V1\xca\x02\x1fGoogle\\Cloud\\Iam\\Credentials\\V1\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}b\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError => e
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
29
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
49
35
  end
50
36
  end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
51
39
  end
52
40
 
53
41
  module Google
@@ -626,9 +626,9 @@ module Google
626
626
  # * (`String`) The path to a service account key file in JSON format
627
627
  # * (`Hash`) A service account key as a Hash
628
628
  # * (`Google::Auth::Credentials`) A googleauth credentials object
629
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
629
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
630
630
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
631
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
631
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
632
632
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
633
633
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
634
634
  # * (`nil`) indicating no credentials