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 +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/iam/credentials/v1/common_pb.rb +26 -38
- data/lib/google/iam/credentials/v1/iam_credentials/client.rb +2 -2
- data/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb +655 -0
- data/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb +288 -0
- data/lib/google/iam/credentials/v1/iam_credentials/rest.rb +60 -0
- data/lib/google/iam/credentials/v1/iam_credentials.rb +7 -1
- data/lib/google/iam/credentials/v1/iamcredentials_pb.rb +25 -2
- data/lib/google/iam/credentials/v1/rest.rb +37 -0
- data/lib/google/iam/credentials/v1/version.rb +1 -1
- data/lib/google/iam/credentials/v1.rb +7 -2
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba1c2265f108a3b4c4c4fc7fe152c8c710f898eef227b9112169fd050905a961
|
4
|
+
data.tar.gz: 8846283261b2ad64ea933239f679dbdd4ab75b72bba20378658e34cde0c7a35f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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/
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
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://
|
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://
|
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
|