googleauth 1.2.0 → 1.3.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: a8caed2ed693770223fcf3ec7e28c499c54ad1a2345e132bb182f4ca167a7f68
4
- data.tar.gz: f8f49257aef8acc7fef826ffcb1c1ddb0c81a814488b45f5f0997f5dd6eec4cf
3
+ metadata.gz: 0bc48c47d78d7ec955a2a5557fc8f1cff502a28dd1e18c5af3fc566be5743171
4
+ data.tar.gz: 220a8fed81a73d5bc93a2fca2951a749b9469cb769a198cf13564ad7f714ac90
5
5
  SHA512:
6
- metadata.gz: 1a1b02f55e19af0f26164a8c9dda4aef819791ccb0774ec793b72fa23a352e4c9c52044555d34871e26f04547f3f6bce011738668054fa69e88a800b689397b2
7
- data.tar.gz: d9a68924f0e3f7d0796056f225d41ad905783b5ae1b6766434b8aaf85b6722ba6cfbbb1a92c12237edd4625f02f7e5a55bc0d5289ec6da555846d07c74ef767f
6
+ metadata.gz: 73f52ffce21a05e15102b54aabbcb3cb199d32e9caf318b125b48b6caeddc01f77c3de4ea09513b0b1e9e503c912e55adf5864b4295b86af0620aa0c7df25df4
7
+ data.tar.gz: 7ec107faa35d72aa1fd8e79b86b30df9acf061ce86ac52641bc12b69391f0b4f2adde8021b908327e379dee65c1e2ed7ed1b203e629ca1f4d25a988e80c31eb2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.3.0 (2022-10-18)
4
+
5
+ #### Features
6
+
7
+ * Use OpenSSL 3.0 compatible interfaces for IDTokens ([#397](https://github.com/googleapis/google-auth-library-ruby/issues/397))
8
+
3
9
  ### 1.2.0 (2022-06-23)
4
10
 
5
11
  * Updated minimum Ruby version to 2.6
data/README.md CHANGED
@@ -215,14 +215,14 @@ Custom storage implementations can also be used. See
215
215
 
216
216
  ## Supported Ruby Versions
217
217
 
218
- This library is supported on Ruby 2.5+.
218
+ This library is supported on Ruby 2.6+.
219
219
 
220
220
  Google provides official support for Ruby versions that are actively supported
221
- by Ruby Core—that is, Ruby versions that are either in normal maintenance or in
222
- security maintenance, and not end of life. Currently, this means Ruby 2.5 and
223
- later. Older versions of Ruby _may_ still work, but are unsupported and not
224
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
225
- about the Ruby support schedule.
221
+ by Ruby Core—that is, Ruby versions that are either in normal maintenance or
222
+ in security maintenance, and not end of life. Older versions of Ruby _may_
223
+ still work, but are unsupported and not recommended. See
224
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
225
+ support schedule.
226
226
 
227
227
  ## License
228
228
 
@@ -41,15 +41,15 @@ module Google
41
41
 
42
42
  SYSTEM_DEFAULT_ERROR = "Unable to read the system default credential file".freeze
43
43
 
44
- CLOUD_SDK_CLIENT_ID = "764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.app"\
44
+ CLOUD_SDK_CLIENT_ID = "764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.app" \
45
45
  "s.googleusercontent.com".freeze
46
46
 
47
47
  CLOUD_SDK_CREDENTIALS_WARNING =
48
- "Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most" \
49
- " server applications use service accounts instead. If your application continues to use end user credentials" \
50
- ' from Cloud SDK, you might receive a "quota exceeded" or "API not enabled" error. For more information about' \
51
- " service accounts, see https://cloud.google.com/docs/authentication/. To suppress this message, set the"\
52
- " GOOGLE_AUTH_SUPPRESS_CREDENTIALS_WARNINGS environment variable.".freeze
48
+ "Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most " \
49
+ "server applications use service accounts instead. If your application continues to use end user credentials " \
50
+ 'from Cloud SDK, you might receive a "quota exceeded" or "API not enabled" error. For more information about ' \
51
+ "service accounts, see https://cloud.google.com/docs/authentication/. To suppress this message, set the " \
52
+ "GOOGLE_AUTH_SUPPRESS_CREDENTIALS_WARNINGS environment variable.".freeze
53
53
 
54
54
  # make_creds proxies the construction of a credentials instance
55
55
  #
@@ -130,13 +130,8 @@ module Google
130
130
  end
131
131
  n_bn = OpenSSL::BN.new n_data, 2
132
132
  e_bn = OpenSSL::BN.new e_data, 2
133
- rsa_key = OpenSSL::PKey::RSA.new
134
- if rsa_key.respond_to? :set_key
135
- rsa_key.set_key n_bn, e_bn, nil
136
- else
137
- rsa_key.n = n_bn
138
- rsa_key.e = e_bn
139
- end
133
+ sequence = [OpenSSL::ASN1::Integer.new(n_bn), OpenSSL::ASN1::Integer.new(e_bn)]
134
+ rsa_key = OpenSSL::PKey::RSA.new OpenSSL::ASN1::Sequence(sequence).to_der
140
135
  rsa_key.public_key
141
136
  end
142
137
 
@@ -161,9 +156,13 @@ module Google
161
156
  x_hex = x_data.unpack1 "H*"
162
157
  y_hex = y_data.unpack1 "H*"
163
158
  bn = OpenSSL::BN.new ["04#{x_hex}#{y_hex}"].pack("H*"), 2
164
- key = OpenSSL::PKey::EC.new curve_name
165
- key.public_key = OpenSSL::PKey::EC::Point.new group, bn
166
- key
159
+ point = OpenSSL::PKey::EC::Point.new group, bn
160
+ sequence = OpenSSL::ASN1::Sequence([
161
+ OpenSSL::ASN1::Sequence([OpenSSL::ASN1::ObjectId("id-ecPublicKey"),
162
+ OpenSSL::ASN1::ObjectId(curve_name)]),
163
+ OpenSSL::ASN1::BitString(point.to_octet_string(:uncompressed))
164
+ ])
165
+ OpenSSL::PKey::EC.new sequence.to_der
167
166
  end
168
167
  end
169
168
  end
@@ -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.2.0".freeze
19
+ VERSION = "1.3.0".freeze
20
20
  end
21
21
  end
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.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Emiola
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-23 00:00:00.000000000 Z
11
+ date: 2022-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday