oauth2 2.0.17 → 2.0.18
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +41 -2
- data/CONTRIBUTING.md +17 -25
- data/FUNDING.md +7 -10
- data/IRP.md +107 -0
- data/OIDC.md +10 -1
- data/README.md +167 -324
- data/SECURITY.md +3 -0
- data/THREAT_MODEL.md +85 -0
- data/lib/oauth2/access_token.rb +1 -1
- data/lib/oauth2/strategy/assertion.rb +2 -2
- data/lib/oauth2/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +13 -57
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f43a3e156646bef90634677d617a155cff1f87d57ca030674f3ee05c160fa4d9
|
|
4
|
+
data.tar.gz: 5a2d29e7cd920d4e2f515afc23896795477e5cb357e47b6f5c3d0c797194d54c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 471a77bbc0bd8a428ce01ba42ba8e9cb0ad35793eb5f7ae352946b9dda9a448152280c3bdf445255adb47b7f45d65efa11bff2affc2c2200f8e43f57f2a19a91
|
|
7
|
+
data.tar.gz: 6bae92dd35b1bf9efd38b4d3eceb2451c1016dbd9270947f74ba4ff389fa78420558df095acd8ff7404a2b8b2cdb9438983d1feb59751dd4252f2b7bc75c8d31
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,41 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [2.0.18] - 2025-11-08
|
|
34
|
+
|
|
35
|
+
- TAG: [v2.0.18][2.0.18t]
|
|
36
|
+
- COVERAGE: 100.00% -- 526/526 lines in 14 files
|
|
37
|
+
- BRANCH COVERAGE: 100.00% -- 178/178 branches in 14 files
|
|
38
|
+
- 90.48% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- [gh!683][gh!683], [gh!684][gh!684] - Improve documentation by @pboling
|
|
43
|
+
- [gh!686][gh!686]- Add Incident Response Plan by @pboling
|
|
44
|
+
- [gh!687][gh!687]- Add Threat Model by @pboling
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- [gh!685][gh!685] - upgrade kettle-dev v1.1.24 by @pboling
|
|
49
|
+
- upgrade kettle-dev v1.1.52 by @pboling
|
|
50
|
+
- Add open collective donors to README
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- [gh!690][gh!690], [gh!691][gh!691], [gh!692][gh!692] - Add yard-fence
|
|
55
|
+
- handle braces within code fences in markdown properly by @pboling
|
|
56
|
+
|
|
57
|
+
### Security
|
|
58
|
+
|
|
59
|
+
[gh!683]: https://github.com/ruby-oauth/oauth2/pull/683
|
|
60
|
+
[gh!684]: https://github.com/ruby-oauth/oauth2/pull/684
|
|
61
|
+
[gh!685]: https://github.com/ruby-oauth/oauth2/pull/685
|
|
62
|
+
[gh!686]: https://github.com/ruby-oauth/oauth2/pull/686
|
|
63
|
+
[gh!687]: https://github.com/ruby-oauth/oauth2/pull/687
|
|
64
|
+
[gh!690]: https://github.com/ruby-oauth/oauth2/pull/690
|
|
65
|
+
[gh!691]: https://github.com/ruby-oauth/oauth2/pull/691
|
|
66
|
+
[gh!692]: https://github.com/ruby-oauth/oauth2/pull/692
|
|
67
|
+
|
|
33
68
|
## [2.0.17] - 2025-09-15
|
|
34
69
|
|
|
35
70
|
- TAG: [v2.0.17][2.0.17t]
|
|
@@ -39,7 +74,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
39
74
|
|
|
40
75
|
### Added
|
|
41
76
|
|
|
42
|
-
- [gh!682][gh!682] - AccessToken: support Hash-based verb-dependent token transmission mode (e.g., {get: :query, post: :header})
|
|
77
|
+
- [gh!682][gh!682] - AccessToken: support Hash-based verb-dependent token transmission mode (e.g., `{get: :query, post: :header}`)
|
|
78
|
+
|
|
79
|
+
[gh!682]: https://github.com/ruby-oauth/oauth2/pull/682
|
|
43
80
|
|
|
44
81
|
## [2.0.16] - 2025-09-14
|
|
45
82
|
|
|
@@ -701,7 +738,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
701
738
|
|
|
702
739
|
[gemfiles/readme]: gemfiles/README.md
|
|
703
740
|
|
|
704
|
-
[Unreleased]: https://github.com/ruby-oauth/oauth2/compare/v2.0.
|
|
741
|
+
[Unreleased]: https://github.com/ruby-oauth/oauth2/compare/v2.0.18...HEAD
|
|
742
|
+
[2.0.18]: https://github.com/ruby-oauth/oauth2/compare/v2.0.17...v2.0.18
|
|
743
|
+
[2.0.18t]: https://github.com/ruby-oauth/oauth2/releases/tag/v2.0.18
|
|
705
744
|
[2.0.17]: https://github.com/ruby-oauth/oauth2/compare/v2.0.16...v2.0.17
|
|
706
745
|
[2.0.17t]: https://github.com/ruby-oauth/oauth2/releases/tag/v2.0.17
|
|
707
746
|
[2.0.16]: https://github.com/ruby-oauth/oauth2/compare/v2.0.15...v2.0.16
|
data/CONTRIBUTING.md
CHANGED
|
@@ -24,31 +24,22 @@ Follow these instructions:
|
|
|
24
24
|
|
|
25
25
|
## Executables vs Rake tasks
|
|
26
26
|
|
|
27
|
-
Executables shipped by
|
|
28
|
-
|
|
27
|
+
Executables shipped by dependencies, such as kettle-dev, and stone_checksums, are available
|
|
28
|
+
after running `bin/setup`. These include:
|
|
29
29
|
|
|
30
|
+
- gem_checksums
|
|
30
31
|
- kettle-changelog
|
|
31
32
|
- kettle-commit-msg
|
|
32
|
-
-
|
|
33
|
+
- kettle-dev-setup
|
|
33
34
|
- kettle-dvcs
|
|
34
35
|
- kettle-pre-release
|
|
35
36
|
- kettle-readme-backers
|
|
36
37
|
- kettle-release
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
See the full list of rake tasks in head of Rakefile
|
|
39
|
+
There are many Rake tasks available as well. You can see them by running:
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
group :development do
|
|
44
|
-
gem "oauth2", require: false
|
|
45
|
-
end
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
**Rakefile**
|
|
49
|
-
```ruby
|
|
50
|
-
# Rakefile
|
|
51
|
-
require "oauth2"
|
|
41
|
+
```shell
|
|
42
|
+
bin/rake -T
|
|
52
43
|
```
|
|
53
44
|
|
|
54
45
|
## Environment Variables for Local Development
|
|
@@ -77,7 +68,9 @@ GitHub API and CI helpers
|
|
|
77
68
|
Releasing and signing
|
|
78
69
|
- SKIP_GEM_SIGNING: If set, skip gem signing during build/release
|
|
79
70
|
- GEM_CERT_USER: Username for selecting your public cert in `certs/<USER>.pem` (defaults to $USER)
|
|
80
|
-
- SOURCE_DATE_EPOCH: Reproducible build timestamp.
|
|
71
|
+
- SOURCE_DATE_EPOCH: Reproducible build timestamp.
|
|
72
|
+
- `kettle-release` will set this automatically for the session.
|
|
73
|
+
- Not needed on bundler >= 2.7.0, as reproducible builds have become the default.
|
|
81
74
|
|
|
82
75
|
Git hooks and commit message helpers (exe/kettle-commit-msg)
|
|
83
76
|
- GIT_HOOK_BRANCH_VALIDATE: Branch name validation mode (e.g., `jira`) or `false` to disable
|
|
@@ -118,10 +111,8 @@ bundle exec rake test
|
|
|
118
111
|
|
|
119
112
|
### Spec organization (required)
|
|
120
113
|
|
|
121
|
-
- One spec file per class/module. For each class or module under `lib/`, keep all of its unit tests in a single spec file under `spec/` that mirrors the path and file name exactly: `lib/oauth2/
|
|
122
|
-
- Never add a second spec file for the same class/module. Examples of disallowed names: `*_more_spec.rb`, `*_extra_spec.rb`, `*_status_spec.rb`, or any other suffix that still targets the same class. If you find yourself wanting a second file, merge those examples into the canonical spec file for that class/module.
|
|
114
|
+
- One spec file per class/module. For each class or module under `lib/`, keep all of its unit tests in a single spec file under `spec/` that mirrors the path and file name exactly: `lib/oauth2/my_class.rb` -> `spec/oauth2/my_class_spec.rb`.
|
|
123
115
|
- Exception: Integration specs that intentionally span multiple classes. Place these under `spec/integration/` (or a clearly named integration folder), and do not directly mirror a single class. Name them after the scenario, not a class.
|
|
124
|
-
- Migration note: If a duplicate spec file exists, move all examples into the canonical file and delete the duplicate. Do not leave stubs or empty files behind.
|
|
125
116
|
|
|
126
117
|
## Lint It
|
|
127
118
|
|
|
@@ -144,7 +135,7 @@ For more detailed information about using RuboCop in this project, please see th
|
|
|
144
135
|
Never add `# rubocop:disable ...` / `# rubocop:enable ...` comments to code or specs (except when following the few existing `rubocop:disable` patterns for a rule already being disabled elsewhere in the code). Instead:
|
|
145
136
|
|
|
146
137
|
- Prefer configuration-based exclusions when a rule should not apply to certain paths or files (e.g., via `.rubocop.yml`).
|
|
147
|
-
- When a violation is temporary and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow:
|
|
138
|
+
- When a violation is temporary, and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow:
|
|
148
139
|
- `bundle exec rake rubocop_gradual:autocorrect` (preferred)
|
|
149
140
|
- `bundle exec rake rubocop_gradual:force_update` (only when you cannot fix the violations immediately)
|
|
150
141
|
|
|
@@ -167,7 +158,7 @@ Also see GitLab Contributors: [https://gitlab.com/ruby-oauth/oauth2/-/graphs/mai
|
|
|
167
158
|
**IMPORTANT**: To sign a build,
|
|
168
159
|
a public key for signing gems will need to be picked up by the line in the
|
|
169
160
|
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
|
|
170
|
-
All releases
|
|
161
|
+
All releases are signed releases.
|
|
171
162
|
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
|
|
172
163
|
|
|
173
164
|
NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment.
|
|
@@ -176,9 +167,10 @@ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in th
|
|
|
176
167
|
|
|
177
168
|
#### Automated process
|
|
178
169
|
|
|
179
|
-
1. Update version.rb to
|
|
170
|
+
1. Update version.rb to contain the correct version-to-be-released.
|
|
180
171
|
2. Run `bundle exec kettle-changelog`.
|
|
181
172
|
3. Run `bundle exec kettle-release`.
|
|
173
|
+
4. Stay awake and monitor the release process for any errors, and answer any prompts.
|
|
182
174
|
|
|
183
175
|
#### Manual process
|
|
184
176
|
|
|
@@ -205,7 +197,7 @@ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in th
|
|
|
205
197
|
12. Sanity check the SHA256, comparing with the output from the `bin/gem_checksums` command:
|
|
206
198
|
- `sha256sum pkg/<gem name>-<version>.gem`
|
|
207
199
|
13. Run `bundle exec rake release` which will create a git tag for the version,
|
|
208
|
-
push git commits and tags, and push the `.gem` file to
|
|
200
|
+
push git commits and tags, and push the `.gem` file to the gem host configured in the gemspec.
|
|
209
201
|
|
|
210
202
|
[📜src-gl]: https://gitlab.com/ruby-oauth/oauth2/
|
|
211
203
|
[📜src-cb]: https://codeberg.org/ruby-oauth/oauth2
|
|
@@ -216,7 +208,7 @@ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in th
|
|
|
216
208
|
[🖐contributors]: https://github.com/ruby-oauth/oauth2/graphs/contributors
|
|
217
209
|
[🚎contributors-gl]: https://gitlab.com/ruby-oauth/oauth2/-/graphs/main
|
|
218
210
|
[🖐contributors-img]: https://contrib.rocks/image?repo=ruby-oauth/oauth2
|
|
219
|
-
[💎
|
|
211
|
+
[💎gem-coop]: https://gem.coop
|
|
220
212
|
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
|
|
221
213
|
[🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
|
|
222
214
|
[🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
|
data/FUNDING.md
CHANGED
|
@@ -6,7 +6,7 @@ Many paths lead to being a sponsor or a backer of this project. Are you on such
|
|
|
6
6
|
|
|
7
7
|
[![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal]
|
|
8
8
|
|
|
9
|
-
[![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS
|
|
9
|
+
[![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS efforts using Patreon][🖇patreon-img]][🖇patreon]
|
|
10
10
|
|
|
11
11
|
[⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
|
|
12
12
|
[⛳liberapay]: https://liberapay.com/pboling/donate
|
|
@@ -31,11 +31,11 @@ Many paths lead to being a sponsor or a backer of this project. Are you on such
|
|
|
31
31
|
|
|
32
32
|
<!-- RELEASE-NOTES-FOOTER-END -->
|
|
33
33
|
|
|
34
|
-
# 🤑
|
|
34
|
+
# 🤑 A request for help
|
|
35
35
|
|
|
36
36
|
Maintainers have teeth and need to pay their dentists.
|
|
37
|
-
After getting laid off in an RIF in March and
|
|
38
|
-
I
|
|
37
|
+
After getting laid off in an RIF in March, and encountering difficulty finding a new one,
|
|
38
|
+
I began spending most of my time building open source tools.
|
|
39
39
|
I'm hoping to be able to pay for my kids' health insurance this month,
|
|
40
40
|
so if you value the work I am doing, I need your support.
|
|
41
41
|
Please consider sponsoring me or the project.
|
|
@@ -44,16 +44,13 @@ To join the community or get help 👇️ Join the Discord.
|
|
|
44
44
|
|
|
45
45
|
[![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
|
|
46
46
|
|
|
47
|
-
To say "thanks
|
|
47
|
+
To say "thanks!" ☝️ Join the Discord or 👇️ send money.
|
|
48
48
|
|
|
49
|
-
[![Sponsor ruby-oauth/oauth2 on Open Source Collective][🖇osc-all-bottom-img]][🖇osc] 💌 [![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay
|
|
49
|
+
[![Sponsor ruby-oauth/oauth2 on Open Source Collective][🖇osc-all-bottom-img]][🖇osc] 💌 [![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal]
|
|
50
50
|
|
|
51
51
|
# Another Way to Support Open Source Software
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
>—Anne Frank
|
|
55
|
-
|
|
56
|
-
I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈 cats).
|
|
53
|
+
I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈 cats).
|
|
57
54
|
|
|
58
55
|
If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.
|
|
59
56
|
|
data/IRP.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Incident Response Plan (IRP)
|
|
2
|
+
|
|
3
|
+
Status: Draft
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This Incident Response Plan (IRP) defines the steps the project maintainer(s) will follow when handling security incidents related to the `oauth2` gem. It is written for a small project with a single primary maintainer and is intended to be practical, concise, and actionable.
|
|
8
|
+
|
|
9
|
+
## Scope
|
|
10
|
+
|
|
11
|
+
Applies to security incidents that affect the `oauth2` codebase, releases (gems), CI/CD infrastructure related to building and publishing the gem, repository credentials, or any compromise of project infrastructure that could impact users.
|
|
12
|
+
|
|
13
|
+
## Key assumptions
|
|
14
|
+
- This project is maintained primarily by a single maintainer.
|
|
15
|
+
- Public vulnerability disclosure is handled via Tidelift (see `SECURITY.md`).
|
|
16
|
+
- The maintainer will act as incident commander unless otherwise delegated.
|
|
17
|
+
|
|
18
|
+
## Contact & Roles
|
|
19
|
+
|
|
20
|
+
- Incident Commander: Primary maintainer (repo owner). Responsible for coordinating triage, remediation, and communications.
|
|
21
|
+
- Secondary Contact: (optional) A trusted collaborator or organization contact if available.
|
|
22
|
+
|
|
23
|
+
### If you are an external reporter
|
|
24
|
+
- Do not publicly disclose details of an active vulnerability before coordination via Tidelift.
|
|
25
|
+
- See `SECURITY.md` for Tidelift disclosure instructions. If the reporter has questions and cannot use Tidelift, they may open a direct encrypted report as described in `SECURITY.md` (if available) or email the maintainer contact listed in the repository.
|
|
26
|
+
|
|
27
|
+
## Incident Handling Workflow (high level)
|
|
28
|
+
1. Identification & Reporting
|
|
29
|
+
- Reports may arrive via Tidelift, issue tracker, direct email, or third-party advisories.
|
|
30
|
+
- Immediately acknowledge receipt (within 24-72 hours) via the reporting channel.
|
|
31
|
+
|
|
32
|
+
2. Triage & Initial Assessment (first 72 hours)
|
|
33
|
+
- Confirm the report is not duplicative and gather: reproducer, affected versions, attack surface, exploitability, and CVSS-like severity estimate.
|
|
34
|
+
- Verify the issue against the codebase and reproduce locally if possible.
|
|
35
|
+
- Determine scope: which versions are affected, whether the issue is in code paths executed in common setups, and whether a workaround exists.
|
|
36
|
+
|
|
37
|
+
3. Containment & Mitigation
|
|
38
|
+
- If a simple mitigation or workaround (configuration change, safe default, or recommended upgrade) exists, document it clearly in the issue/Tidelift advisory.
|
|
39
|
+
- If immediate removal of a release is required (rare), consult Tidelift for coordinated takedown and notify package hosts if applicable.
|
|
40
|
+
|
|
41
|
+
4. Remediation & Patch
|
|
42
|
+
- Prepare a fix in a branch with tests and changelog entries. Prefer minimal, well-tested changes.
|
|
43
|
+
- Include tests that reproduce the faulty behavior and demonstrate the fix.
|
|
44
|
+
- Hardening: add fuzz tests, input validation, or additional checks as appropriate.
|
|
45
|
+
|
|
46
|
+
5. Release & Disclosure
|
|
47
|
+
- Coordinate disclosure through Tidelift per `SECURITY.md` timelines. Aim for a coordinated disclosure and patch release to minimize risk to users.
|
|
48
|
+
- Publish a patch release (increment gem version) and an advisory via Tidelift.
|
|
49
|
+
- Update `CHANGELOG.md` and repository release notes with non-sensitive details.
|
|
50
|
+
|
|
51
|
+
6. Post-Incident
|
|
52
|
+
- Produce a short postmortem: timeline, root cause, actions taken, and follow-ups.
|
|
53
|
+
- Add/adjust tests and CI checks to prevent regressions.
|
|
54
|
+
- If credentials or infrastructure were compromised, rotate secrets and audit access.
|
|
55
|
+
|
|
56
|
+
## Severity classification (guidance)
|
|
57
|
+
- High/Critical: Remote code execution, data exfiltration, or any vulnerability that can be exploited without user interaction. Immediate action and prioritized patching.
|
|
58
|
+
- Medium: Privilege escalation, sensitive information leaks that require specific conditions. Patch in the next release cycle with advisory.
|
|
59
|
+
- Low: Minor information leaks, UI issues, or non-exploitable bugs. Fix normally and include in the next scheduled release.
|
|
60
|
+
|
|
61
|
+
## Preservation of evidence
|
|
62
|
+
- Preserve all reporter-provided data, logs, and reproducer code in a secure location (local encrypted storage or private branch) for the investigation.
|
|
63
|
+
- Do not publish evidence that would enable exploitation before coordinated disclosure.
|
|
64
|
+
|
|
65
|
+
## Communication templates
|
|
66
|
+
Acknowledgement (to reporter)
|
|
67
|
+
|
|
68
|
+
"Thank you for reporting this issue. I've received your report and will triage it within 72 hours. If you can, please provide reproduction steps, affected versions, and any exploit PoC. I will coordinate disclosure through Tidelift per the project's security policy."
|
|
69
|
+
|
|
70
|
+
Public advisory (after patch is ready)
|
|
71
|
+
|
|
72
|
+
"A security advisory for oauth2 (versions X.Y.Z) has been published via Tidelift. Please upgrade to version A.B.C which patches [brief description]. See the advisory for details and recommended mitigations."
|
|
73
|
+
|
|
74
|
+
## Runbook: Quick steps for a maintainer to patch and release
|
|
75
|
+
1. Create a branch: `git checkout -b fix/security-brief-description`
|
|
76
|
+
2. Reproduce the issue locally and add a regression spec in `spec/`.
|
|
77
|
+
3. Implement the fix and run the test suite: `bundle exec rspec` (or the project's preferred test command).
|
|
78
|
+
4. Bump version in `lib/oauth2/version.rb` following semantic versioning.
|
|
79
|
+
5. Update `CHANGELOG.md` with an entry describing the fix (avoid exploit details).
|
|
80
|
+
6. Commit and push the branch, open a PR, and merge after approvals.
|
|
81
|
+
7. Build and push the gem: `gem build oauth2.gemspec && gem push pkg/...` (coordinate with Tidelift before public push if disclosure is coordinated).
|
|
82
|
+
8. Publish a release on GitHub and ensure the Tidelift advisory is posted.
|
|
83
|
+
|
|
84
|
+
## Operational notes
|
|
85
|
+
- Secrets: Use local encrypted storage for any sensitive reporter data. If repository or CI secrets may be compromised, rotate them immediately and update dependent services.
|
|
86
|
+
- Access control: Limit who can publish gems and who has admin access to the repo. Keep an up-to-date list of collaborators in a secure place.
|
|
87
|
+
|
|
88
|
+
## Legal & regulatory
|
|
89
|
+
- If the incident involves user data or has legal implications, consult legal counsel or the maintainers' employer as appropriate. The maintainer should document the timeline and all communications.
|
|
90
|
+
|
|
91
|
+
## Retrospective & continuous improvement
|
|
92
|
+
After an incident, perform a brief post-incident review covering:
|
|
93
|
+
- What happened and why
|
|
94
|
+
- What was done to contain and remediate
|
|
95
|
+
- What tests or process changes will prevent recurrence
|
|
96
|
+
- Assign owners and deadlines for follow-up tasks
|
|
97
|
+
|
|
98
|
+
## References
|
|
99
|
+
- See `SECURITY.md` for the project's official disclosure channel (Tidelift).
|
|
100
|
+
|
|
101
|
+
## Appendix: Example checklist for an incident
|
|
102
|
+
- [ ] Acknowledge report to reporter (24-72 hours)
|
|
103
|
+
- [ ] Reproduce and classify severity
|
|
104
|
+
- [ ] Prepare and test a fix in a branch
|
|
105
|
+
- [ ] Coordinate disclosure via Tidelift
|
|
106
|
+
- [ ] Publish patch release and advisory
|
|
107
|
+
- [ ] Postmortem and follow-up actions
|
data/OIDC.md
CHANGED
|
@@ -16,11 +16,13 @@ If any other libraries would like to be added to this list, please open an issue
|
|
|
16
16
|
This document complements the inline documentation by focusing on OpenID Connect (OIDC) 1.0 usage patterns when using this gem as an OAuth 2.0 client library.
|
|
17
17
|
|
|
18
18
|
Scope of this document
|
|
19
|
+
|
|
19
20
|
- Audience: Developers building an OAuth 2.0/OIDC Relying Party (RP, aka client) in Ruby.
|
|
20
21
|
- Non-goals: This gem does not implement an OIDC Provider (OP, aka Authorization Server); for OP/server see other projects (e.g., doorkeeper + oidc extensions).
|
|
21
22
|
- Status: Informational documentation with links to normative specs. The gem intentionally remains protocol-agnostic beyond OAuth 2.0; OIDC specifics (like ID Token validation) must be handled by your application.
|
|
22
23
|
|
|
23
24
|
Key concepts refresher
|
|
25
|
+
|
|
24
26
|
- OAuth 2.0 delegates authorization; it does not define authentication of the end-user.
|
|
25
27
|
- OIDC layers an identity layer on top of OAuth 2.0, introducing:
|
|
26
28
|
- ID Token: a JWT carrying claims about the authenticated end-user and the authentication event.
|
|
@@ -29,6 +31,7 @@ Key concepts refresher
|
|
|
29
31
|
- Discovery and Dynamic Client Registration (optional for providers/clients that support them).
|
|
30
32
|
|
|
31
33
|
What this gem provides for OIDC
|
|
34
|
+
|
|
32
35
|
- All OAuth 2.0 client capabilities required for OIDC flows: building authorization requests, exchanging authorization codes, refreshing tokens, and making authenticated resource requests.
|
|
33
36
|
- Transport and parsing conveniences (snaky hash, Faraday integration, error handling, etc.).
|
|
34
37
|
- Optional client authentication schemes useful with OIDC deployments:
|
|
@@ -38,6 +41,7 @@ What this gem provides for OIDC
|
|
|
38
41
|
- private_key_jwt (OIDC-compliant when configured per OP requirements)
|
|
39
42
|
|
|
40
43
|
What you must add in your app for OIDC
|
|
44
|
+
|
|
41
45
|
- ID Token validation: This gem surfaces id_token values but does not verify them. Your app should:
|
|
42
46
|
1) Parse the JWT (header, payload, signature)
|
|
43
47
|
2) Fetch the OP JSON Web Key Set (JWKS) from discovery (or configure statically)
|
|
@@ -124,10 +128,12 @@ userinfo = token.get("/userinfo").parsed
|
|
|
124
128
|
```
|
|
125
129
|
|
|
126
130
|
Notes on discovery and registration
|
|
127
|
-
|
|
131
|
+
|
|
132
|
+
- Discovery: Most OPs publish configuration at `{issuer}/.well-known/openid-configuration` (OIDC Discovery 1.0). From there, resolve authorization_endpoint, token_endpoint, jwks_uri, userinfo_endpoint, etc.
|
|
128
133
|
- Dynamic Client Registration: Some OPs allow registering clients programmatically (OIDC Dynamic Client Registration 1.0). This gem does not implement registration; use a plain HTTP client or Faraday and store credentials securely.
|
|
129
134
|
|
|
130
135
|
Common pitfalls and tips
|
|
136
|
+
|
|
131
137
|
- Always request the openid scope when you expect an ID Token. Without it, the OP may behave as vanilla OAuth 2.0.
|
|
132
138
|
- Validate ID Token signature and claims before trusting any identity data. Do not rely solely on the presence of an id_token field.
|
|
133
139
|
- Prefer Authorization Code + PKCE. Avoid Implicit; it is discouraged in modern guidance and may be disabled by providers.
|
|
@@ -136,6 +142,7 @@ Common pitfalls and tips
|
|
|
136
142
|
- When using private_key_jwt, ensure the "aud" (or token_url) and "iss/sub" claims are set per the OP’s rules, and include kid in the JWT header when required so the OP can select the right key.
|
|
137
143
|
|
|
138
144
|
Relevant specifications and references
|
|
145
|
+
|
|
139
146
|
- OpenID Connect Core 1.0: https://openid.net/specs/openid-connect-core-1_0.html
|
|
140
147
|
- OIDC Core (final): https://openid.net/specs/openid-connect-core-1_0-final.html
|
|
141
148
|
- How OIDC works: https://openid.net/developers/how-connect-works/
|
|
@@ -150,9 +157,11 @@ Relevant specifications and references
|
|
|
150
157
|
- Spring Authorization Server’s list of OAuth2/OIDC specs: https://github.com/spring-projects/spring-authorization-server/wiki/OAuth2-and-OIDC-Specifications
|
|
151
158
|
|
|
152
159
|
See also
|
|
160
|
+
|
|
153
161
|
- README sections on OAuth 2.1 notes and OIDC notes
|
|
154
162
|
- Strategy classes under lib/oauth2/strategy for flow helpers
|
|
155
163
|
- Specs under spec/oauth2 for concrete usage patterns
|
|
156
164
|
|
|
157
165
|
Contributions welcome
|
|
166
|
+
|
|
158
167
|
- If you discover provider-specific nuances, consider contributing examples or clarifications (without embedding provider-specific hacks into the library).
|