googleauth 1.17.0 → 1.17.2

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: af793408bd622c160b50d6839cea9d58523e1424c05cf5fa52beecd93b52aee9
4
- data.tar.gz: 0131f0f3459d5e093b1de8fe48d1986a7b51b583be9a3a23383624dea6c5112c
3
+ metadata.gz: bc45e207ab32f63ca0badeb96e1706bc80d38931ff0b69caa0a9a111163aa340
4
+ data.tar.gz: 8de82f27d3a8df7a71d0d11ebae8e814a60a3fc963f26825e1c4d420c910dc44
5
5
  SHA512:
6
- metadata.gz: c5ea780b6bc8b2ae699cb5839f8e4dcfdea65133ec0bd90396c6c1383a6ae34a2b71af9027319c67226faa5ec55e55d75b9aae434e37581ef8e9f54337cd8f5c
7
- data.tar.gz: 972fcf255773491f037a360fb8c1d557594b5413f8024cc1c888f7d18536e4b3ff732ffb5f928291984348bb5e0f87af34b01054b3f5f3cd16262f75d1cb4260
6
+ metadata.gz: e3d50e8368efa58acb323b0fde998d3006a00ca4f044f72f5cb04f2313c3340a7f7577710b3b3a034f9d58699583952bdb60e9eb4d5ecbef3319f01d6e4bf713
7
+ data.tar.gz: ebb4d26b60a9f6d2744cd184dce52c13551773d706319bb53c6566001b39312d87f6c7c98f0ee5b15bda856447a2516f8f2336e6eb7437db8898776e1ac6dc9d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Release History
2
2
 
3
+ ### 1.17.2 (2026-07-23)
4
+
5
+ #### Bug Fixes
6
+
7
+ * return auth header from source_credentials in ImpersonatedServiceAccountCredentials ([#586](https://github.com/googleapis/google-auth-library-ruby/issues/586))
8
+
9
+ ### 1.17.1 (2026-06-08)
10
+
11
+ #### Bug Fixes
12
+
13
+ * repair impersonated email helper ([#578](https://github.com/googleapis/google-auth-library-ruby/issues/578)) ([6317f9b](https://github.com/googleapis/google-auth-library-ruby/commit/6317f9b3f44a26ffff569ed29a09b929cc2ab45e)), closes [#577](https://github.com/googleapis/google-auth-library-ruby/issues/577)
14
+
3
15
  ### 1.17.0 (2026-06-04)
4
16
 
5
17
  #### Features
data/README.md CHANGED
@@ -265,7 +265,7 @@ Custom storage implementations can also be used. See
265
265
 
266
266
  ## Supported Ruby Versions
267
267
 
268
- This library is supported on Ruby 3.0+.
268
+ This library is supported on Ruby 3.2+.
269
269
 
270
270
  Google provides official support for Ruby versions that are actively supported
271
271
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -101,13 +101,8 @@ module Google
101
101
  # service_account_impersonation_url, or nil if it cannot be determined
102
102
  def service_account_email
103
103
  return nil if @service_account_impersonation_url.nil?
104
- start_idx = @service_account_impersonation_url.rindex "/"
105
- end_idx = @service_account_impersonation_url.index ":generateAccessToken"
106
- if start_idx != -1 && end_idx != -1 && start_idx < end_idx
107
- start_idx += 1
108
- return @service_account_impersonation_url[start_idx..end_idx]
109
- end
110
- nil
104
+ match = @service_account_impersonation_url.match %r{serviceAccounts/([^:]+):generateAccessToken$}
105
+ match[1] if match
111
106
  end
112
107
  end
113
108
  end
@@ -135,13 +135,13 @@ module Google
135
135
  rsa_key.public_key
136
136
  end
137
137
 
138
- # @private
139
138
  CURVE_NAME_MAP = {
140
139
  "P-256" => "prime256v1",
141
140
  "P-384" => "secp384r1",
142
141
  "P-521" => "secp521r1",
143
142
  "secp256k1" => "secp256k1"
144
143
  }.freeze
144
+ private_constant :CURVE_NAME_MAP
145
145
 
146
146
  def extract_ec_key jwk
147
147
  begin
@@ -109,13 +109,13 @@ module Google
109
109
  payload["azp"] ||= payload["cid"] if payload.key? "cid"
110
110
 
111
111
  # Payload content validation
112
- if aud && (Array(aud) & Array(payload["aud"])).empty?
112
+ if aud && !Array(aud).intersect?(Array(payload["aud"]))
113
113
  raise AudienceMismatchError, "Token aud mismatch: #{payload['aud']}"
114
114
  end
115
- if azp && (Array(azp) & Array(payload["azp"])).empty?
115
+ if azp && !Array(azp).intersect?(Array(payload["azp"]))
116
116
  raise AuthorizedPartyMismatchError, "Token azp mismatch: #{payload['azp']}"
117
117
  end
118
- if iss && (Array(iss) & Array(payload["iss"])).empty?
118
+ if iss && !Array(iss).intersect?(Array(payload["iss"]))
119
119
  raise IssuerMismatchError, "Token iss mismatch: #{payload['iss']}"
120
120
  end
121
121
 
@@ -297,9 +297,9 @@ module Google
297
297
  # @private
298
298
  # @return [Hash] The authorization header with the source credentials' token
299
299
  def prepare_auth_header
300
- auth_header = {}
301
- @source_credentials.updater_proc.call auth_header
302
- auth_header
300
+ # updater_proc returns a new hash containing authorization headers
301
+ # rather than mutating the passed hash in place.
302
+ @source_credentials.updater_proc.call({})
303
303
  end
304
304
 
305
305
  # Makes the HTTP request to the impersonation endpoint.
@@ -16,6 +16,6 @@ module Google
16
16
  # Module Auth provides classes that provide Google-specific authorization
17
17
  # used to access Google APIs.
18
18
  module Auth
19
- VERSION = "1.17.0".freeze
19
+ VERSION = "1.17.2".freeze
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: googleauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -198,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: '3.0'
201
+ version: '3.2'
202
202
  required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  requirements:
204
204
  - - ">="