google-cloud-secret_manager 1.4.1 → 2.0.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: 0ff192e14b161bedef7a5930d7f6cbb2978f427bc91173af9966e919bb7fb9b3
4
- data.tar.gz: a3bee0795f6cdf86205272d75436cff9789af25c93dec30c38b9440bb49d4e7a
3
+ metadata.gz: 9238dafb032a287c21de825221e926f403aea24ebe34ef32fa9b5e7cc7cdb960
4
+ data.tar.gz: 71bc04d1c6f52f33def1ce3b10ca31c0b54ff417116fa6893f137c03e83c9a50
5
5
  SHA512:
6
- metadata.gz: 35d53e4490c62615cd1d4d1bb087e5743ff1b63a1bd79fc9d1c20e34d372f6436426f49e5527c7e58ec6e858c1bed571234534820eba8bb11c556072883b5bd3
7
- data.tar.gz: 6aebb126f720fb1311957b5cf1d65f069f7481df0c162c6a229d75760e18a2fc62d99b76b42d651a94995b2216fccbef08b8e8871e3573e20f7b8b385bce35b1
6
+ metadata.gz: 70aa9e2045df32d409aae21ff6dcaa4c592fc7ee56a56e5c79f5ce90fe4760fd41985c0f079718ab2f9d0ed1da81d950997741ab194d856ca403362882286183
7
+ data.tar.gz: 4fc268ecf56553a7d4a384fe1cccd8454874e4e782d7146dfb1218fd434b7ed75e42ac6257069ca0e666d1db9be8d92fa16eee5b4dbe46ed6269faa00ef3542a
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-secret_manager, to see the convenience methods fo
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-secret_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest),
20
- [google-cloud-secret_manager-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1beta1/latest).
19
+ [google-cloud-secret_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/secret-manager)
23
22
  for more usage information.
@@ -35,35 +34,39 @@ In order to use this library, you first need to go through the following steps:
35
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/secretmanager.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
36
 
38
- ## Enabling Logging
39
-
40
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
41
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
42
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
43
- 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)
44
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
45
-
46
- Configuring a Ruby stdlib logger:
47
-
48
- ```ruby
49
- require "logger"
50
-
51
- module MyLogger
52
- LOGGER = Logger.new $stderr, level: Logger::WARN
53
- def logger
54
- LOGGER
55
- end
56
- end
57
-
58
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
59
- module GRPC
60
- extend MyLogger
61
- end
62
- ```
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-cloud-secret_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest).
63
66
 
64
67
  ## Supported Ruby Versions
65
68
 
66
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
67
70
 
68
71
  Google provides official support for Ruby versions that are actively supported
69
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module SecretManager
19
- VERSION = "1.4.1".freeze
19
+ VERSION = "2.0.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -56,6 +56,11 @@ module Google
56
56
  # supported by that API version, and the corresponding gem is available, the
57
57
  # appropriate versioned client will be returned.
58
58
  #
59
+ # Raises an exception if the currently installed versioned client gem for the
60
+ # given API version does not support the SecretManagerService service.
61
+ # You can determine whether the method will succeed by calling
62
+ # {Google::Cloud::SecretManager.secret_manager_service_available?}.
63
+ #
59
64
  # ## About SecretManagerService
60
65
  #
61
66
  # Secret Manager Service
@@ -81,6 +86,32 @@ module Google
81
86
  service_module.const_get(:Client).new(&block)
82
87
  end
83
88
 
89
+ ##
90
+ # Determines whether the SecretManagerService service is supported by the current client.
91
+ # If true, you can retrieve a client object by calling {Google::Cloud::SecretManager.secret_manager_service}.
92
+ # If false, that method will raise an exception. This could happen if the given
93
+ # API version does not exist or does not support the SecretManagerService service,
94
+ # or if the versioned client gem needs an update to support the SecretManagerService service.
95
+ #
96
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
97
+ # Defaults to `:v1`.
98
+ # @return [boolean] Whether the service is available.
99
+ #
100
+ def self.secret_manager_service_available? version: :v1
101
+ require "google/cloud/secret_manager/#{version.to_s.downcase}"
102
+ package_name = Google::Cloud::SecretManager
103
+ .constants
104
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
105
+ .first
106
+ return false unless package_name
107
+ service_module = Google::Cloud::SecretManager.const_get package_name
108
+ return false unless service_module.const_defined? :SecretManagerService
109
+ service_module = service_module.const_get :SecretManagerService
110
+ service_module.const_defined? :Client
111
+ rescue ::LoadError
112
+ false
113
+ end
114
+
84
115
  ##
85
116
  # Configure the google-cloud-secret_manager library.
86
117
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-secret_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 2.0.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-02-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -28,42 +27,16 @@ dependencies:
28
27
  name: google-cloud-secret_manager-v1
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0.19'
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: 2.a
37
- type: :runtime
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '0.19'
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: 2.a
47
- - !ruby/object:Gem::Dependency
48
- name: google-cloud-secret_manager-v1beta1
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: '0.3'
54
- - - "<"
30
+ - - "~>"
55
31
  - !ruby/object:Gem::Version
56
- version: 2.a
32
+ version: '1.2'
57
33
  type: :runtime
58
34
  prerelease: false
59
35
  version_requirements: !ruby/object:Gem::Requirement
60
36
  requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: '0.3'
64
- - - "<"
37
+ - - "~>"
65
38
  - !ruby/object:Gem::Version
66
- version: 2.a
39
+ version: '1.2'
67
40
  description: Secret Manager is a secure and convenient storage system for API keys,
68
41
  passwords, certificates, and other sensitive data. Secret Manager provides a central
69
42
  place and single source of truth to manage, access, and audit secrets across Google
@@ -84,7 +57,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
84
57
  licenses:
85
58
  - Apache-2.0
86
59
  metadata: {}
87
- post_install_message:
88
60
  rdoc_options: []
89
61
  require_paths:
90
62
  - lib
@@ -92,15 +64,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
64
  requirements:
93
65
  - - ">="
94
66
  - !ruby/object:Gem::Version
95
- version: '2.7'
67
+ version: '3.0'
96
68
  required_rubygems_version: !ruby/object:Gem::Requirement
97
69
  requirements:
98
70
  - - ">="
99
71
  - !ruby/object:Gem::Version
100
72
  version: '0'
101
73
  requirements: []
102
- rubygems_version: 3.5.6
103
- signing_key:
74
+ rubygems_version: 3.6.3
104
75
  specification_version: 4
105
76
  summary: API Client library for the Secret Manager API
106
77
  test_files: []