google-cloud-privileged_access_manager 0.1.1 → 0.2.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: 6c5414a23e8310f2f2379de4b37969d3bb2294440ce1049b1cd5a82813ffb124
4
- data.tar.gz: da26a13fb5d759d1fd9811ba28581ea474dfb1d838a7246f9f807c7ca06116c9
3
+ metadata.gz: '082cc8bd6142ee56e0b49bce290fb9adc073279c78c38abc8eeaa8dff9cdd43a'
4
+ data.tar.gz: 54d5be3547a885309a0a6dccfcd59c486b42790276db2fc2017520fcdec282e9
5
5
  SHA512:
6
- metadata.gz: c09252e3f0fe829eb3f874078f4d18a5b6826448d09331251177684b55b442439ba580e5eb35a101c629845e8c74c49d0a497f7a370f91ef5ba771ec3d8cdd99
7
- data.tar.gz: 3cad6a3c8d2b05fb450841d670c71181b61ba00820ec50440bdf9cdace51b90f584293dbf293e962f0aca2a3c550a3576185aff400e7de343aab88f20f914771
6
+ metadata.gz: 066f3225008176df73149e5fb3e15adc607c3b1f5f21affc44b27ca2bc71e734c347b801f9a78359aaebcab9229fed93523248de968d68eb1bfbab4cb2c2761c
7
+ data.tar.gz: 5372c9bff80ad318497b5adb50ca49c02fe6672de683e97e9547ac729383560097be2aff8b7b0c68425a0024bd76ce3bdbd469a66d859594416f9cf96e7aa362
data/README.md CHANGED
@@ -81,9 +81,39 @@ In order to use this library, you first need to go through the following steps:
81
81
  1. [Enable the API.](https://console.cloud.google.com/apis/library/privilegedaccessmanager.googleapis.com)
82
82
  1. {file:AUTHENTICATION.md Set up authentication.}
83
83
 
84
+ ## Debug Logging
85
+
86
+ This library comes with opt-in Debug Logging that can help you troubleshoot
87
+ your application's integration with the API. When logging is activated, key
88
+ events such as requests and responses, along with data payloads and metadata
89
+ such as headers and client configuration, are logged to the standard error
90
+ stream.
91
+
92
+ **WARNING:** Client Library Debug Logging includes your data payloads in
93
+ plaintext, which could include sensitive data such as PII for yourself or your
94
+ customers, private keys, or other security data that could be compromising if
95
+ leaked. Always practice good data hygiene with your application logs, and follow
96
+ the principle of least access. Google also recommends that Client Library Debug
97
+ Logging be enabled only temporarily during active debugging, and not used
98
+ permanently in production.
99
+
100
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
101
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
102
+ list of client library gem names. This will select the default logging behavior,
103
+ which writes logs to the standard error stream. On a local workstation, this may
104
+ result in logs appearing on the console. When running on a Google Cloud hosting
105
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
106
+ results in logs appearing alongside your application logs in the
107
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
108
+
109
+ Debug logging also requires that the versioned clients for this service be
110
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
111
+ working, try updating the versioned clients in your bundle or installed gems:
112
+ [google-cloud-privileged_access_manager-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-privileged_access_manager-v1/latest).
113
+
84
114
  ## Supported Ruby Versions
85
115
 
86
- This library is supported on Ruby 2.7+.
116
+ This library is supported on Ruby 3.0+.
87
117
 
88
118
  Google provides official support for Ruby versions that are actively supported
89
119
  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 Cloud
22
22
  module PrivilegedAccessManager
23
- VERSION = "0.1.1"
23
+ VERSION = "0.2.0"
24
24
  end
25
25
  end
26
26
  end
@@ -58,6 +58,11 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the PrivilegedAccessManager service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::PrivilegedAccessManager.privileged_access_manager_available?}.
65
+ #
61
66
  # ## About PrivilegedAccessManager
62
67
  #
63
68
  # This API allows customers to manage temporary, request based privileged
@@ -98,6 +103,37 @@ module Google
98
103
  service_module.const_get(:Client).new(&block)
99
104
  end
100
105
 
106
+ ##
107
+ # Determines whether the PrivilegedAccessManager service is supported by the current client.
108
+ # If true, you can retrieve a client object by calling {Google::Cloud::PrivilegedAccessManager.privileged_access_manager}.
109
+ # If false, that method will raise an exception. This could happen if the given
110
+ # API version does not exist or does not support the PrivilegedAccessManager service,
111
+ # or if the versioned client gem needs an update to support the PrivilegedAccessManager service.
112
+ #
113
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
114
+ # Defaults to `:v1`.
115
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
116
+ # @return [boolean] Whether the service is available.
117
+ #
118
+ def self.privileged_access_manager_available? version: :v1, transport: :grpc
119
+ require "google/cloud/privileged_access_manager/#{version.to_s.downcase}"
120
+ package_name = Google::Cloud::PrivilegedAccessManager
121
+ .constants
122
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
123
+ .first
124
+ return false unless package_name
125
+ service_module = Google::Cloud::PrivilegedAccessManager.const_get package_name
126
+ return false unless service_module.const_defined? :PrivilegedAccessManager
127
+ service_module = service_module.const_get :PrivilegedAccessManager
128
+ if transport == :rest
129
+ return false unless service_module.const_defined? :Rest
130
+ service_module = service_module.const_get :Rest
131
+ end
132
+ service_module.const_defined? :Client
133
+ rescue ::LoadError
134
+ false
135
+ end
136
+
101
137
  ##
102
138
  # Configure the google-cloud-privileged_access_manager library.
103
139
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-privileged_access_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.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-09 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
@@ -84,7 +83,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
84
83
  licenses:
85
84
  - Apache-2.0
86
85
  metadata: {}
87
- post_install_message:
88
86
  rdoc_options: []
89
87
  require_paths:
90
88
  - lib
@@ -92,15 +90,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
90
  requirements:
93
91
  - - ">="
94
92
  - !ruby/object:Gem::Version
95
- version: '2.7'
93
+ version: '3.0'
96
94
  required_rubygems_version: !ruby/object:Gem::Requirement
97
95
  requirements:
98
96
  - - ">="
99
97
  - !ruby/object:Gem::Version
100
98
  version: '0'
101
99
  requirements: []
102
- rubygems_version: 3.5.6
103
- signing_key:
100
+ rubygems_version: 3.6.2
104
101
  specification_version: 4
105
102
  summary: Privileged Access Manager (PAM) helps you on your journey towards least privilege
106
103
  and helps mitigate risks tied to privileged access misuse or abuse. PAM allows you