auth-sanitizer 0.2.3 → 0.2.5
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 +132 -1
- data/LICENSE.md +1 -1
- data/README.md +70 -90
- data/lib/auth/sanitizer/core.rb +19 -13
- data/lib/auth/sanitizer/filtered_attributes.rb +15 -10
- data/lib/auth/sanitizer/sanitized_logger.rb +29 -66
- data/lib/auth/sanitizer/thing_filter.rb +3 -3
- data/lib/auth/sanitizer/value_sanitizer.rb +54 -0
- data/lib/auth/sanitizer/version.rb +4 -1
- data/lib/auth/sanitizer.rb +2 -1
- data/lib/auth_sanitizer/loader.rb +6 -0
- data/sig/auth/sanitizer.rbs +12 -0
- data.tar.gz.sig +0 -0
- metadata +51 -47
- metadata.gz.sig +3 -1
- data/CITATION.cff +0 -20
- data/CODE_OF_CONDUCT.md +0 -134
- data/CONTRIBUTING.md +0 -275
- data/FUNDING.md +0 -70
- data/MIT.md +0 -21
- data/RUBOCOP.md +0 -71
- data/SECURITY.md +0 -21
- data/certs/pboling.pem +0 -27
- data/sig/auth/sanitizer/version.rbs +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0218d87fe77fa1705ba06cbd2b4cb5eae0e04b7769312f2d2c8270de81eb741
|
|
4
|
+
data.tar.gz: 005dbc3a409a7d06e18943d0441526a26d29ec325daf1df0745bd3819ec4ab37
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b171736f3d3d7d2d3ae43c783c172527b90d19aedf4b7c11685e1617108bdbeb5b2dc443b756334fc17532d8b4152a63e29b889c00c9d9d2e5b32dea881794a
|
|
7
|
+
data.tar.gz: ac8b6d5a01d765678224f729b16fd10104e126049baaee13f5de0dbd32eb027b7e4b3d05cb84f8c32d351654c37ef79fe72ae085481e56d86bf848d2dafb0e56
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,133 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [0.2.5] - 2026-10-25
|
|
34
|
+
|
|
35
|
+
- TAG: [v0.2.5][0.2.5t]
|
|
36
|
+
- COVERAGE: 100.00% -- 184/184 lines in 8 files
|
|
37
|
+
- BRANCH COVERAGE: 100.00% -- 40/40 branches in 8 files
|
|
38
|
+
- 98.21% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- kettle-jem-template-20260720-001 - READMEs can now display configured
|
|
43
|
+
corporate sponsor logos.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- [kc] kettle-jem/prepare: updated 15 project files:
|
|
48
|
+
- dependencies (15)
|
|
49
|
+
|
|
50
|
+
- [kc] kettle-jem/template: updated 7 project files:
|
|
51
|
+
- code and tests (1)
|
|
52
|
+
- dependencies (2)
|
|
53
|
+
- documentation (1)
|
|
54
|
+
- other (2)
|
|
55
|
+
- workflows (1)
|
|
56
|
+
|
|
57
|
+
## [0.2.4] - 2026-10-23
|
|
58
|
+
|
|
59
|
+
- TAG: [v0.2.4][0.2.4t]
|
|
60
|
+
- COVERAGE: 100.00% -- 172/172 lines in 7 files
|
|
61
|
+
- BRANCH COVERAGE: 100.00% -- 34/34 branches in 7 files
|
|
62
|
+
- 98.08% documented
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
|
|
66
|
+
- kettle-jem-template-20260720-005 - README Support & Community links now
|
|
67
|
+
include RubyForum.
|
|
68
|
+
- kettle-jem-template-20260726-001 - Projects now include YARD lint
|
|
69
|
+
configuration and documentation dependencies so documentation issues fail
|
|
70
|
+
before generated docs are refreshed.
|
|
71
|
+
- kettle-jem-template-20260727-001 - Spec harness documentation now lists the
|
|
72
|
+
RSpec helpers provided by `kettle-test`.
|
|
73
|
+
|
|
74
|
+
- kettle-jem-template-20260913-001 - Templating now also surfaces a review
|
|
75
|
+
entry in `dependency_conflicts.resolve` when a direct development
|
|
76
|
+
dependency doesn't support one or more of this project's declared
|
|
77
|
+
`engines:` and has no template-managed modular home (e.g. `sqlite3` on
|
|
78
|
+
`jruby`). Review each entry and pick a resolution per the project's own
|
|
79
|
+
engine support needs.
|
|
80
|
+
|
|
81
|
+
### Changed
|
|
82
|
+
|
|
83
|
+
- kettle-jem-template-20260716-002 - Generated gemspec manifests now ship fewer
|
|
84
|
+
repository-only files by default to reduce downstream distro packaging churn.
|
|
85
|
+
|
|
86
|
+
- kettle-jem-template-20260720-002 - Development Gemfiles now use the released
|
|
87
|
+
`tree_sitter_language_pack` gem 1.13.3 or newer by default.
|
|
88
|
+
- kettle-jem-template-20260725-002 - Version specs now use `anonymous_loader` to
|
|
89
|
+
cover `version.rb` without redefining constants, or are removed when version
|
|
90
|
+
specs are not managed for the project.
|
|
91
|
+
- kettle-jem-template-20260728-001 - Generated Ruby workflows now use clearer
|
|
92
|
+
setup-ruby-flash planning and can prepare appraisal-only jobs without
|
|
93
|
+
installing the main Gemfile bundle.
|
|
94
|
+
|
|
95
|
+
- kettle-jem-template-20260801-001 - Generated README gem dashboard links now
|
|
96
|
+
use ClickGems instead of BestGems.
|
|
97
|
+
|
|
98
|
+
- [kc] kettle-jem/prepare: updated 17 project files:
|
|
99
|
+
- configuration (1)
|
|
100
|
+
- dependencies (16)
|
|
101
|
+
|
|
102
|
+
- [kc] kettle-jem/template: updated 52 project files:
|
|
103
|
+
- code and tests (4)
|
|
104
|
+
- configuration (1)
|
|
105
|
+
- dependencies (8)
|
|
106
|
+
- documentation (2)
|
|
107
|
+
- other (5)
|
|
108
|
+
- workflows (32)
|
|
109
|
+
|
|
110
|
+
### Fixed
|
|
111
|
+
|
|
112
|
+
- kettle-jem-template-20260720-003 - StructuredMerge Git diff driver config now
|
|
113
|
+
uses the installed `smorg-rb` driver command.
|
|
114
|
+
- kettle-jem-template-20260725-001 - Release pull request branches beginning
|
|
115
|
+
with `feature/release` now run JRuby and TruffleRuby workflows.
|
|
116
|
+
- kettle-jem-template-20260726-002 - Generated version files now document their
|
|
117
|
+
version namespace and constants, reducing warning-only YARD lint output.
|
|
118
|
+
- kettle-jem-template-20260726-003 - Coverage upload steps now treat Coveralls,
|
|
119
|
+
QLTY, and Codecov as optional, so provider outages do not fail CI when local
|
|
120
|
+
coverage thresholds still pass.
|
|
121
|
+
- kettle-jem-template-20260728-002 - Generated RuboCop configs now ignore the
|
|
122
|
+
same `gemfiles/vendor/bundle` tree as `.gitignore`, so vendored dependency
|
|
123
|
+
installs are not reported as project lint debt.
|
|
124
|
+
- kettle-jem-template-20260728-003 - Generated dep-heads workflows now run
|
|
125
|
+
TruffleRuby jobs with current RubyGems and Bundler, avoiding setup failures
|
|
126
|
+
before the test suite starts.
|
|
127
|
+
- kettle-jem-template-20260728-004 - Generated dep-heads workflows now use the
|
|
128
|
+
setup-ruby Bundler install path for direct appraisal Gemfiles, avoiding rv
|
|
129
|
+
lockfile parser failures on Git and path dependencies.
|
|
130
|
+
- kettle-jem-template-20260728-005 - VersionGem bootstrap now creates the
|
|
131
|
+
missing canonical version spec when a project only has shim namespace version
|
|
132
|
+
specs.
|
|
133
|
+
- kettle-jem-template-20260729-001 - Generated JRuby 9.4 workflows now use the
|
|
134
|
+
legacy manual bundle install path, avoiding setup-time Bundler full-index
|
|
135
|
+
failures against `gem.coop`.
|
|
136
|
+
- kettle-jem-template-20260730-001 - Gemspec package file enumeration now runs
|
|
137
|
+
relative to the gemspec directory, so release package contents stay correct
|
|
138
|
+
even when the gemspec is loaded from another working directory.
|
|
139
|
+
|
|
140
|
+
- kettle-jem-template-20260801-002 - Generated RSpec helpers now normalize
|
|
141
|
+
managed configuration block bindings structurally, preventing mixed block
|
|
142
|
+
parameter names from producing invalid configuration after a merge.
|
|
143
|
+
- kettle-jem-template-20260801-003 - Generated project metadata and
|
|
144
|
+
documentation now normalize configured underscore hostnames to valid
|
|
145
|
+
hyphenated hostnames.
|
|
146
|
+
- kettle-jem-template-20260801-004 - Generated organization README logos now
|
|
147
|
+
use GitHub's stable organization avatar endpoint instead of assuming a
|
|
148
|
+
matching Galtzo-hosted asset exists.
|
|
149
|
+
- kettle-jem-template-20260802-001 - Devcontainer JSON files now merge as JSONC,
|
|
150
|
+
preserving comments and trailing commas during template updates.
|
|
151
|
+
|
|
152
|
+
- Fix load-order `NameError: uninitialized constant Auth::Sanitizer::Version` by removing a duplicate `VersionGem::Basic` class_eval from `auth/sanitizer/core` (the version constant is loaded after `core` in `auth/sanitizer.rb`).
|
|
153
|
+
|
|
154
|
+
- Gemspec no longer defines a top-level `Auth` constant when evaluated on Ruby < 3.1 (e.g. by `bundler/setup`); the version file now loads into an anonymous module via `Module#module_eval` on all supported Rubies. This un-breaks the isolated-loading specs and the ruby-2.4 CI workflow.
|
|
155
|
+
|
|
156
|
+
### Security
|
|
157
|
+
|
|
158
|
+
- SanitizedLogger now redacts configured keys in Ruby `Hash#inspect` output (both Ruby 3.4+ `{"key" => "value"}` / `{key: "value"}` and pre-3.4 hash-rocket formats), fixes a mangling bug where the form-pair pattern partially matched `:key=>"value"` pairs, and no longer raises on invalid-encoded message bytes. This closes the OAUTH_DEBUG cleartext-logging bypass reported for oauth2 as GHSA-cmh8-5q25-68v6, where Faraday renders Hash request bodies with `pretty_inspect`. Reported by iamibi.
|
|
159
|
+
|
|
33
160
|
## [0.2.3] - 2026-07-14
|
|
34
161
|
|
|
35
162
|
- TAG: [v0.2.3][0.2.3t]
|
|
@@ -192,7 +319,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
192
319
|
|
|
193
320
|
- Initial release
|
|
194
321
|
|
|
195
|
-
[Unreleased]: https://github.com/ruby-oauth/auth-sanitizer/compare/v0.2.
|
|
322
|
+
[Unreleased]: https://github.com/ruby-oauth/auth-sanitizer/compare/v0.2.5...HEAD
|
|
323
|
+
[0.2.5]: https://github.com/ruby-oauth/auth-sanitizer/compare/v0.2.4...v0.2.5
|
|
324
|
+
[0.2.5t]: https://github.com/ruby-oauth/auth-sanitizer/releases/tag/v0.2.5
|
|
325
|
+
[0.2.4]: https://github.com/ruby-oauth/auth-sanitizer/compare/v0.2.3...v0.2.4
|
|
326
|
+
[0.2.4t]: https://github.com/ruby-oauth/auth-sanitizer/releases/tag/v0.2.4
|
|
196
327
|
[0.2.3]: https://github.com/ruby-oauth/auth-sanitizer/compare/v0.2.2...v0.2.3
|
|
197
328
|
[0.2.3t]: https://github.com/ruby-oauth/auth-sanitizer/releases/tag/v0.2.3
|
|
198
329
|
[0.2.2]: https://github.com/ruby-oauth/auth-sanitizer/compare/v0.2.1...v0.2.2
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
<a href="https://github.com/ruby-oauth"><img alt="ruby-oauth Logo by
|
|
1
|
+
<a href="https://github.com/ruby-oauth"><img alt="ruby-oauth Logo by GitHub" src="https://github.com/ruby-oauth.png?size=192" width="14%" align="right"/></a>
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# 🧼 Auth::Sanitizer
|
|
4
4
|
|
|
5
|
-
[![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license] [![
|
|
5
|
+
[![Version][👽versioni]][👽version] [![Ruby Users Forum][✉️ruby-forum-top-img]][✉️ruby-forum] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license] [![Total downloads][👽dl-ranki]][👽dl-rank] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov] [![QLTY Maintainability][🏀qlty-mnti]][🏀qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
|
|
6
6
|
|
|
7
|
-
`if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][✉️discord-invite], as I may have missed the
|
|
7
|
+
`if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know on Discord][✉️discord-invite] or [RubyForum][✉️ruby-forum], as I may have missed the notification.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
`if ci_badges.map(&:color).all? { it == "green"}` 👇️ send money so I can do more of this. FLOSS maintenance is now my full-time job.
|
|
12
12
|
|
|
13
13
|
[![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] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate at ko-fi.com][🖇kofi-img]][🖇kofi]
|
|
14
|
+
<p><sub>Corporate sponsors: <a href="https://alpha-omega.dev"><img alt="Alpha-Omega" src="https://alpha-omega.dev/wp-content/uploads/sites/22/2023/05/logo.svg" height="24"/></a> <a href="https://serpapi.com"><img alt="SerpApi" src="https://serpapi.com/assets/media_kit/logo-with-wordmark.svg" height="24"/></a> <a href="#-floss-funding">Become a sponsor</a></sub></p>
|
|
14
15
|
|
|
15
16
|
<details markdown="1">
|
|
16
17
|
<summary>👣 How will this project approach the September 2025 hostile takeover of RubyGems? 🚑️</summary>
|
|
@@ -51,6 +52,15 @@ a provider, or per logger by passing `label:` to `Auth::Sanitizer::SanitizedLogg
|
|
|
51
52
|
The library snapshots filter configuration when a redacting object is initialized. That keeps already-created objects
|
|
52
53
|
and logger wrappers stable even if a host application changes its configuration later.
|
|
53
54
|
|
|
55
|
+
Use `Auth::Sanitizer.sanitize` when a value needs to be redacted before it is returned or included in an exception
|
|
56
|
+
message. It recursively copies hashes and arrays, redacts values under configured keys, and sanitizes strings using the
|
|
57
|
+
same formats as `SanitizedLogger`:
|
|
58
|
+
|
|
59
|
+
```ruby
|
|
60
|
+
Auth::Sanitizer.sanitize(opts)
|
|
61
|
+
Auth::Sanitizer.sanitize(opts, filtered_keys: MyClient.config.filtered_keys, label: MyClient.config.filtered_label)
|
|
62
|
+
```
|
|
63
|
+
|
|
54
64
|
Consumers that need to avoid defining the generic top-level `Auth` namespace can use the isolated loader:
|
|
55
65
|
|
|
56
66
|
```ruby
|
|
@@ -81,12 +91,12 @@ This gem is used by the following libraries to ensure clean output:
|
|
|
81
91
|
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
|
82
92
|
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
83
93
|
| Works with JRuby | [![JRuby 9.2 Compat][💎jruby-9.2i]][🚎jruby-9.2-wf] [![JRuby 9.3 Compat][💎jruby-9.3i]][🚎jruby-9.3-wf] <br/> [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎jruby-9.4-wf] [![JRuby 10.0 Compat][💎jruby-10.0i]][🚎jruby-10.0-wf] [![JRuby current Compat][💎jruby-c-i]][🚎10-j-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf]|
|
|
84
|
-
| Works with Truffle Ruby | [![Truffle Ruby 22.3 Compat][💎truby-22.3i]][🚎truby-22.3-wf] [![Truffle Ruby 23.
|
|
94
|
+
| Works with Truffle Ruby | [![Truffle Ruby 22.3 Compat][💎truby-22.3i]][🚎truby-22.3-wf] [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎truby-23.1-wf] <br/> [![Truffle Ruby 24.2 Compat][💎truby-24.2i]][🚎truby-24.2-wf] [![Truffle Ruby 25.0 Compat][💎truby-25.0i]][🚎truby-25.0-wf] [![Truffle Ruby 33.0 Compat][💎truby-33.0i]][🚎truby-33.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf]|
|
|
85
95
|
| Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf]|
|
|
86
96
|
| Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎ruby-3.0-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎ruby-3.1-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎ruby-3.2-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎ruby-3.3-wf] [![Ruby 3.4 Compat][💎ruby-3.4i]][🚎ruby-3.4-wf]|
|
|
87
97
|
| Works with MRI Ruby 2 | ![Ruby 2.2 Compat][💎ruby-2.2i] ![Ruby 2.3 Compat][💎ruby-2.3i] <br/> [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎ruby-2.4-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎ruby-2.5-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎ruby-2.6-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎ruby-2.7-wf]|
|
|
88
|
-
| Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork] [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor] |
|
|
89
|
-
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on
|
|
98
|
+
| Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Get help from RubyForum][✉️ruby-forum-img]][✉️ruby-forum] [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork] [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor] |
|
|
99
|
+
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on GitHub.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
|
|
90
100
|
| Documentation | [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![YARD on Galtzo.com][📜docs-head-rd-img]][🚎yard-head] [![Maintainer Blog][🚂maint-blog-img]][🚂maint-blog] [![GitLab Wiki][📜gl-wiki-img]][📜gl-wiki] [![GitHub Wiki][📜gh-wiki-img]][📜gh-wiki] |
|
|
91
101
|
| Compliance | [![License: MIT][📄license-img]][📄license] [![Apache license compatibility: Category A][📄license-compat-img]][📄license-compat] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] |
|
|
92
102
|
| Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] [![Compatibility appraised by: appraisal2][💎appraisal2-img]][💎appraisal2] |
|
|
@@ -95,8 +105,9 @@ This gem is used by the following libraries to ensure clean output:
|
|
|
95
105
|
|
|
96
106
|
### Compatibility
|
|
97
107
|
|
|
98
|
-
Compatible with MRI Ruby 2.2.0+,
|
|
108
|
+
Compatible with MRI Ruby 2.2.0+, JRuby, and TruffleRuby.
|
|
99
109
|
CI workflows and Appraisals are generated for MRI Ruby 2.4+.
|
|
110
|
+
The current MRI CI lane runs on Linux and macOS.
|
|
100
111
|
This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
|
|
101
112
|
may be higher than the gem's runtime compatibility floor when legacy Rubies are
|
|
102
113
|
not practical for the current toolchain.
|
|
@@ -108,16 +119,16 @@ The _amazing_ test matrix is powered by the kettle-dev stack.
|
|
|
108
119
|
<details markdown="1">
|
|
109
120
|
<summary>How kettle-dev manages complexity in tests</summary>
|
|
110
121
|
|
|
111
|
-
| Gem | Source | Role |
|
|
122
|
+
| Gem | Source | Role | Total downloads |
|
|
112
123
|
|-----|--------|------|---------------------|
|
|
113
|
-
| [appraisal2](https://
|
|
114
|
-
| [appraisal2-rubocop](https://
|
|
115
|
-
| [kettle-dev](https://
|
|
116
|
-
| [kettle-jem](https://
|
|
117
|
-
| [kettle-soup-cover](https://
|
|
118
|
-
| [kettle-test](https://
|
|
119
|
-
| [rubocop-lts](https://
|
|
120
|
-
| [turbo_tests2](https://
|
|
124
|
+
| [appraisal2](https://clickgems.clickhouse.com/dashboard/appraisal2) | [GitHub](https://github.com/appraisal-rb/appraisal2) | multi-dependency Appraisal matrix generation | [](https://clickgems.clickhouse.com/dashboard/appraisal2) |
|
|
125
|
+
| [appraisal2-rubocop](https://clickgems.clickhouse.com/dashboard/appraisal2-rubocop) | [GitHub](https://github.com/appraisal-rb/appraisal2-rubocop) | RuboCop Appraisal generator integration | [](https://clickgems.clickhouse.com/dashboard/appraisal2-rubocop) |
|
|
126
|
+
| [kettle-dev](https://clickgems.clickhouse.com/dashboard/kettle-dev) | [GitHub](https://github.com/kettle-dev/kettle-dev) | development, release, and CI workflow tooling | [](https://clickgems.clickhouse.com/dashboard/kettle-dev) |
|
|
127
|
+
| [kettle-jem](https://clickgems.clickhouse.com/dashboard/kettle-jem) | [GitHub](https://github.com/kettle-dev/kettle-jem) | Appraisals & CI workflow templates | [](https://clickgems.clickhouse.com/dashboard/kettle-jem) |
|
|
128
|
+
| [kettle-soup-cover](https://clickgems.clickhouse.com/dashboard/kettle-soup-cover) | [GitHub](https://github.com/kettle-dev/kettle-soup-cover) | SimpleCov coverage policy and reporting | [](https://clickgems.clickhouse.com/dashboard/kettle-soup-cover) |
|
|
129
|
+
| [kettle-test](https://clickgems.clickhouse.com/dashboard/kettle-test) | [GitHub](https://github.com/kettle-dev/kettle-test) | standard test runner and coverage harness | [](https://clickgems.clickhouse.com/dashboard/kettle-test) |
|
|
130
|
+
| [rubocop-lts](https://clickgems.clickhouse.com/dashboard/rubocop-lts) | [GitHub](https://github.com/rubocop-lts/rubocop-lts) | Ruby-version-aware linting | [](https://clickgems.clickhouse.com/dashboard/rubocop-lts) |
|
|
131
|
+
| [turbo_tests2](https://clickgems.clickhouse.com/dashboard/turbo_tests2) | [GitHub](https://github.com/galtzo-floss/turbo_tests2) | parallel test execution | [](https://clickgems.clickhouse.com/dashboard/turbo_tests2) |
|
|
121
132
|
|
|
122
133
|
</details>
|
|
123
134
|
|
|
@@ -126,39 +137,22 @@ The _amazing_ test matrix is powered by the kettle-dev stack.
|
|
|
126
137
|
<details markdown="1">
|
|
127
138
|
<summary>Find this repo on federated forges (Coming soon!)</summary>
|
|
128
139
|
|
|
129
|
-
| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI |
|
|
130
|
-
|
|
131
|
-
| 🧪 [ruby-oauth/auth-sanitizer on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜gl-wiki] | 🐭 Tiny Matrix |
|
|
132
|
-
| 🧊 [ruby-oauth/auth-sanitizer on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix |
|
|
133
|
-
| 🐙 [ruby-oauth/auth-sanitizer on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | [💚][📜gh-wiki] | 💯 Full Matrix |
|
|
134
|
-
| 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] |
|
|
140
|
+
| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI |
|
|
141
|
+
|-------------------------------------------------|-------------------------------------------|-------------------|------------------|-----------------|----------------|
|
|
142
|
+
| 🧪 [ruby-oauth/auth-sanitizer on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜gl-wiki] | 🐭 Tiny Matrix |
|
|
143
|
+
| 🧊 [ruby-oauth/auth-sanitizer on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix |
|
|
144
|
+
| 🐙 [ruby-oauth/auth-sanitizer on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | [💚][📜gh-wiki] | 💯 Full Matrix |
|
|
135
145
|
|
|
136
146
|
</details>
|
|
137
147
|
|
|
138
|
-
|
|
148
|
+
### Enterprise Support
|
|
139
149
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
Available as part of the Tidelift Subscription.
|
|
143
|
-
|
|
144
|
-
<details markdown="1">
|
|
145
|
-
<summary>Need enterprise-level guarantees?</summary>
|
|
150
|
+
For enterprise support from the maintainer, use [Upwork][👨🏼🏫expsup-upwork] or [CodeMentor][👨🏼🏫expsup-codementor].
|
|
146
151
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
[![Get help from me on Tidelift][🏙️entsup-tidelift-img]][🏙️entsup-tidelift]
|
|
150
|
-
|
|
151
|
-
- 💡Subscribe for support guarantees covering _all_ your FLOSS dependencies
|
|
152
|
-
- 💡Tidelift is part of [Sonar][🏙️entsup-tidelift-sonar]
|
|
153
|
-
- 💡Tidelift pays maintainers to maintain the software you depend on!<br/>📊`@`Pointy Haired Boss: An [enterprise support][🏙️entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers
|
|
154
|
-
|
|
155
|
-
Alternatively:
|
|
152
|
+
Other support channels:
|
|
156
153
|
|
|
154
|
+
- [![Ruby Users Forum][✉️ruby-forum-img]][✉️ruby-forum]
|
|
157
155
|
- [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
|
|
158
|
-
- [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork]
|
|
159
|
-
- [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor]
|
|
160
|
-
|
|
161
|
-
</details>
|
|
162
156
|
|
|
163
157
|
## ✨ Installation
|
|
164
158
|
|
|
@@ -200,10 +194,10 @@ Libraries and applications that need to avoid the generic top-level `Auth` names
|
|
|
200
194
|
```ruby
|
|
201
195
|
require "auth_sanitizer/loader"
|
|
202
196
|
|
|
203
|
-
|
|
197
|
+
auth_sanitizer = AuthSanitizer::Loader.load_isolated
|
|
204
198
|
|
|
205
|
-
|
|
206
|
-
include
|
|
199
|
+
token_response = Class.new do
|
|
200
|
+
include auth_sanitizer.const_get(:FilteredAttributes)
|
|
207
201
|
end
|
|
208
202
|
```
|
|
209
203
|
|
|
@@ -247,7 +241,7 @@ auth_sanitizer_loader_namespace = AnonymousLoader.load_path(
|
|
|
247
241
|
version_file: "auth/sanitizer/version.rb"
|
|
248
242
|
)
|
|
249
243
|
|
|
250
|
-
|
|
244
|
+
auth_sanitizer = auth_sanitizer_loader_namespace
|
|
251
245
|
.const_get(:AuthSanitizer)
|
|
252
246
|
.const_get(:Loader)
|
|
253
247
|
.load_isolated
|
|
@@ -433,10 +427,10 @@ Or load it without defining top-level `Auth`. This still defines top-level `Auth
|
|
|
433
427
|
```ruby
|
|
434
428
|
require "auth_sanitizer/loader"
|
|
435
429
|
|
|
436
|
-
|
|
430
|
+
auth_sanitizer = AuthSanitizer::Loader.load_isolated
|
|
437
431
|
|
|
438
|
-
|
|
439
|
-
include
|
|
432
|
+
token_response = Class.new do
|
|
433
|
+
include auth_sanitizer.const_get(:FilteredAttributes)
|
|
440
434
|
end
|
|
441
435
|
```
|
|
442
436
|
|
|
@@ -559,19 +553,21 @@ We welcome both individual and corporate sponsors! We also offer a
|
|
|
559
553
|
wide array of funding channels to account for your preferences.
|
|
560
554
|
Currently, [Open Collective][🖇osc] is our preferred funding platform.
|
|
561
555
|
|
|
556
|
+
### Corporate Sponsorship
|
|
557
|
+
|
|
558
|
+
- <a href="https://alpha-omega.dev"><img alt="Alpha-Omega" src="https://alpha-omega.dev/wp-content/uploads/sites/22/2023/05/logo.svg" height="32"/></a> [Alpha-Omega](https://alpha-omega.dev) — backed by [Amazon Web Services](https://aws.amazon.com), [Google](https://www.google.com), [Microsoft](https://www.microsoft.com), [Anthropic](https://www.anthropic.com), [OpenAI](https://openai.com), [Citi](https://www.citigroup.com), [GitHub](https://github.com)
|
|
559
|
+
- <a href="https://serpapi.com"><img alt="SerpApi" src="https://serpapi.com/assets/media_kit/logo-with-wordmark.svg" height="32"/></a> [SerpApi](https://serpapi.com)
|
|
560
|
+
|
|
562
561
|
**If you're working in a company that's making significant use of ruby-oauth tools we'd
|
|
563
562
|
appreciate it if you suggest to your company to become a ruby-oauth sponsor.**
|
|
564
563
|
|
|
564
|
+
### Individual Support
|
|
565
|
+
|
|
565
566
|
You can support the development of ruby-oauth tools via
|
|
566
567
|
[GitHub Sponsors][🖇sponsor],
|
|
567
568
|
[Liberapay][⛳liberapay],
|
|
568
|
-
[
|
|
569
|
-
[
|
|
570
|
-
and [Tidelift][🏙️entsup-tidelift].
|
|
571
|
-
|
|
572
|
-
| 📍 NOTE |
|
|
573
|
-
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
574
|
-
| If doing a sponsorship in the form of donation is problematic for your company <br/> from an accounting standpoint, we'd recommend the use of Tidelift, <br/> where you can get a support-like subscription instead. |
|
|
569
|
+
[Open Collective][🖇osc],
|
|
570
|
+
and [PayPal][🖇paypal].
|
|
575
571
|
|
|
576
572
|
### Open Collective for Individuals
|
|
577
573
|
|
|
@@ -614,8 +610,7 @@ See [SECURITY.md][🔐security].
|
|
|
614
610
|
## 🤝 Contributing
|
|
615
611
|
|
|
616
612
|
If you need some ideas of where to help, you could work on adding more code coverage,
|
|
617
|
-
|
|
618
|
-
or use the gem and think about how it could be better.
|
|
613
|
+
check [issues][🤝gh-issues] or [PRs][🤝gh-pulls], or use the gem and think about how it could be better.
|
|
619
614
|
|
|
620
615
|
We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
|
|
621
616
|
|
|
@@ -651,19 +646,6 @@ Made with [contributors-img][🖐contrib-rocks].
|
|
|
651
646
|
|
|
652
647
|
Also see GitLab Contributors: [https://gitlab.com/ruby-oauth/auth-sanitizer/-/graphs/main][🚎contributors-gl]
|
|
653
648
|
|
|
654
|
-
<details markdown="1">
|
|
655
|
-
<summary>⭐️ Star History</summary>
|
|
656
|
-
|
|
657
|
-
<a href="https://star-history.com/ruby-oauth/auth-sanitizer&Date">
|
|
658
|
-
<picture>
|
|
659
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=ruby-oauth/auth-sanitizer&type=Date&theme=dark" />
|
|
660
|
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=ruby-oauth/auth-sanitizer&type=Date" />
|
|
661
|
-
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=ruby-oauth/auth-sanitizer&type=Date" />
|
|
662
|
-
</picture>
|
|
663
|
-
</a>
|
|
664
|
-
|
|
665
|
-
</details>
|
|
666
|
-
|
|
667
649
|
## 📌 Versioning
|
|
668
650
|
|
|
669
651
|
This library follows [![Semantic Versioning 2.0.0][📌semver-img]][📌semver] for its public API where practical.
|
|
@@ -693,7 +675,7 @@ See [CHANGELOG.md][📌changelog] for a list of releases.
|
|
|
693
675
|
## 📄 License
|
|
694
676
|
|
|
695
677
|
The gem is available as open source under the terms of
|
|
696
|
-
the [MIT](MIT.md) [![License: MIT][📄license-img]][📄license-ref].
|
|
678
|
+
the [MIT](https://github.com/ruby-oauth/auth-sanitizer/blob/main/MIT.md) [![License: MIT][📄license-img]][📄license-ref].
|
|
697
679
|
|
|
698
680
|
### © Copyright
|
|
699
681
|
|
|
@@ -715,11 +697,12 @@ I'm hoping to be able to pay for my kids' health insurance this month,
|
|
|
715
697
|
so if you value the work I am doing, I need your support.
|
|
716
698
|
Please consider sponsoring me or the project.
|
|
717
699
|
|
|
718
|
-
To join the community or get help
|
|
700
|
+
To join the community or get help, use the RubyForum or Discord.
|
|
719
701
|
|
|
702
|
+
[![Ruby Users Forum][✉️ruby-forum-img]][✉️ruby-forum]
|
|
720
703
|
[![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
|
|
721
704
|
|
|
722
|
-
To say "thanks!" ☝️ Join the
|
|
705
|
+
To say "thanks!" ☝️ Join the community or 👇️ send money.
|
|
723
706
|
|
|
724
707
|
[![Sponsor ruby-oauth/auth-sanitizer 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]
|
|
725
708
|
|
|
@@ -760,11 +743,14 @@ Thanks for RTFM. ☺️
|
|
|
760
743
|
[✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord
|
|
761
744
|
[✉️ruby-friends-img]: https://img.shields.io/badge/daily.dev-%F0%9F%92%8E_Ruby_Friends-0A0A0A?style=for-the-badge&logo=dailydotdev&logoColor=white
|
|
762
745
|
[✉️ruby-friends]: https://app.daily.dev/squads/rubyfriends
|
|
746
|
+
[✉️ruby-forum-top-img]: https://img.shields.io/discourse/topics?server=https%3A%2F%2Fwww.rubyforum.org&style=flat&logo=discourse&label=Ruby%20Users%20Forum
|
|
747
|
+
[✉️ruby-forum-img]: https://img.shields.io/discourse/topics?server=https%3A%2F%2Fwww.rubyforum.org&style=for-the-badge&logo=discourse&label=Ruby%20Users%20Forum
|
|
748
|
+
[✉️ruby-forum]: https://www.rubyforum.org/tag/ruby-oauth
|
|
763
749
|
|
|
764
750
|
[✇bundle-group-pattern]: https://gist.github.com/pboling/4564780
|
|
765
751
|
[⛳️gem-namespace]: https://github.com/ruby-oauth/auth-sanitizer
|
|
766
752
|
[⛳️namespace-img]: https://img.shields.io/badge/namespace-Auth::Sanitizer-3C2D2D.svg?style=square&logo=ruby&logoColor=white
|
|
767
|
-
[⛳️gem-name]: https://
|
|
753
|
+
[⛳️gem-name]: https://clickgems.clickhouse.com/dashboard/auth-sanitizer
|
|
768
754
|
[⛳️name-img]: https://img.shields.io/badge/name-auth--sanitizer-3C2D2D.svg?style=square&logo=rubygems&logoColor=red
|
|
769
755
|
[⛳️tag-img]: https://img.shields.io/github/tag/ruby-oauth/auth-sanitizer.svg
|
|
770
756
|
[⛳️tag]: https://github.com/ruby-oauth/auth-sanitizer/releases
|
|
@@ -796,16 +782,13 @@ Thanks for RTFM. ☺️
|
|
|
796
782
|
[👨🏼🏫expsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white
|
|
797
783
|
[👨🏼🏫expsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
|
|
798
784
|
[👨🏼🏫expsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white
|
|
799
|
-
[🏙️entsup-tidelift]: https://tidelift.com/subscription/pkg/rubygems-auth-sanitizer?utm_source=rubygems-auth-sanitizer&utm_medium=referral&utm_campaign=readme
|
|
800
|
-
[🏙️entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white
|
|
801
|
-
[🏙️entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar
|
|
802
785
|
[💁🏼♂️peterboling]: http://www.peterboling.com
|
|
803
786
|
[🚂railsbling]: http://www.railsbling.com
|
|
804
787
|
[📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
|
|
805
788
|
[📜src-gl]: https://gitlab.com/ruby-oauth/auth-sanitizer
|
|
806
789
|
[📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
|
|
807
790
|
[📜src-cb]: https://codeberg.org/ruby-oauth/auth-sanitizer
|
|
808
|
-
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=
|
|
791
|
+
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=GitHub&logoColor=green
|
|
809
792
|
[📜src-gh]: https://github.com/ruby-oauth/auth-sanitizer
|
|
810
793
|
[📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
811
794
|
[📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
@@ -813,9 +796,9 @@ Thanks for RTFM. ☺️
|
|
|
813
796
|
[📜gh-wiki]: https://github.com/ruby-oauth/auth-sanitizer/wiki
|
|
814
797
|
[📜gl-wiki-img]: https://img.shields.io/badge/wiki-gitlab-943CD2.svg?style=for-the-badge&logo=gitlab&logoColor=white
|
|
815
798
|
[📜gh-wiki-img]: https://img.shields.io/badge/wiki-github-943CD2.svg?style=for-the-badge&logo=github&logoColor=white
|
|
816
|
-
[👽dl-rank]: https://
|
|
817
|
-
[👽dl-ranki]: https://img.shields.io/gem/
|
|
818
|
-
[👽version]: https://
|
|
799
|
+
[👽dl-rank]: https://clickgems.clickhouse.com/dashboard/auth-sanitizer
|
|
800
|
+
[👽dl-ranki]: https://img.shields.io/gem/dt/auth-sanitizer.svg
|
|
801
|
+
[👽version]: https://clickgems.clickhouse.com/dashboard/auth-sanitizer
|
|
819
802
|
[👽versioni]: https://img.shields.io/gem/v/auth-sanitizer.svg
|
|
820
803
|
[🏀qlty-mnt]: https://qlty.sh/gh/ruby-oauth/projects/auth-sanitizer
|
|
821
804
|
[🏀qlty-mnti]: https://qlty.sh/gh/ruby-oauth/projects/auth-sanitizer/maintainability.svg
|
|
@@ -839,7 +822,6 @@ Thanks for RTFM. ☺️
|
|
|
839
822
|
[🚎jruby-9.4-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/jruby-9.4.yml
|
|
840
823
|
[🚎jruby-10.0-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/jruby-10.0.yml
|
|
841
824
|
[🚎truby-22.3-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/truffleruby-22.3.yml
|
|
842
|
-
[🚎truby-23.0-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/truffleruby-23.0.yml
|
|
843
825
|
[🚎truby-23.1-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/truffleruby-23.1.yml
|
|
844
826
|
[🚎truby-24.2-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/truffleruby-24.2.yml
|
|
845
827
|
[🚎truby-25.0-wf]: https://github.com/ruby-oauth/auth-sanitizer/actions/workflows/truffleruby-25.0.yml
|
|
@@ -878,13 +860,11 @@ Thanks for RTFM. ☺️
|
|
|
878
860
|
[💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
|
|
879
861
|
[💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
|
|
880
862
|
[💎truby-22.3i]: https://img.shields.io/badge/Truffle_Ruby-22.3-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
881
|
-
[💎truby-23.0i]: https://img.shields.io/badge/Truffle_Ruby-23.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
882
863
|
[💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
883
864
|
[💎truby-24.2i]: https://img.shields.io/badge/Truffle_Ruby-24.2-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
884
865
|
[💎truby-25.0i]: https://img.shields.io/badge/Truffle_Ruby-25.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
885
866
|
[💎truby-33.0i]: https://img.shields.io/badge/Truffle_Ruby-33.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
886
867
|
[💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
|
|
887
|
-
[💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue
|
|
888
868
|
[💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
889
869
|
[💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
890
870
|
[💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
@@ -917,12 +897,12 @@ Thanks for RTFM. ☺️
|
|
|
917
897
|
[📌gitmoji]: https://gitmoji.dev
|
|
918
898
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
919
899
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
920
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
900
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.184-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
921
901
|
[🔐security]: https://github.com/ruby-oauth/auth-sanitizer/blob/main/SECURITY.md
|
|
922
902
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
923
903
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
924
904
|
[📄license]: LICENSE.md
|
|
925
|
-
[📄license-ref]: MIT.md
|
|
905
|
+
[📄license-ref]: https://github.com/ruby-oauth/auth-sanitizer/blob/main/MIT.md
|
|
926
906
|
[📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg
|
|
927
907
|
[📄license-compat]: https://www.apache.org/legal/resolved.html#category-a
|
|
928
908
|
[📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A-%E2%9C%93-259D6C.svg?style=flat&logo=Apache
|
|
@@ -943,9 +923,9 @@ Thanks for RTFM. ☺️
|
|
|
943
923
|
| Field | Value |
|
|
944
924
|
|---|---|
|
|
945
925
|
| Package | auth-sanitizer |
|
|
946
|
-
| Description |
|
|
926
|
+
| Description | 🧼 Configurable KV output redaction. Sanitize/filter your secrets. |
|
|
947
927
|
| Homepage | https://github.com/ruby-oauth/auth-sanitizer |
|
|
948
928
|
| Source | https://github.com/ruby-oauth/auth-sanitizer |
|
|
949
929
|
| License | `MIT` |
|
|
950
|
-
| Funding | https://github.com/sponsors/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/ruby-oauth, https://thanks.dev/u/gh/pboling, https://
|
|
930
|
+
| Funding | https://github.com/sponsors/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/ruby-oauth, https://thanks.dev/u/gh/pboling, https://www.buymeacoffee.com/pboling |
|
|
951
931
|
<!-- kettle-jem:metadata:end -->
|
data/lib/auth/sanitizer/core.rb
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Auth::Sanitizer::Version.class_eval do
|
|
6
|
-
extend VersionGem::Basic
|
|
7
|
-
end
|
|
8
|
-
|
|
3
|
+
# Top-level namespace for authentication-adjacent helpers.
|
|
9
4
|
module Auth
|
|
5
|
+
# Credential redaction for inspect output and debug logging.
|
|
10
6
|
module Sanitizer
|
|
7
|
+
# Error raised for auth-sanitizer failures.
|
|
11
8
|
class Error < StandardError; end
|
|
12
9
|
|
|
13
10
|
# Default keys filtered from debug log output.
|
|
@@ -42,16 +39,13 @@ module Auth
|
|
|
42
39
|
|
|
43
40
|
# Install a custom provider for the filtered label.
|
|
44
41
|
#
|
|
45
|
-
# The provider is
|
|
46
|
-
# {SanitizedLogger}-bearing object is initialized, allowing the label to
|
|
47
|
-
#
|
|
48
|
-
# object instance.
|
|
42
|
+
# The provider callable is invoked each time a new {FilteredAttributes}- or
|
|
43
|
+
# {SanitizedLogger}-bearing object is initialized, allowing the label to track a host gem's
|
|
44
|
+
# live configuration while still being snapshotted per object instance.
|
|
49
45
|
#
|
|
46
|
+
# @return [void]
|
|
50
47
|
# @example Delegate to a host gem's config
|
|
51
48
|
# Auth::Sanitizer.filtered_label_provider = -> { MyGem.config[:filtered_label] }
|
|
52
|
-
#
|
|
53
|
-
# @param [#call] provider A callable that returns the label string
|
|
54
|
-
# @return [void]
|
|
55
49
|
define_singleton_method(:filtered_label_provider=) do |provider|
|
|
56
50
|
filtered_label_provider_mutex.synchronize do
|
|
57
51
|
filtered_label_provider = provider
|
|
@@ -68,6 +62,18 @@ module Auth
|
|
|
68
62
|
def default_filtered_keys
|
|
69
63
|
DEFAULT_FILTERED_KEYS
|
|
70
64
|
end
|
|
65
|
+
|
|
66
|
+
# Sanitize a value using the configured key names and replacement label.
|
|
67
|
+
# Hashes and arrays are traversed recursively; strings are filtered using
|
|
68
|
+
# the same formats supported by {SanitizedLogger}.
|
|
69
|
+
#
|
|
70
|
+
# @param value [Object] Value to sanitize
|
|
71
|
+
# @param filtered_keys [Array<String>] Key names whose values should be redacted
|
|
72
|
+
# @param label [String] Replacement label for redacted values
|
|
73
|
+
# @return [Object] Sanitized copy of the value
|
|
74
|
+
def sanitize(value, filtered_keys: default_filtered_keys, label: filtered_label, **options)
|
|
75
|
+
ValueSanitizer.new(filtered_keys: filtered_keys, label: label, **options).sanitize(value)
|
|
76
|
+
end
|
|
71
77
|
end
|
|
72
78
|
end
|
|
73
79
|
end
|