google-cloud-confidential_computing-v1 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/confidential_computing/v1/confidential_computing/client.rb +28 -3
- data/lib/google/cloud/confidential_computing/v1/confidential_computing/rest/client.rb +28 -3
- data/lib/google/cloud/confidential_computing/v1/confidential_computing/rest/service_stub.rb +30 -14
- data/lib/google/cloud/confidential_computing/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10c6265b8e206f45908ac12f0c4c7ff7b0a7f8568f14a0b6fbf57f203bf215db
|
4
|
+
data.tar.gz: 26f1cfa9caa92136acfe17b78ce41867afcb1b1672df8f146f43536d6250bd2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '02843fb6ca4a5122a0a37f90daf0e014a0556dc9d8918baad8bad121f9578e516996e13509432081706e595ede14fadcb10265d095da1af480bada327b05a7f9'
|
7
|
+
data.tar.gz: 0c4f00ac4d253003099cfe5c75e3b58f2f24ab0dc85870903b49e6eebf6571739b028a0753972c9d1e5ec7e703e45a3f90fc2cec84fb4dd1ec47316917e0a78b
|
data/README.md
CHANGED
@@ -42,33 +42,43 @@ for class and method documentation.
|
|
42
42
|
See also the [Product Documentation](https://cloud.google.com/confidential-computing)
|
43
43
|
for general usage information.
|
44
44
|
|
45
|
-
##
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
45
|
+
## Debug Logging
|
46
|
+
|
47
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
48
|
+
your application's integration with the API. When logging is activated, key
|
49
|
+
events such as requests and responses, along with data payloads and metadata
|
50
|
+
such as headers and client configuration, are logged to the standard error
|
51
|
+
stream.
|
52
|
+
|
53
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
54
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
55
|
+
customers, private keys, or other security data that could be compromising if
|
56
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
57
|
+
the principle of least access. Google also recommends that Client Library Debug
|
58
|
+
Logging be enabled only temporarily during active debugging, and not used
|
59
|
+
permanently in production.
|
60
|
+
|
61
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
62
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
63
|
+
list of client library gem names. This will select the default logging behavior,
|
64
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
65
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
66
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
67
|
+
results in logs appearing alongside your application logs in the
|
68
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
69
|
+
|
70
|
+
You can customize logging by modifying the `logger` configuration when
|
71
|
+
constructing a client object. For example:
|
54
72
|
|
55
73
|
```ruby
|
74
|
+
require "google/cloud/confidential_computing/v1"
|
56
75
|
require "logger"
|
57
76
|
|
58
|
-
|
59
|
-
|
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
|
77
|
+
client = ::Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Client.new do |config|
|
78
|
+
config.logger = Logger.new "my-app.log"
|
68
79
|
end
|
69
80
|
```
|
70
81
|
|
71
|
-
|
72
82
|
## Google Cloud Samples
|
73
83
|
|
74
84
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -170,14 +170,26 @@ module Google
|
|
170
170
|
universe_domain: @config.universe_domain,
|
171
171
|
channel_args: @config.channel_args,
|
172
172
|
interceptors: @config.interceptors,
|
173
|
-
channel_pool_config: @config.channel_pool
|
173
|
+
channel_pool_config: @config.channel_pool,
|
174
|
+
logger: @config.logger
|
174
175
|
)
|
175
176
|
|
177
|
+
@confidential_computing_stub.stub_logger&.info do |entry|
|
178
|
+
entry.set_system_name
|
179
|
+
entry.set_service
|
180
|
+
entry.message = "Created client for #{entry.service}"
|
181
|
+
entry.set_credentials_fields credentials
|
182
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
183
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
184
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
185
|
+
end
|
186
|
+
|
176
187
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
177
188
|
config.credentials = credentials
|
178
189
|
config.quota_project = @quota_project_id
|
179
190
|
config.endpoint = @confidential_computing_stub.endpoint
|
180
191
|
config.universe_domain = @confidential_computing_stub.universe_domain
|
192
|
+
config.logger = @confidential_computing_stub.logger if config.respond_to? :logger=
|
181
193
|
end
|
182
194
|
end
|
183
195
|
|
@@ -188,6 +200,15 @@ module Google
|
|
188
200
|
#
|
189
201
|
attr_reader :location_client
|
190
202
|
|
203
|
+
##
|
204
|
+
# The logger used for request/response debug logging.
|
205
|
+
#
|
206
|
+
# @return [Logger]
|
207
|
+
#
|
208
|
+
def logger
|
209
|
+
@confidential_computing_stub.logger
|
210
|
+
end
|
211
|
+
|
191
212
|
# Service calls
|
192
213
|
|
193
214
|
##
|
@@ -274,7 +295,6 @@ module Google
|
|
274
295
|
|
275
296
|
@confidential_computing_stub.call_rpc :create_challenge, request, options: options do |response, operation|
|
276
297
|
yield response, operation if block_given?
|
277
|
-
return response
|
278
298
|
end
|
279
299
|
rescue ::GRPC::BadStatus => e
|
280
300
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -377,7 +397,6 @@ module Google
|
|
377
397
|
|
378
398
|
@confidential_computing_stub.call_rpc :verify_attestation, request, options: options do |response, operation|
|
379
399
|
yield response, operation if block_given?
|
380
|
-
return response
|
381
400
|
end
|
382
401
|
rescue ::GRPC::BadStatus => e
|
383
402
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -466,6 +485,11 @@ module Google
|
|
466
485
|
# default endpoint URL. The default value of nil uses the environment
|
467
486
|
# universe (usually the default "googleapis.com" universe).
|
468
487
|
# @return [::String,nil]
|
488
|
+
# @!attribute [rw] logger
|
489
|
+
# A custom logger to use for request/response debug logging, or the value
|
490
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
491
|
+
# explicitly disable logging.
|
492
|
+
# @return [::Logger,:default,nil]
|
469
493
|
#
|
470
494
|
class Configuration
|
471
495
|
extend ::Gapic::Config
|
@@ -490,6 +514,7 @@ module Google
|
|
490
514
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
491
515
|
config_attr :quota_project, nil, ::String, nil
|
492
516
|
config_attr :universe_domain, nil, ::String, nil
|
517
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
493
518
|
|
494
519
|
# @private
|
495
520
|
def initialize parent_config = nil
|
@@ -163,15 +163,27 @@ module Google
|
|
163
163
|
endpoint: @config.endpoint,
|
164
164
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
165
165
|
universe_domain: @config.universe_domain,
|
166
|
-
credentials: credentials
|
166
|
+
credentials: credentials,
|
167
|
+
logger: @config.logger
|
167
168
|
)
|
168
169
|
|
170
|
+
@confidential_computing_stub.logger(stub: true)&.info do |entry|
|
171
|
+
entry.set_system_name
|
172
|
+
entry.set_service
|
173
|
+
entry.message = "Created client for #{entry.service}"
|
174
|
+
entry.set_credentials_fields credentials
|
175
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
176
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
177
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
178
|
+
end
|
179
|
+
|
169
180
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
170
181
|
config.credentials = credentials
|
171
182
|
config.quota_project = @quota_project_id
|
172
183
|
config.endpoint = @confidential_computing_stub.endpoint
|
173
184
|
config.universe_domain = @confidential_computing_stub.universe_domain
|
174
185
|
config.bindings_override = @config.bindings_override
|
186
|
+
config.logger = @confidential_computing_stub.logger if config.respond_to? :logger=
|
175
187
|
end
|
176
188
|
end
|
177
189
|
|
@@ -182,6 +194,15 @@ module Google
|
|
182
194
|
#
|
183
195
|
attr_reader :location_client
|
184
196
|
|
197
|
+
##
|
198
|
+
# The logger used for request/response debug logging.
|
199
|
+
#
|
200
|
+
# @return [Logger]
|
201
|
+
#
|
202
|
+
def logger
|
203
|
+
@confidential_computing_stub.logger
|
204
|
+
end
|
205
|
+
|
185
206
|
# Service calls
|
186
207
|
|
187
208
|
##
|
@@ -261,7 +282,6 @@ module Google
|
|
261
282
|
|
262
283
|
@confidential_computing_stub.create_challenge request, options do |result, operation|
|
263
284
|
yield result, operation if block_given?
|
264
|
-
return result
|
265
285
|
end
|
266
286
|
rescue ::Gapic::Rest::Error => e
|
267
287
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -357,7 +377,6 @@ module Google
|
|
357
377
|
|
358
378
|
@confidential_computing_stub.verify_attestation request, options do |result, operation|
|
359
379
|
yield result, operation if block_given?
|
360
|
-
return result
|
361
380
|
end
|
362
381
|
rescue ::Gapic::Rest::Error => e
|
363
382
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -437,6 +456,11 @@ module Google
|
|
437
456
|
# default endpoint URL. The default value of nil uses the environment
|
438
457
|
# universe (usually the default "googleapis.com" universe).
|
439
458
|
# @return [::String,nil]
|
459
|
+
# @!attribute [rw] logger
|
460
|
+
# A custom logger to use for request/response debug logging, or the value
|
461
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
462
|
+
# explicitly disable logging.
|
463
|
+
# @return [::Logger,:default,nil]
|
440
464
|
#
|
441
465
|
class Configuration
|
442
466
|
extend ::Gapic::Config
|
@@ -465,6 +489,7 @@ module Google
|
|
465
489
|
# by the host service.
|
466
490
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
467
491
|
config_attr :bindings_override, {}, ::Hash, nil
|
492
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
468
493
|
|
469
494
|
# @private
|
470
495
|
def initialize parent_config = nil
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the create_challenge REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "create_challenge",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::ConfidentialComputing::V1::Challenge.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "verify_attestation",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponse.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -306,9 +306,28 @@ module Google
|
|
306
306
|
# @!attribute [rw] common
|
307
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
308
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
309
319
|
class GoSettings
|
310
320
|
include ::Google::Protobuf::MessageExts
|
311
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
312
331
|
end
|
313
332
|
|
314
333
|
# Describes the generator configuration for a method.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-confidential_computing-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.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: 2024-12-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.24.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.24.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.5.
|
123
|
+
rubygems_version: 3.5.23
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Attestation verifier for Confidential Space.
|