omniauth-ldap 2.3.4 → 3.0.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: cfb42b529db19042a0140d9bdb39698b177710df48bc80eb9c1470bfebda0ae2
4
- data.tar.gz: 411ba1e8817fc5814c248cbf096471ebe2f4a013a69dff3b6771143526a73f8b
3
+ metadata.gz: db8f14110058b0d3298f67c22cb05dcea355d72943478bdd8d9b363f346541bc
4
+ data.tar.gz: dda80d2d043153246fe334d57eb73059e5f8586046b7631bae1ef81682778dc5
5
5
  SHA512:
6
- metadata.gz: e5cd173bb9dd917627ba9d96d3fe3a5e713bb74e3623d8ab1247fe71da0243e0e66658f64dd356247e060fbddda4a9031e76242dd8b0ea0575d9233bfcee1b0d
7
- data.tar.gz: 70d8dd160e9793037bb4564cde716dfc8cd98c3805b73c65f49c5ecd2383b13c920828affab59e458b224b8f1eebfd4a127d9bd06a55d967e1d397f21f01a1da
6
+ metadata.gz: 75c450a755a8846071d7ebae48672f3a46bb0c6ebf36e6a37c82750b1a0fa35fe9b22484c0803bfbc029b3a00490447baa4f63a53d55d47d8afb8d62e028e80b
7
+ data.tar.gz: b24afe0b3fd3025482662d6f34f2a5dfbfea87e59647d1c76ebc32928273c8984cd4f3c98464bed712afd4fa04683980927e4c0effbbf55ef19191c6656df75d
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -32,6 +32,27 @@ Please file a bug if you notice a violation of semantic versioning.
32
32
 
33
33
  ### Security
34
34
 
35
+ ## [3.0.0] - 2026-05-21
36
+
37
+ - TAG: [v3.0.0][3.0.0t]
38
+ - COVERAGE: 97.52% -- 315/323 lines in 6 files
39
+ - BRANCH COVERAGE: 79.41% -- 108/136 branches in 6 files
40
+ - 94.59% documented
41
+
42
+ ### Added
43
+
44
+ - Add `auth-sanitizer` runtime dependency to redact sensitive LDAP adaptor inspection output without defining top-level `Auth` or `AuthSanitizer`
45
+
46
+ ### Changed
47
+
48
+ - Minimum supported Ruby version is now 2.2.0
49
+
50
+ ### Removed
51
+
52
+ - Remove deprecated (since `v2.1.0-gl` in 2018) top-level `:ca_file` and `:ssl_version` LDAP configuration options; use `:tls_options` instead
53
+ - Remove adaptor backward-compatibility that translated top-level `:ca_file` and `:ssl_version` into TLS options
54
+ - Remove deprecated direct-option specs for top-level `:ca_file` and `:ssl_version`
55
+
35
56
  ## [2.3.4] - 2026-05-18
36
57
 
37
58
  - TAG: [v2.3.4][2.3.4t]
@@ -265,7 +286,9 @@ Please file a bug if you notice a violation of semantic versioning.
265
286
  [1.0.0]: https://github.com/omniauth/omniauth-ldap/compare/5656da80d4193e0d0584f44bac493a87695e580f...v1.0.0
266
287
  [1.0.0t]: https://github.com/omniauth/omniauth-ldap/releases/tag/v1.0.0
267
288
 
268
- [Unreleased]: https://github.com/omniauth/omniauth-ldap/compare/v2.3.4...HEAD
289
+ [Unreleased]: https://github.com/omniauth/omniauth-ldap/compare/v3.0.0...HEAD
290
+ [3.0.0]: https://github.com/omniauth/omniauth-ldap/compare/v2.3.4...v3.0.0
291
+ [3.0.0t]: https://github.com/omniauth/omniauth-ldap/releases/tag/v3.0.0
269
292
  [2.3.4]: https://github.com/omniauth/omniauth-ldap/compare/v2.3.3...v2.3.4
270
293
  [2.3.4t]: https://github.com/omniauth/omniauth-ldap/releases/tag/v2.3.4
271
294
  [2.3.3]: https://github.com/omniauth/omniauth-ldap/compare/v2.3.2...v2.3.3
data/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  # 📁 OmniAuth LDAP
11
11
 
12
- [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![Open Source Helpers][👽oss-helpi]][👽oss-help] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![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 Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf] [![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf] [![CI Ancient][🚎1-an-wfi]][🚎1-an-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
12
+ [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![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 Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf] [![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf] [![CI Ancient][🚎1-an-wfi]][🚎1-an-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
13
13
 
14
14
  `if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][🖼️galtzo-discord], as I may have missed the [discord notification][🖼️galtzo-discord].
15
15
 
@@ -112,7 +112,7 @@ Note: Net::LDAP historically defaulted to no certificate validation when `tls_op
112
112
  | Works with JRuby | ![JRuby 9.1 Compat][💎jruby-9.1i] ![JRuby 9.2 Compat][💎jruby-9.2i] ![JRuby 9.3 Compat][💎jruby-9.3i] <br/> [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎10-j-wf] [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] |
113
113
  | Works with Truffle Ruby | ![Truffle Ruby 22.3 Compat][💎truby-22.3i] ![Truffle Ruby 23.0 Compat][💎truby-23.0i] <br/> [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎9-t-wf] [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] |
114
114
  | Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎4-lg-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎6-s-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎6-s-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎6-s-wf] [![Ruby 3.4 Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf] |
115
- | Works with MRI Ruby 2 | ![Ruby 2.0 Compat][💎ruby-2.0i] ![Ruby 2.1 Compat][💎ruby-2.1i] ![Ruby 2.2 Compat][💎ruby-2.2i] <br/> [![Ruby 2.3 Compat][💎ruby-2.3i]][🚎1-an-wf] [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎1-an-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎1-an-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎7-us-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎7-us-wf] |
115
+ | Works with MRI Ruby 2 | ![Ruby 2.2 Compat][💎ruby-2.2i] <br/> [![Ruby 2.3 Compat][💎ruby-2.3i]][🚎1-an-wf] [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎1-an-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎1-an-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎7-us-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎7-us-wf] |
116
116
  | 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] |
117
117
  | Source | [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
118
118
  | 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] [![GitHub Wiki][📜gh-wiki-img]][📜gh-wiki] |
@@ -123,7 +123,7 @@ Note: Net::LDAP historically defaulted to no certificate validation when `tls_op
123
123
 
124
124
  ### Compatibility
125
125
 
126
- Compatible with MRI Ruby 2.0+, and concordant releases of JRuby, and TruffleRuby.
126
+ Compatible with MRI Ruby 2.2.0+, and concordant releases of JRuby, and TruffleRuby.
127
127
 
128
128
  | 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
129
129
  |------------------------------------------------|--------------------------------------------------------|
@@ -896,8 +896,6 @@ Thanks for RTFM. ☺️
896
896
  [📜gh-wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=github&logoColor=white
897
897
  [👽dl-rank]: https://bestgems.org/gems/omniauth-ldap
898
898
  [👽dl-ranki]: https://img.shields.io/gem/rd/omniauth-ldap.svg
899
- [👽oss-help]: https://www.codetriage.com/omniauth/omniauth-ldap
900
- [👽oss-helpi]: https://www.codetriage.com/omniauth/omniauth-ldap/badges/users.svg
901
899
  [👽version]: https://bestgems.org/gems/omniauth-ldap
902
900
  [👽versioni]: https://img.shields.io/gem/v/omniauth-ldap.svg
903
901
  [🏀codecov]: https://codecov.io/gh/omniauth/omniauth-ldap
@@ -981,7 +979,7 @@ Thanks for RTFM. ☺️
981
979
  [📌gitmoji]: https://gitmoji.dev
982
980
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
983
981
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
984
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.312-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
982
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.323-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
985
983
  [🔐security]: SECURITY.md
986
984
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
987
985
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -21,6 +21,10 @@ module OmniAuth
21
21
  #
22
22
  # @note Public API: {validate}, {initialize}, {bind_as}, and attr readers such as {connection}, {uid}
23
23
  class Adaptor
24
+ include OmniAuth::LDAP::AUTH_SANITIZER::FilteredAttributes
25
+
26
+ filtered_attributes :@auth, :@configuration, :@connection, :@password, :@tls_options
27
+
24
28
  # Generic adaptor error super-class
25
29
  # @see Error classes that inherit from this class
26
30
  class LdapError < StandardError; end
@@ -59,11 +63,7 @@ module OmniAuth
59
63
  # Timeouts
60
64
  :connect_timeout,
61
65
  :read_timeout,
62
-
63
- # Deprecated
64
66
  :method,
65
- :ca_file,
66
- :ssl_version,
67
67
  ]
68
68
 
69
69
  # Required configuration keys. This may include alternatives as sub-lists
@@ -297,7 +297,7 @@ module OmniAuth
297
297
  ENCRYPTION_METHOD[normalized_method]
298
298
  end
299
299
 
300
- # Build TLS options including backward-compatibility for deprecated keys.
300
+ # Build TLS options from explicit :tls_options configuration.
301
301
  #
302
302
  # @param translated_method [Symbol] the normalized encryption method
303
303
  # @return [Hash] a hash suitable for passing as :tls_options
@@ -314,10 +314,6 @@ module OmniAuth
314
314
  options.merge!(configured_options)
315
315
  end
316
316
 
317
- # Retain backward compatibility until deprecated configs are removed.
318
- options[:ca_file] = @ca_file if @ca_file
319
- options[:ssl_version] = @ssl_version if @ssl_version
320
-
321
317
  options
322
318
  end
323
319
 
@@ -0,0 +1,38 @@
1
+ module OmniAuth
2
+ module LDAP
3
+ # See: Zero Top-Level Namespace Additions
4
+ # https://github.com/ruby-oauth/auth-sanitizer/blob/main/README.md#zero-top-level-namespace-additions
5
+ AUTH_SANITIZER = begin
6
+ auth_sanitizer_requirement = Gem::Requirement.new("~> 0.1", ">= 0.1.4")
7
+ auth_sanitizer_spec = Gem.loaded_specs["auth-sanitizer"]
8
+ unless auth_sanitizer_spec && auth_sanitizer_requirement.satisfied_by?(auth_sanitizer_spec.version)
9
+ # :nocov:
10
+ auth_sanitizer_spec = Gem::Specification.find_by_name("auth-sanitizer", auth_sanitizer_requirement)
11
+ # :nocov:
12
+ end
13
+
14
+ auth_sanitizer_loader_path = File.join(
15
+ auth_sanitizer_spec.full_gem_path,
16
+ "lib/auth_sanitizer/loader.rb",
17
+ )
18
+ unless File.file?(auth_sanitizer_loader_path)
19
+ # :nocov:
20
+ raise LoadError, "omniauth-ldap requires auth-sanitizer #{auth_sanitizer_requirement}; " \
21
+ "loader not found at #{auth_sanitizer_loader_path}"
22
+ # :nocov:
23
+ end
24
+
25
+ auth_sanitizer_loader_namespace = Module.new
26
+ auth_sanitizer_loader_namespace.module_eval(
27
+ File.read(auth_sanitizer_loader_path),
28
+ auth_sanitizer_loader_path,
29
+ 1,
30
+ )
31
+
32
+ auth_sanitizer_loader_namespace
33
+ .const_get(:AuthSanitizer)
34
+ .const_get(:Loader)
35
+ .load_isolated
36
+ end
37
+ end
38
+ end
@@ -8,7 +8,7 @@ module OmniAuth
8
8
  module Version
9
9
  # Public semantic version for the gem
10
10
  # @return [String]
11
- VERSION = "2.3.4"
11
+ VERSION = "3.0.0"
12
12
  end
13
13
  # Convenience constant for consumers that expect OmniAuth::LDAP::VERSION
14
14
  # @return [String]
@@ -0,0 +1,18 @@
1
+ # Integrate the VersionGem helper into the OmniAuth::LDAP::Version module
2
+ # to expose common version-related helper methods. This file is the public
3
+ # entry point required by consumers of the gem.
4
+ #
5
+ # @example
6
+ # require 'omniauth-ldap'
7
+ # OmniAuth::LDAP::VERSION # => "2.3.2"
8
+
9
+ require "version_gem"
10
+
11
+ require_relative "ldap/version"
12
+ require_relative "ldap/auth_sanitizer"
13
+ require_relative "ldap/adaptor"
14
+ require_relative "strategies/ldap"
15
+
16
+ OmniAuth::LDAP::Version.class_eval do
17
+ extend VersionGem::Basic
18
+ end
@@ -91,8 +91,6 @@ module OmniAuth
91
91
  option :port, 389
92
92
  option :method, :plain
93
93
  option :disable_verify_certificates, false
94
- option :ca_file, nil
95
- option :ssl_version, nil # use OpenSSL default if nil
96
94
  option :uid, "sAMAccountName"
97
95
  option :name_proc, lambda { |n| n }
98
96
 
data/lib/omniauth-ldap.rb CHANGED
@@ -1,17 +1,2 @@
1
- # Integrate the VersionGem helper into the OmniAuth::LDAP::Version module
2
- # to expose common version-related helper methods. This file is the public
3
- # entry point required by consumers of the gem.
4
- #
5
- # @example
6
- # require 'omniauth-ldap'
7
- # OmniAuth::LDAP::VERSION # => "2.3.2"
8
-
9
- require "version_gem"
10
-
11
- require "omniauth-ldap/version"
12
- require "omniauth-ldap/adaptor"
13
- require "omniauth/strategies/ldap"
14
-
15
- OmniAuth::LDAP::Version.class_eval do
16
- extend VersionGem::Basic
17
- end
1
+ # Compatibility shim
2
+ require "omniauth/ldap"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
@@ -39,6 +39,26 @@ cert_chain:
39
39
  -----END CERTIFICATE-----
40
40
  date: 1980-01-02 00:00:00.000000000 Z
41
41
  dependencies:
42
+ - !ruby/object:Gem::Dependency
43
+ name: auth-sanitizer
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '0.1'
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: 0.1.4
52
+ type: :runtime
53
+ prerelease: false
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - "~>"
57
+ - !ruby/object:Gem::Version
58
+ version: '0.1'
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 0.1.4
42
62
  - !ruby/object:Gem::Dependency
43
63
  name: net-ldap
44
64
  requirement: !ruby/object:Gem::Requirement
@@ -350,7 +370,6 @@ extra_rdoc_files:
350
370
  - FUNDING.md
351
371
  - LICENSE.txt
352
372
  - README.md
353
- - REEK
354
373
  - RUBOCOP.md
355
374
  - SECURITY.md
356
375
  files:
@@ -361,12 +380,13 @@ files:
361
380
  - FUNDING.md
362
381
  - LICENSE.txt
363
382
  - README.md
364
- - REEK
365
383
  - RUBOCOP.md
366
384
  - SECURITY.md
367
385
  - lib/omniauth-ldap.rb
368
- - lib/omniauth-ldap/adaptor.rb
369
- - lib/omniauth-ldap/version.rb
386
+ - lib/omniauth/ldap.rb
387
+ - lib/omniauth/ldap/adaptor.rb
388
+ - lib/omniauth/ldap/auth_sanitizer.rb
389
+ - lib/omniauth/ldap/version.rb
370
390
  - lib/omniauth/strategies/ldap.rb
371
391
  - sig/omniauth-ldap.rbs
372
392
  - sig/omniauth/ldap/adaptor.rbs
@@ -380,10 +400,10 @@ licenses:
380
400
  - MIT
381
401
  metadata:
382
402
  homepage_uri: https://omniauth-ldap.galtzo.com/
383
- source_code_uri: https://github.com/omniauth/omniauth-ldap/tree/v2.3.4
384
- changelog_uri: https://github.com/omniauth/omniauth-ldap/blob/v2.3.4/CHANGELOG.md
403
+ source_code_uri: https://github.com/omniauth/omniauth-ldap/tree/v3.0.0
404
+ changelog_uri: https://github.com/omniauth/omniauth-ldap/blob/v3.0.0/CHANGELOG.md
385
405
  bug_tracker_uri: https://github.com/omniauth/omniauth-ldap/issues
386
- documentation_uri: https://www.rubydoc.info/gems/omniauth-ldap/2.3.4
406
+ documentation_uri: https://www.rubydoc.info/gems/omniauth-ldap/3.0.0
387
407
  funding_uri: https://github.com/sponsors/pboling
388
408
  wiki_uri: https://github.com/omniauth/omniauth-ldap/wiki
389
409
  news_uri: https://www.railsbling.com/tags/omniauth-ldap
@@ -405,7 +425,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
405
425
  requirements:
406
426
  - - ">="
407
427
  - !ruby/object:Gem::Version
408
- version: '2.0'
428
+ version: 2.2.0
409
429
  required_rubygems_version: !ruby/object:Gem::Requirement
410
430
  requirements:
411
431
  - - ">="
metadata.gz.sig CHANGED
Binary file
data/REEK DELETED
File without changes