google-cloud-security-private_ca 1.4.1 → 1.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: eb99e3272070f99257dffdcf4df8a61d495b73adcad5939810a23e8284b46885
4
- data.tar.gz: 5b1198807640739a881740c1002db94a01e21fcc9803a2610d25625f867eba78
3
+ metadata.gz: 6704b37fe4dac641d7157a1f09598fa58b5b7afc81a00571b6238cc00c786e74
4
+ data.tar.gz: f1b14e9c743011d82afef377359319be007ede1f8de8baac4708093d5f911fb0
5
5
  SHA512:
6
- metadata.gz: ddb6425c5b38d02e426f0a66cde9d153006a2538f37dceb2857ae439a044bbbd64e518cf629a79df6b0df3a9f9a3821521575529e2b8a9035b3f0757a23510fb
7
- data.tar.gz: 1ef7d3dcba1913c997ddad0b51719c4981570c635d17e40acc7b04304ab8ddcc3f714fa6ea9d86fd3b11725c1ee102edfeddfb85fbf1386f9b117236d829c297
6
+ metadata.gz: 28d0e8b31d6348cdc9ebdecf23636701f70935935dc92e4b55c723aee8f98351be71a759009107bc51afef0d0e4e368bc809b2867b5f8608672ec73df5413169
7
+ data.tar.gz: 41616276acc628e3a35eef291d4e06f4ee17e83bd8ff964cbad55d7c3965c4ce4fe9aa80a575d766d321a2f29d25daaf1c4cda74585c94139c1443ad5de37f6c
data/README.md CHANGED
@@ -35,9 +35,40 @@ In order to use this library, you first need to go through the following steps:
35
35
  1. [Enable the API.](https://console.cloud.google.com/apis/library/privateca.googleapis.com)
36
36
  1. {file:AUTHENTICATION.md Set up authentication.}
37
37
 
38
+ ## Debug Logging
39
+
40
+ This library comes with opt-in Debug Logging that can help you troubleshoot
41
+ your application's integration with the API. When logging is activated, key
42
+ events such as requests and responses, along with data payloads and metadata
43
+ such as headers and client configuration, are logged to the standard error
44
+ stream.
45
+
46
+ **WARNING:** Client Library Debug Logging includes your data payloads in
47
+ plaintext, which could include sensitive data such as PII for yourself or your
48
+ customers, private keys, or other security data that could be compromising if
49
+ leaked. Always practice good data hygiene with your application logs, and follow
50
+ the principle of least access. Google also recommends that Client Library Debug
51
+ Logging be enabled only temporarily during active debugging, and not used
52
+ permanently in production.
53
+
54
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
55
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
56
+ list of client library gem names. This will select the default logging behavior,
57
+ which writes logs to the standard error stream. On a local workstation, this may
58
+ result in logs appearing on the console. When running on a Google Cloud hosting
59
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
60
+ results in logs appearing alongside your application logs in the
61
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
62
+
63
+ Debug logging also requires that the versioned clients for this service be
64
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
65
+ working, try updating the versioned clients in your bundle or installed gems:
66
+ [google-cloud-security-private_ca-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest),
67
+ [google-cloud-security-private_ca-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest).
68
+
38
69
  ## Supported Ruby Versions
39
70
 
40
- This library is supported on Ruby 2.7+.
71
+ This library is supported on Ruby 3.0+.
41
72
 
42
73
  Google provides official support for Ruby versions that are actively supported
43
74
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Security
23
23
  module PrivateCA
24
- VERSION = "1.4.1"
24
+ VERSION = "1.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -59,6 +59,11 @@ module Google
59
59
  # You can also specify a different transport by passing `:rest` or `:grpc` in
60
60
  # the `transport` parameter.
61
61
  #
62
+ # Raises an exception if the currently installed versioned client gem for the
63
+ # given API version does not support the given transport of the CertificateAuthorityService service.
64
+ # You can determine whether the method will succeed by calling
65
+ # {Google::Cloud::Security::PrivateCA.certificate_authority_service_available?}.
66
+ #
62
67
  # ## About CertificateAuthorityService
63
68
  #
64
69
  # [Certificate Authority
@@ -82,6 +87,37 @@ module Google
82
87
  service_module.const_get(:Client).new(&block)
83
88
  end
84
89
 
90
+ ##
91
+ # Determines whether the CertificateAuthorityService service is supported by the current client.
92
+ # If true, you can retrieve a client object by calling {Google::Cloud::Security::PrivateCA.certificate_authority_service}.
93
+ # If false, that method will raise an exception. This could happen if the given
94
+ # API version does not exist or does not support the CertificateAuthorityService service,
95
+ # or if the versioned client gem needs an update to support the CertificateAuthorityService service.
96
+ #
97
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
98
+ # Defaults to `:v1`.
99
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
100
+ # @return [boolean] Whether the service is available.
101
+ #
102
+ def self.certificate_authority_service_available? version: :v1, transport: :grpc
103
+ require "google/cloud/security/private_ca/#{version.to_s.downcase}"
104
+ package_name = Google::Cloud::Security::PrivateCA
105
+ .constants
106
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
107
+ .first
108
+ return false unless package_name
109
+ service_module = Google::Cloud::Security::PrivateCA.const_get package_name
110
+ return false unless service_module.const_defined? :CertificateAuthorityService
111
+ service_module = service_module.const_get :CertificateAuthorityService
112
+ if transport == :rest
113
+ return false unless service_module.const_defined? :Rest
114
+ service_module = service_module.const_get :Rest
115
+ end
116
+ service_module.const_defined? :Client
117
+ rescue ::LoadError
118
+ false
119
+ end
120
+
85
121
  ##
86
122
  # Configure the google-cloud-security-private_ca library.
87
123
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-security-private_ca
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.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-08-08 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: google-cloud-core
@@ -83,7 +82,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
83
82
  licenses:
84
83
  - Apache-2.0
85
84
  metadata: {}
86
- post_install_message:
87
85
  rdoc_options: []
88
86
  require_paths:
89
87
  - lib
@@ -91,15 +89,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
89
  requirements:
92
90
  - - ">="
93
91
  - !ruby/object:Gem::Version
94
- version: '2.7'
92
+ version: '3.0'
95
93
  required_rubygems_version: !ruby/object:Gem::Requirement
96
94
  requirements:
97
95
  - - ">="
98
96
  - !ruby/object:Gem::Version
99
97
  version: '0'
100
98
  requirements: []
101
- rubygems_version: 3.5.6
102
- signing_key:
99
+ rubygems_version: 3.6.2
103
100
  specification_version: 4
104
101
  summary: API Client library for the Certificate Authority Service API
105
102
  test_files: []