googleauth 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/googleauth/service_account.rb +16 -6
- data/lib/googleauth/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '089cb78f4121da1e8502eb258e106d161b72642f1d4aeb9959ea605197dba5d9'
|
4
|
+
data.tar.gz: a93423d64db3c8e0fb55807586befc3d13480c43e17b4a8cbd37704f95d12fa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d3513b20df2ec263c7f7db1a14421d4fef63fdaf836cbad78c62b22bf8399bd6ed7a830ba8548ffa197e6a7279eb0f8aaab65379c7cf1b4612a494e9a83a8ec
|
7
|
+
data.tar.gz: 8ee1b859360348eded906242f44e7a7d58841a864e195f34b0726c2aba660e6c10ae07e27d3d2a4517e1756b5ff989e449aad0965419995b4f2bc58ad45ae597
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 1.9.2 (2024-01-25)
|
4
|
+
|
5
|
+
#### Bug Fixes
|
6
|
+
|
7
|
+
* Prevent access tokens from being fetched at service account construction in the self-signed-jwt case ([#467](https://github.com/googleapis/google-auth-library-ruby/issues/467))
|
8
|
+
|
3
9
|
### 1.9.1 (2023-12-12)
|
4
10
|
|
5
11
|
#### Bug Fixes
|
@@ -39,7 +39,11 @@ module Google
|
|
39
39
|
attr_reader :quota_project_id
|
40
40
|
|
41
41
|
def enable_self_signed_jwt?
|
42
|
-
|
42
|
+
# Use a self-singed JWT if there's no information that can be used to
|
43
|
+
# obtain an OAuth token, OR if there are scopes but also an assertion
|
44
|
+
# that they are default scopes that shouldn't be used to fetch a token,
|
45
|
+
# OR we are not in the default universe and thus OAuth isn't supported.
|
46
|
+
target_audience.nil? && (scope.nil? || @enable_self_signed_jwt || universe_domain != "googleapis.com")
|
43
47
|
end
|
44
48
|
|
45
49
|
# Creates a ServiceAccountCredentials.
|
@@ -95,17 +99,18 @@ module Google
|
|
95
99
|
# Extends the base class to use a transient
|
96
100
|
# ServiceAccountJwtHeaderCredentials for certain cases.
|
97
101
|
def apply! a_hash, opts = {}
|
98
|
-
|
99
|
-
# obtain an OAuth token, OR if there are scopes but also an assertion
|
100
|
-
# that they are default scopes that shouldn't be used to fetch a token,
|
101
|
-
# OR we are not in the default universe and thus OAuth isn't supported.
|
102
|
-
if target_audience.nil? && (scope.nil? || enable_self_signed_jwt? || universe_domain != "googleapis.com")
|
102
|
+
if enable_self_signed_jwt?
|
103
103
|
apply_self_signed_jwt! a_hash
|
104
104
|
else
|
105
105
|
super
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
109
|
+
# Modifies this logic so it also requires self-signed-jwt to be disabled
|
110
|
+
def needs_access_token?
|
111
|
+
super && !enable_self_signed_jwt?
|
112
|
+
end
|
113
|
+
|
109
114
|
private
|
110
115
|
|
111
116
|
def apply_self_signed_jwt! a_hash
|
@@ -216,6 +221,11 @@ module Google
|
|
216
221
|
|
217
222
|
JWT.encode assertion, @signing_key, SIGNING_ALGORITHM
|
218
223
|
end
|
224
|
+
|
225
|
+
# Duck-types the corresponding method from BaseClient
|
226
|
+
def needs_access_token?
|
227
|
+
false
|
228
|
+
end
|
219
229
|
end
|
220
230
|
end
|
221
231
|
end
|
data/lib/googleauth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: googleauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Emiola
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0'
|
188
188
|
requirements: []
|
189
|
-
rubygems_version: 3.
|
189
|
+
rubygems_version: 3.5.3
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: Google Auth Library for Ruby
|