gitlab-omniauth-openid-connect 0.8.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62584a1fdd8af0168b5b81d04cce7f90284f9b8fcc97a59d6c4de38fc55e9ce7
4
- data.tar.gz: d17b803694124786490472be60eccc9f717843c3a3b93e0fa4b449d8868b6a14
3
+ metadata.gz: f9e4b37ffe9ea66f041a1780fe3f8cdbb17682407bcc6d7e495af13afd2a1c85
4
+ data.tar.gz: 66c895a42c14a42a7f1185614f0c8a94d3798c3ea78307edcf28da72c534c2a4
5
5
  SHA512:
6
- metadata.gz: 77e2a464db549e4bdc30a7ba1d37a6e160688274819af19e8caa0f10ad606d837c40f49c0f887570881d92687dc5c7db1b705e6ed4afa347d97d578365ec5d41
7
- data.tar.gz: 66f5ebc52581daf1c45b2be51e5ec50096a40f979e7d8684b281c84e8fe13edf05e71e7b25d623d75049fed5b8bb1339d509560278014b680cab7247398b9019
6
+ metadata.gz: 9b83177983d8a47d5343e8ae27600c483057b0cfe352f3443e18354dd04bd8ea780fee62e17082be2933639a4a2dd0adc497b36c45e2ec41a605fe9277dc941a
7
+ data.tar.gz: 483f85f60b4ffe09ffe23673c0a992f943626053486abb8731091a837788124578dfb07bdd215a865b3304d3a3bd1e6e5de04dfb7e0578cb0245220c4ca1a4f4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v0.10.0 (05.24.2022)
2
+
3
+ - [Allow Omniauth v2](https:////gitlab.com/gitlab-org/gitlab-omniauth-openid-connect/-/merge_requests/22)
4
+
5
+ # v0.9.1 (01.03.2022)
6
+
7
+ - [Assume public key encryption unless HMAC is specified](https://gitlab.com/gitlab-org/gitlab-omniauth-openid-connect/-/merge_requests/19)
8
+
9
+ # v0.9.0 (01.03.2022)
10
+
11
+ - [Add support for ES[256|384|512|256K] algorithms](https://gitlab.com/gitlab-org/gitlab-omniauth-openid-connect/-/merge_requests/17)
12
+
1
13
  # v0.8.0 (07.16.2021)
2
14
 
3
15
  - [Add `jwt_secret_base64` option to support binary secrets](https://gitlab.com/gitlab-org/gitlab-omniauth-openid-connect/-/merge_requests/12)
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,40 @@
1
+ ## Developer Certificate of Origin and License
2
+
3
+ By contributing to GitLab B.V., you accept and agree to the following terms and
4
+ conditions for your present and future contributions submitted to GitLab B.V.
5
+ Except for the license granted herein to GitLab B.V. and recipients of software
6
+ distributed by GitLab B.V., you reserve all right, title, and interest in and to
7
+ your Contributions.
8
+
9
+ All contributions are subject to the Developer Certificate of Origin and license set out at [docs.gitlab.com/ce/legal/developer_certificate_of_origin](https://docs.gitlab.com/ce/legal/developer_certificate_of_origin).
10
+
11
+ _This notice should stay as the first item in the CONTRIBUTING.md file._
12
+
13
+ ## Code of conduct
14
+
15
+ As contributors and maintainers of this project, we pledge to respect all people
16
+ who contribute through reporting issues, posting feature requests, updating
17
+ documentation, submitting pull requests or patches, and other activities.
18
+
19
+ We are committed to making participation in this project a harassment-free
20
+ experience for everyone, regardless of level of experience, gender, gender
21
+ identity and expression, sexual orientation, disability, personal appearance,
22
+ body size, race, ethnicity, age, or religion.
23
+
24
+ Examples of unacceptable behavior by participants include the use of sexual
25
+ language or imagery, derogatory comments or personal attacks, trolling, public
26
+ or private harassment, insults, or other unprofessional conduct.
27
+
28
+ Project maintainers have the right and responsibility to remove, edit, or reject
29
+ comments, commits, code, wiki edits, issues, and other contributions that are
30
+ not aligned to this Code of Conduct. Project maintainers who do not follow the
31
+ Code of Conduct may be removed from the project team.
32
+
33
+ This code of conduct applies both within project spaces and in public spaces
34
+ when an individual is representing the project or its community.
35
+
36
+ Instances of abusive, harassing, or otherwise unacceptable behavior can be
37
+ reported by emailing contact@gitlab.com.
38
+
39
+ This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org), version 1.1.0,
40
+ available at [https://contributor-covenant.org/version/1/1/0/](https://contributor-covenant.org/version/1/1/0/).
data/README.md CHANGED
@@ -66,8 +66,8 @@ config.omniauth :openid_connect, {
66
66
  | post_logout_redirect_uri | The logout redirect uri to use per the [session management draft](https://openid.net/specs/openid-connect-session-1_0.html) | no | empty | https://myapp.com/logout/callback |
67
67
  | uid_field | The field of the user info response to be used as a unique id | no | 'sub' | "sub", "preferred_username" |
68
68
  | client_options | A hash of client options detailed in its own section | yes | | |
69
- | jwt_secret | no | client_options.secret | For HMAC with SHA2 (e.g. HS256) signing algorithms, specify the secret used to sign the JWT token. Defaults to the OAuth2 client secret if not specified. For secrets in binary, use `jwt_secret_base64`. |
70
- | jwt_secret_base64 | no | client_options.secret | For HMAC with SHA2 (e.g. HS256) signing algorithms, specify the base64-encoded secret used to sign the JWT token. Defaults to the OAuth2 client secret if not specified. |
69
+ | jwt_secret | For HMAC with SHA2 (e.g. HS256) signing algorithms, specify the secret used to sign the JWT token. Defaults to the OAuth2 client secret if not specified. For secrets in binary, use `jwt_secret_base64`. | no | client_options.secret | "mysecret" |
70
+ | jwt_secret_base64 | For HMAC with SHA2 (e.g. HS256) signing algorithms, specify the base64-encoded secret used to sign the JWT token. Defaults to the OAuth2 client secret if not specified. `jwt_secret` takes precedence. | no | client_options.secret | "bXlzZWNyZXQ=\n"
71
71
 
72
72
  ### Client Config Options
73
73
 
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_dependency 'addressable', '~> 2.7'
23
- spec.add_dependency 'omniauth', '~> 1.9'
23
+ spec.add_dependency 'omniauth', '>= 1.9', '< 3'
24
24
  spec.add_dependency 'openid_connect', '~> 1.2'
25
25
  spec.add_development_dependency 'coveralls', '~> 0.8'
26
26
  spec.add_development_dependency 'faker', '~> 2.17'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module OpenIDConnect
5
- VERSION = '0.8.0'
5
+ VERSION = '0.10.0'
6
6
  end
7
7
  end
@@ -265,10 +265,10 @@ module OmniAuth
265
265
 
266
266
  keyset =
267
267
  case algorithm
268
- when :RS256, :RS384, :RS512
269
- public_key
270
268
  when :HS256, :HS384, :HS512
271
269
  secret
270
+ else
271
+ public_key
272
272
  end
273
273
 
274
274
  decoded.verify!(keyset)
@@ -426,6 +426,7 @@ module OmniAuth
426
426
  attr_accessor :error, :error_reason, :error_uri
427
427
 
428
428
  def initialize(data)
429
+ super
429
430
  self.error = data[:error]
430
431
  self.error_reason = data[:reason]
431
432
  self.error_uri = data[:uri]
@@ -36,7 +36,7 @@ module OmniAuth
36
36
  ::OpenIDConnect::Discovery::Provider::Config.stubs(:discover!).with('https://example.com/').returns(config)
37
37
 
38
38
  request.stubs(:path_info).returns('/auth/openid_connect/logout')
39
-
39
+ request.stubs(:path).returns('/auth/openid_connect/logout')
40
40
  strategy.expects(:redirect).with(regexp_matches(expected_redirect))
41
41
  strategy.other_phase
42
42
  end
@@ -60,7 +60,7 @@ module OmniAuth
60
60
  ::OpenIDConnect::Discovery::Provider::Config.stubs(:discover!).with('https://example.com/').returns(config)
61
61
 
62
62
  request.stubs(:path_info).returns('/auth/openid_connect/logout')
63
-
63
+ request.stubs(:path).returns('/auth/openid_connect/logout')
64
64
  strategy.expects(:redirect).with(expected_redirect)
65
65
  strategy.other_phase
66
66
  end
@@ -75,6 +75,7 @@ class StrategyTestCase < MiniTest::Test
75
75
  request.stubs(:env).returns({})
76
76
  request.stubs(:scheme).returns({})
77
77
  request.stubs(:ssl?).returns(false)
78
+ request.stubs(:path).returns('')
78
79
  end
79
80
  end
80
81
 
@@ -84,6 +85,7 @@ class StrategyTestCase < MiniTest::Test
84
85
  strategy.options.client_options.secret = @secret
85
86
  strategy.stubs(:request).returns(request)
86
87
  strategy.stubs(:user_info).returns(user_info)
88
+ strategy.stubs(:script_name).returns('')
87
89
  end
88
90
  end
89
91
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-omniauth-openid-connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bohn
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-16 00:00:00.000000000 Z
12
+ date: 2022-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -29,16 +29,22 @@ dependencies:
29
29
  name: omniauth
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.9'
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: '3'
35
38
  type: :runtime
36
39
  prerelease: false
37
40
  version_requirements: !ruby/object:Gem::Requirement
38
41
  requirements:
39
- - - "~>"
42
+ - - ">="
40
43
  - !ruby/object:Gem::Version
41
44
  version: '1.9'
45
+ - - "<"
46
+ - !ruby/object:Gem::Version
47
+ version: '3'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: openid_connect
44
50
  requirement: !ruby/object:Gem::Requirement
@@ -209,6 +215,7 @@ files:
209
215
  - ".rubocop.yml"
210
216
  - ".travis.yml"
211
217
  - CHANGELOG.md
218
+ - CONTRIBUTING.md
212
219
  - Gemfile
213
220
  - Guardfile
214
221
  - LICENSE.txt
@@ -244,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
251
  - !ruby/object:Gem::Version
245
252
  version: '0'
246
253
  requirements: []
247
- rubygems_version: 3.1.4
254
+ rubygems_version: 3.1.6
248
255
  signing_key:
249
256
  specification_version: 4
250
257
  summary: OpenID Connect Strategy for OmniAuth