google-cloud-kms 2.3.0 → 2.5.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: 4dd68566d3b364da35143e5501f8bdb5743a48bfcfb51d692293caf0c12c5114
4
- data.tar.gz: 4997226dfb7ea680bee31f6f28a88bafb991eb67bcacbdcdc165ea9e9ae23f80
3
+ metadata.gz: 5075e39b4c66eeb783e1259b282251da1aa3367a4b63b14826d33711d3d4fcc2
4
+ data.tar.gz: '0518049a35b5c936d15bee177bbec66316447455e3316f40b9ef019e75c334c0'
5
5
  SHA512:
6
- metadata.gz: 9648610675019023d3b3480f654310d6055ffcc44a47d083648751d91098397e3381712f2b7309f9467e2c63d6875e62a13b7b122a8d357531954f17f3f44371
7
- data.tar.gz: 32bad132d2272bf16282109581845e0dad66fa100cca52338e6352a8c4499641a34ccc30c67ee5ab493265ebeaa60aeee8f6c1512fc9412ff716e2189124891f
6
+ metadata.gz: 69fa2feb86ec2c5e110977de5c186a3b01175f906df4e6a64d142d6a4684677fde96c41fd798dd65c7e76183984ab5b7a7d2e182634be8b100107c012e060d87
7
+ data.tar.gz: 95140b0d8bad61ed26270df37e5b4b4d88c5cc9408f62fe6d7c21ea6649ff05036cbd7ab961fc10679b6373bb73909fd2b616c2ce403c2b59e80645ba8e2fce3
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
@@ -42,42 +42,16 @@ and includes substantial interface changes. Existing code written for earlier
42
42
  versions of this library will likely require updates to use this version.
43
43
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
44
44
 
45
- ## Enabling Logging
46
-
47
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
48
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
50
- 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)
51
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
52
-
53
- Configuring a Ruby stdlib logger:
54
-
55
- ```ruby
56
- require "logger"
57
-
58
- module MyLogger
59
- LOGGER = Logger.new $stderr, level: Logger::WARN
60
- def logger
61
- LOGGER
62
- end
63
- end
64
-
65
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
66
- module GRPC
67
- extend MyLogger
68
- end
69
- ```
70
-
71
45
  ## Supported Ruby Versions
72
46
 
73
- This library is supported on Ruby 2.5+.
47
+ This library is supported on Ruby 2.6+.
74
48
 
75
49
  Google provides official support for Ruby versions that are actively supported
76
50
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
77
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
78
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
79
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
80
- about the Ruby support schedule.
51
+ in security maintenance, and not end of life. Older versions of Ruby _may_
52
+ still work, but are unsupported and not recommended. See
53
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
54
+ support schedule.
81
55
 
82
56
  ## Which client should I use?
83
57
 
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module Google
18
+ module Cloud
19
+ module Kms
20
+ # This method used to be generated, but is no longer because iam_policy
21
+ # is expected to be a mixin. We'll preserve it for backward compatibility.
22
+ # Note: When KMS is transitioned to true mixins, this will need to be
23
+ # updated.
24
+ unless respond_to? :iam_policy
25
+ ##
26
+ # Create a new client object for IAMPolicy.
27
+ #
28
+ # By default, this returns an instance of
29
+ # [Google::Cloud::Kms::V1::IAMPolicy::Client](https://googleapis.dev/ruby/google-cloud-kms-v1/latest/Google/Cloud/Kms/V1/IAMPolicy/Client.html)
30
+ # for version V1 of the API.
31
+ # However, you can specify specify a different API version by passing it in the
32
+ # `version` parameter. If the IAMPolicy service is
33
+ # supported by that API version, and the corresponding gem is available, the
34
+ # appropriate versioned client will be returned.
35
+ #
36
+ # ## About IAMPolicy
37
+ #
38
+ # API Overview
39
+ #
40
+ #
41
+ # Manages Identity and Access Management (IAM) policies.
42
+ #
43
+ # Any implementation of an API that offers access control features
44
+ # implements the google.iam.v1.IAMPolicy interface.
45
+ #
46
+ # ## Data model
47
+ #
48
+ # Access control is applied when a principal (user or service account), takes
49
+ # some action on a resource exposed by a service. Resources, identified by
50
+ # URI-like names, are the unit of access control specification. Service
51
+ # implementations can choose the granularity of access control and the
52
+ # supported permissions for their resources.
53
+ # For example one database service may allow access control to be
54
+ # specified only at the Table level, whereas another might allow access control
55
+ # to also be specified at the Column level.
56
+ #
57
+ # ## Policy Structure
58
+ #
59
+ # See google.iam.v1.Policy
60
+ #
61
+ # This is intentionally not a CRUD style API because access control policies
62
+ # are created and deleted implicitly with the resources to which they are
63
+ # attached.
64
+ #
65
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
66
+ # Defaults to `:v1`.
67
+ # @return [IAMPolicy::Client] A client object for the specified version.
68
+ #
69
+ def self.iam_policy version: :v1, &block
70
+ require "google/cloud/kms/#{version.to_s.downcase}"
71
+
72
+ package_name = Google::Cloud::Kms
73
+ .constants
74
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
75
+ .first
76
+ package_module = Google::Cloud::Kms.const_get package_name
77
+ package_module.const_get(:IAMPolicy).const_get(:Client).new(&block)
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Kms
23
- VERSION = "2.3.0"
23
+ VERSION = "2.5.0"
24
24
  end
25
25
  end
26
26
  end
@@ -49,11 +49,13 @@ module Google
49
49
  #
50
50
  # By default, this returns an instance of
51
51
  # [Google::Cloud::Kms::V1::EkmService::Client](https://googleapis.dev/ruby/google-cloud-kms-v1/latest/Google/Cloud/Kms/V1/EkmService/Client.html)
52
- # for version V1 of the API.
53
- # However, you can specify specify a different API version by passing it in the
52
+ # for a gRPC client for version V1 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the EkmService service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About EkmService
59
61
  #
@@ -65,17 +67,19 @@ module Google
65
67
  #
66
68
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
67
69
  # Defaults to `:v1`.
68
- # @return [EkmService::Client] A client object for the specified version.
70
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
71
+ # @return [::Object] A client object for the specified version.
69
72
  #
70
- def self.ekm_service version: :v1, &block
73
+ def self.ekm_service version: :v1, transport: :grpc, &block
71
74
  require "google/cloud/kms/#{version.to_s.downcase}"
72
75
 
73
76
  package_name = Google::Cloud::Kms
74
77
  .constants
75
78
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
76
79
  .first
77
- package_module = Google::Cloud::Kms.const_get package_name
78
- package_module.const_get(:EkmService).const_get(:Client).new(&block)
80
+ service_module = Google::Cloud::Kms.const_get(package_name).const_get(:EkmService)
81
+ service_module = service_module.const_get(:Rest) if transport == :rest
82
+ service_module.const_get(:Client).new(&block)
79
83
  end
80
84
 
81
85
  ##
@@ -83,11 +87,13 @@ module Google
83
87
  #
84
88
  # By default, this returns an instance of
85
89
  # [Google::Cloud::Kms::V1::KeyManagementService::Client](https://googleapis.dev/ruby/google-cloud-kms-v1/latest/Google/Cloud/Kms/V1/KeyManagementService/Client.html)
86
- # for version V1 of the API.
87
- # However, you can specify specify a different API version by passing it in the
90
+ # for a gRPC client for version V1 of the API.
91
+ # However, you can specify a different API version by passing it in the
88
92
  # `version` parameter. If the KeyManagementService service is
89
93
  # supported by that API version, and the corresponding gem is available, the
90
94
  # appropriate versioned client will be returned.
95
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
96
+ # the `transport` parameter.
91
97
  #
92
98
  # ## About KeyManagementService
93
99
  #
@@ -106,71 +112,19 @@ module Google
106
112
  #
107
113
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
108
114
  # Defaults to `:v1`.
109
- # @return [KeyManagementService::Client] A client object for the specified version.
115
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
116
+ # @return [::Object] A client object for the specified version.
110
117
  #
111
- def self.key_management_service version: :v1, &block
118
+ def self.key_management_service version: :v1, transport: :grpc, &block
112
119
  require "google/cloud/kms/#{version.to_s.downcase}"
113
120
 
114
121
  package_name = Google::Cloud::Kms
115
122
  .constants
116
123
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
117
124
  .first
118
- package_module = Google::Cloud::Kms.const_get package_name
119
- package_module.const_get(:KeyManagementService).const_get(:Client).new(&block)
120
- end
121
-
122
- ##
123
- # Create a new client object for IAMPolicy.
124
- #
125
- # By default, this returns an instance of
126
- # [Google::Cloud::Kms::V1::IAMPolicy::Client](https://googleapis.dev/ruby/google-cloud-kms-v1/latest/Google/Cloud/Kms/V1/IAMPolicy/Client.html)
127
- # for version V1 of the API.
128
- # However, you can specify specify a different API version by passing it in the
129
- # `version` parameter. If the IAMPolicy service is
130
- # supported by that API version, and the corresponding gem is available, the
131
- # appropriate versioned client will be returned.
132
- #
133
- # ## About IAMPolicy
134
- #
135
- # ## API Overview
136
- #
137
- # Manages Identity and Access Management (IAM) policies.
138
- #
139
- # Any implementation of an API that offers access control features
140
- # implements the google.iam.v1.IAMPolicy interface.
141
- #
142
- # ## Data model
143
- #
144
- # Access control is applied when a principal (user or service account), takes
145
- # some action on a resource exposed by a service. Resources, identified by
146
- # URI-like names, are the unit of access control specification. Service
147
- # implementations can choose the granularity of access control and the
148
- # supported permissions for their resources.
149
- # For example one database service may allow access control to be
150
- # specified only at the Table level, whereas another might allow access control
151
- # to also be specified at the Column level.
152
- #
153
- # ## Policy Structure
154
- #
155
- # See google.iam.v1.Policy
156
- #
157
- # This is intentionally not a CRUD style API because access control policies
158
- # are created and deleted implicitly with the resources to which they are
159
- # attached.
160
- #
161
- # @param version [::String, ::Symbol] The API version to connect to. Optional.
162
- # Defaults to `:v1`.
163
- # @return [IAMPolicy::Client] A client object for the specified version.
164
- #
165
- def self.iam_policy version: :v1, &block
166
- require "google/cloud/kms/#{version.to_s.downcase}"
167
-
168
- package_name = Google::Cloud::Kms
169
- .constants
170
- .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
171
- .first
172
- package_module = Google::Cloud::Kms.const_get package_name
173
- package_module.const_get(:IAMPolicy).const_get(:Client).new(&block)
125
+ service_module = Google::Cloud::Kms.const_get(package_name).const_get(:KeyManagementService)
126
+ service_module = service_module.const_get(:Rest) if transport == :rest
127
+ service_module.const_get(:Client).new(&block)
174
128
  end
175
129
 
176
130
  ##
@@ -190,7 +144,7 @@ module Google
190
144
  # * `timeout` (*type:* `Numeric`) -
191
145
  # Default timeout in seconds.
192
146
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
193
- # Additional gRPC headers to be sent with the call.
147
+ # Additional headers to be sent with the call.
194
148
  # * `retry_policy` (*type:* `Hash`) -
195
149
  # The retry policy. The value is a hash with the following keys:
196
150
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-kms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-16 00:00:00.000000000 Z
11
+ date: 2023-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -170,6 +170,7 @@ files:
170
170
  - README.md
171
171
  - lib/google-cloud-kms.rb
172
172
  - lib/google/cloud/kms.rb
173
+ - lib/google/cloud/kms/helpers.rb
173
174
  - lib/google/cloud/kms/version.rb
174
175
  homepage: https://github.com/googleapis/google-cloud-ruby
175
176
  licenses:
@@ -183,14 +184,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
184
  requirements:
184
185
  - - ">="
185
186
  - !ruby/object:Gem::Version
186
- version: '2.5'
187
+ version: '2.6'
187
188
  required_rubygems_version: !ruby/object:Gem::Requirement
188
189
  requirements:
189
190
  - - ">="
190
191
  - !ruby/object:Gem::Version
191
192
  version: '0'
192
193
  requirements: []
193
- rubygems_version: 3.3.5
194
+ rubygems_version: 3.4.2
194
195
  signing_key:
195
196
  specification_version: 4
196
197
  summary: API Client library for the Cloud Key Management Service (KMS) API