google-iam-v1beta 0.8.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41abc13c2babd9bb190bce9a405515b5ad24f3f75c38599f5695fc0c867554aa
4
- data.tar.gz: 2c91f1202fa931e7b4ff7da8534f0e2a994fdce22bae4214d194a426a9ad328f
3
+ metadata.gz: 455b0183c36b345078fd32aaa47fa3534f663bcc3863405b891c5e50b0f31739
4
+ data.tar.gz: 9b080a31934ebd5c3df69b1a25d72e948fe20366dc2be3efac5e994612b24a78
5
5
  SHA512:
6
- metadata.gz: 7ddea03926abe793c7b0480d96a9b6d7ed07302b1bb061b3280fb459d8331db5ecc7e7db50e800bb7352b2710bce40c35ead295e8be99b3dbd3fe67a93b24be6
7
- data.tar.gz: ad8d3bec9919c1e1aecb0e22f2528c74b6680fc8c90643275bf24ca3ed1f6a9474127d90791863e17350ad39d4f69ba408b96a63f8c8298a5458b1fe432ddb7c
6
+ metadata.gz: 93b4cd026d7bee115a7f743a41992bd2665c2d3d4c5c8b786eba129abaf442eae42a2bc0ecf8fd326b12dfe65023baab464e384367b9fd90ac3ed927523857ee
7
+ data.tar.gz: d849d4e31583df52d8e76514578f6c19e9106bb16384ad422bf13dfba7e5a4700b0271791df6a12818509d878a0c9ad70bc9cff6777b85389d10eb162bae0f87
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/iam/docs/manage-workload-identity-pools-providers)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
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/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
- 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
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/iam/v1beta"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
86
 
77
87
  ## Supported Ruby Versions
78
88
 
79
- This library is supported on Ruby 2.7+.
89
+ This library is supported on Ruby 3.0+.
80
90
 
81
91
  Google provides official support for Ruby versions that are actively supported
82
92
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Iam
22
22
  module V1beta
23
- VERSION = "0.8.2"
23
+ VERSION = "0.10.0"
24
24
  end
25
25
  end
26
26
  end
@@ -223,8 +223,19 @@ module Google
223
223
  universe_domain: @config.universe_domain,
224
224
  channel_args: @config.channel_args,
225
225
  interceptors: @config.interceptors,
226
- channel_pool_config: @config.channel_pool
226
+ channel_pool_config: @config.channel_pool,
227
+ logger: @config.logger
227
228
  )
229
+
230
+ @workload_identity_pools_stub.stub_logger&.info do |entry|
231
+ entry.set_system_name
232
+ entry.set_service
233
+ entry.message = "Created client for #{entry.service}"
234
+ entry.set_credentials_fields credentials
235
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
236
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
237
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
238
+ end
228
239
  end
229
240
 
230
241
  ##
@@ -234,6 +245,15 @@ module Google
234
245
  #
235
246
  attr_reader :operations_client
236
247
 
248
+ ##
249
+ # The logger used for request/response debug logging.
250
+ #
251
+ # @return [Logger]
252
+ #
253
+ def logger
254
+ @workload_identity_pools_stub.logger
255
+ end
256
+
237
257
  # Service calls
238
258
 
239
259
  ##
@@ -333,7 +353,7 @@ module Google
333
353
  @workload_identity_pools_stub.call_rpc :list_workload_identity_pools, request, options: options do |response, operation|
334
354
  response = ::Gapic::PagedEnumerable.new @workload_identity_pools_stub, :list_workload_identity_pools, request, response, operation, options
335
355
  yield response, operation if block_given?
336
- return response
356
+ throw :response, response
337
357
  end
338
358
  rescue ::GRPC::BadStatus => e
339
359
  raise ::Google::Cloud::Error.from_error(e)
@@ -420,7 +440,6 @@ module Google
420
440
 
421
441
  @workload_identity_pools_stub.call_rpc :get_workload_identity_pool, request, options: options do |response, operation|
422
442
  yield response, operation if block_given?
423
- return response
424
443
  end
425
444
  rescue ::GRPC::BadStatus => e
426
445
  raise ::Google::Cloud::Error.from_error(e)
@@ -525,7 +544,7 @@ module Google
525
544
  @workload_identity_pools_stub.call_rpc :create_workload_identity_pool, request, options: options do |response, operation|
526
545
  response = ::Gapic::Operation.new response, @operations_client, options: options
527
546
  yield response, operation if block_given?
528
- return response
547
+ throw :response, response
529
548
  end
530
549
  rescue ::GRPC::BadStatus => e
531
550
  raise ::Google::Cloud::Error.from_error(e)
@@ -622,7 +641,7 @@ module Google
622
641
  @workload_identity_pools_stub.call_rpc :update_workload_identity_pool, request, options: options do |response, operation|
623
642
  response = ::Gapic::Operation.new response, @operations_client, options: options
624
643
  yield response, operation if block_given?
625
- return response
644
+ throw :response, response
626
645
  end
627
646
  rescue ::GRPC::BadStatus => e
628
647
  raise ::Google::Cloud::Error.from_error(e)
@@ -727,7 +746,7 @@ module Google
727
746
  @workload_identity_pools_stub.call_rpc :delete_workload_identity_pool, request, options: options do |response, operation|
728
747
  response = ::Gapic::Operation.new response, @operations_client, options: options
729
748
  yield response, operation if block_given?
730
- return response
749
+ throw :response, response
731
750
  end
732
751
  rescue ::GRPC::BadStatus => e
733
752
  raise ::Google::Cloud::Error.from_error(e)
@@ -822,7 +841,7 @@ module Google
822
841
  @workload_identity_pools_stub.call_rpc :undelete_workload_identity_pool, request, options: options do |response, operation|
823
842
  response = ::Gapic::Operation.new response, @operations_client, options: options
824
843
  yield response, operation if block_given?
825
- return response
844
+ throw :response, response
826
845
  end
827
846
  rescue ::GRPC::BadStatus => e
828
847
  raise ::Google::Cloud::Error.from_error(e)
@@ -926,7 +945,7 @@ module Google
926
945
  @workload_identity_pools_stub.call_rpc :list_workload_identity_pool_providers, request, options: options do |response, operation|
927
946
  response = ::Gapic::PagedEnumerable.new @workload_identity_pools_stub, :list_workload_identity_pool_providers, request, response, operation, options
928
947
  yield response, operation if block_given?
929
- return response
948
+ throw :response, response
930
949
  end
931
950
  rescue ::GRPC::BadStatus => e
932
951
  raise ::Google::Cloud::Error.from_error(e)
@@ -1013,7 +1032,6 @@ module Google
1013
1032
 
1014
1033
  @workload_identity_pools_stub.call_rpc :get_workload_identity_pool_provider, request, options: options do |response, operation|
1015
1034
  yield response, operation if block_given?
1016
- return response
1017
1035
  end
1018
1036
  rescue ::GRPC::BadStatus => e
1019
1037
  raise ::Google::Cloud::Error.from_error(e)
@@ -1119,7 +1137,7 @@ module Google
1119
1137
  @workload_identity_pools_stub.call_rpc :create_workload_identity_pool_provider, request, options: options do |response, operation|
1120
1138
  response = ::Gapic::Operation.new response, @operations_client, options: options
1121
1139
  yield response, operation if block_given?
1122
- return response
1140
+ throw :response, response
1123
1141
  end
1124
1142
  rescue ::GRPC::BadStatus => e
1125
1143
  raise ::Google::Cloud::Error.from_error(e)
@@ -1216,7 +1234,7 @@ module Google
1216
1234
  @workload_identity_pools_stub.call_rpc :update_workload_identity_pool_provider, request, options: options do |response, operation|
1217
1235
  response = ::Gapic::Operation.new response, @operations_client, options: options
1218
1236
  yield response, operation if block_given?
1219
- return response
1237
+ throw :response, response
1220
1238
  end
1221
1239
  rescue ::GRPC::BadStatus => e
1222
1240
  raise ::Google::Cloud::Error.from_error(e)
@@ -1316,7 +1334,7 @@ module Google
1316
1334
  @workload_identity_pools_stub.call_rpc :delete_workload_identity_pool_provider, request, options: options do |response, operation|
1317
1335
  response = ::Gapic::Operation.new response, @operations_client, options: options
1318
1336
  yield response, operation if block_given?
1319
- return response
1337
+ throw :response, response
1320
1338
  end
1321
1339
  rescue ::GRPC::BadStatus => e
1322
1340
  raise ::Google::Cloud::Error.from_error(e)
@@ -1412,7 +1430,7 @@ module Google
1412
1430
  @workload_identity_pools_stub.call_rpc :undelete_workload_identity_pool_provider, request, options: options do |response, operation|
1413
1431
  response = ::Gapic::Operation.new response, @operations_client, options: options
1414
1432
  yield response, operation if block_given?
1415
- return response
1433
+ throw :response, response
1416
1434
  end
1417
1435
  rescue ::GRPC::BadStatus => e
1418
1436
  raise ::Google::Cloud::Error.from_error(e)
@@ -1462,6 +1480,13 @@ module Google
1462
1480
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1463
1481
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1464
1482
  # * (`nil`) indicating no credentials
1483
+ #
1484
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1485
+ # external source for authentication to Google Cloud, you must validate it before
1486
+ # providing it to a Google API client library. Providing an unvalidated credential
1487
+ # configuration to Google APIs can compromise the security of your systems and data.
1488
+ # For more information, refer to [Validate credential configurations from external
1489
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1465
1490
  # @return [::Object]
1466
1491
  # @!attribute [rw] scope
1467
1492
  # The OAuth scopes
@@ -1501,6 +1526,11 @@ module Google
1501
1526
  # default endpoint URL. The default value of nil uses the environment
1502
1527
  # universe (usually the default "googleapis.com" universe).
1503
1528
  # @return [::String,nil]
1529
+ # @!attribute [rw] logger
1530
+ # A custom logger to use for request/response debug logging, or the value
1531
+ # `:default` (the default) to construct a default logger, or `nil` to
1532
+ # explicitly disable logging.
1533
+ # @return [::Logger,:default,nil]
1504
1534
  #
1505
1535
  class Configuration
1506
1536
  extend ::Gapic::Config
@@ -1525,6 +1555,7 @@ module Google
1525
1555
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1526
1556
  config_attr :quota_project, nil, ::String, nil
1527
1557
  config_attr :universe_domain, nil, ::String, nil
1558
+ config_attr :logger, :default, ::Logger, nil, :default
1528
1559
 
1529
1560
  # @private
1530
1561
  def initialize parent_config = nil
@@ -212,7 +212,7 @@ module Google
212
212
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
213
213
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
214
214
  yield response, operation if block_given?
215
- return response
215
+ throw :response, response
216
216
  end
217
217
  rescue ::GRPC::BadStatus => e
218
218
  raise ::Google::Cloud::Error.from_error(e)
@@ -308,7 +308,7 @@ module Google
308
308
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
309
309
  response = ::Gapic::Operation.new response, @operations_client, options: options
310
310
  yield response, operation if block_given?
311
- return response
311
+ throw :response, response
312
312
  end
313
313
  rescue ::GRPC::BadStatus => e
314
314
  raise ::Google::Cloud::Error.from_error(e)
@@ -397,7 +397,6 @@ module Google
397
397
 
398
398
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
399
399
  yield response, operation if block_given?
400
- return response
401
400
  end
402
401
  rescue ::GRPC::BadStatus => e
403
402
  raise ::Google::Cloud::Error.from_error(e)
@@ -493,7 +492,6 @@ module Google
493
492
 
494
493
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
495
494
  yield response, operation if block_given?
496
- return response
497
495
  end
498
496
  rescue ::GRPC::BadStatus => e
499
497
  raise ::Google::Cloud::Error.from_error(e)
@@ -591,7 +589,7 @@ module Google
591
589
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
592
590
  response = ::Gapic::Operation.new response, @operations_client, options: options
593
591
  yield response, operation if block_given?
594
- return response
592
+ throw :response, response
595
593
  end
596
594
  rescue ::GRPC::BadStatus => e
597
595
  raise ::Google::Cloud::Error.from_error(e)
@@ -641,6 +639,13 @@ module Google
641
639
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
642
640
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
643
641
  # * (`nil`) indicating no credentials
642
+ #
643
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
644
+ # external source for authentication to Google Cloud, you must validate it before
645
+ # providing it to a Google API client library. Providing an unvalidated credential
646
+ # configuration to Google APIs can compromise the security of your systems and data.
647
+ # For more information, refer to [Validate credential configurations from external
648
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
644
649
  # @return [::Object]
645
650
  # @!attribute [rw] scope
646
651
  # The OAuth scopes
@@ -680,6 +685,11 @@ module Google
680
685
  # default endpoint URL. The default value of nil uses the environment
681
686
  # universe (usually the default "googleapis.com" universe).
682
687
  # @return [::String,nil]
688
+ # @!attribute [rw] logger
689
+ # A custom logger to use for request/response debug logging, or the value
690
+ # `:default` (the default) to construct a default logger, or `nil` to
691
+ # explicitly disable logging.
692
+ # @return [::Logger,:default,nil]
683
693
  #
684
694
  class Configuration
685
695
  extend ::Gapic::Config
@@ -704,6 +714,7 @@ module Google
704
714
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
705
715
  config_attr :quota_project, nil, ::String, nil
706
716
  config_attr :universe_domain, nil, ::String, nil
717
+ config_attr :logger, :default, ::Logger, nil, :default
707
718
 
708
719
  # @private
709
720
  def initialize parent_config = nil
@@ -194,9 +194,13 @@ module Google
194
194
  # @!attribute [rw] aws
195
195
  # @return [::Google::Iam::V1beta::WorkloadIdentityPoolProvider::Aws]
196
196
  # An Amazon Web Services identity provider.
197
+ #
198
+ # Note: The following fields are mutually exclusive: `aws`, `oidc`. If a field in that set is populated, all other fields in the set will automatically be cleared.
197
199
  # @!attribute [rw] oidc
198
200
  # @return [::Google::Iam::V1beta::WorkloadIdentityPoolProvider::Oidc]
199
201
  # An OpenId Connect 1.0 identity provider.
202
+ #
203
+ # Note: The following fields are mutually exclusive: `oidc`, `aws`. If a field in that set is populated, all other fields in the set will automatically be cleared.
200
204
  class WorkloadIdentityPoolProvider
201
205
  include ::Google::Protobuf::MessageExts
202
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -40,6 +40,8 @@ module Google
40
40
  # @!attribute [rw] error
41
41
  # @return [::Google::Rpc::Status]
42
42
  # The error result of the operation in case of failure or cancellation.
43
+ #
44
+ # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
43
45
  # @!attribute [rw] response
44
46
  # @return [::Google::Protobuf::Any]
45
47
  # The normal, successful response of the operation. If the original
@@ -50,6 +52,8 @@ module Google
50
52
  # is the original method name. For example, if the original method name
51
53
  # is `TakeSnapshot()`, the inferred response type is
52
54
  # `TakeSnapshotResponse`.
55
+ #
56
+ # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
53
57
  class Operation
54
58
  include ::Google::Protobuf::MessageExts
55
59
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-iam-v1beta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-05 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: gapic-common
@@ -16,7 +15,7 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 0.21.1
18
+ version: 0.25.0
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
21
  version: 2.a
@@ -26,7 +25,7 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- version: 0.21.1
28
+ version: 0.25.0
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
31
  version: 2.a
@@ -82,7 +81,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
82
81
  licenses:
83
82
  - Apache-2.0
84
83
  metadata: {}
85
- post_install_message:
86
84
  rdoc_options: []
87
85
  require_paths:
88
86
  - lib
@@ -90,15 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
88
  requirements:
91
89
  - - ">="
92
90
  - !ruby/object:Gem::Version
93
- version: '2.7'
91
+ version: '3.0'
94
92
  required_rubygems_version: !ruby/object:Gem::Requirement
95
93
  requirements:
96
94
  - - ">="
97
95
  - !ruby/object:Gem::Version
98
96
  version: '0'
99
97
  requirements: []
100
- rubygems_version: 3.5.23
101
- signing_key:
98
+ rubygems_version: 3.6.2
102
99
  specification_version: 4
103
100
  summary: 'Manages identity and access control for Google Cloud Platform resources,
104
101
  including the creation of service accounts, which you can use to authenticate to