bitwarden / directory-connector

A tool for syncing a directory (AD, LDAP, Azure, G Suite, Okta) to an organization.
https://bitwarden.com
GNU General Public License v3.0
249 stars 84 forks source link

[deps]: Update ldapjs to v3 #457

Open renovate[bot] opened 6 months ago

renovate[bot] commented 6 months ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ldapjs (source) 2.3.3 -> 3.0.7 age adoption passing confidence
@types/ldapjs (source) 2.2.5 -> 3.0.6 age adoption passing confidence

Release Notes

ldapjs/node-ldapjs (ldapjs) ### [`v3.0.7`](https://togithub.com/ldapjs/node-ldapjs/releases/tag/v3.0.7) [Compare Source](https://togithub.com/ldapjs/node-ldapjs/compare/v3.0.6...v3.0.7) #### What's Changed - server: prevent crash on blank DN bind by [@​pulsejet](https://togithub.com/pulsejet) in [https://github.com/ldapjs/node-ldapjs/pull/958](https://togithub.com/ldapjs/node-ldapjs/pull/958) #### New Contributors - [@​pulsejet](https://togithub.com/pulsejet) made their first contribution in [https://github.com/ldapjs/node-ldapjs/pull/958](https://togithub.com/ldapjs/node-ldapjs/pull/958) **Full Changelog**: https://github.com/ldapjs/node-ldapjs/compare/v3.0.6...v3.0.7 ### [`v3.0.6`](https://togithub.com/ldapjs/node-ldapjs/releases/tag/v3.0.6) [Compare Source](https://togithub.com/ldapjs/node-ldapjs/compare/v3.0.5...v3.0.6) #### What's Changed - Add test for issue 940 by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/941](https://togithub.com/ldapjs/node-ldapjs/pull/941) - Add integration test for PasswordPolicyControl by [@​its-sami](https://togithub.com/its-sami) in [https://github.com/ldapjs/node-ldapjs/pull/949](https://togithub.com/ldapjs/node-ldapjs/pull/949) #### New Contributors - [@​its-sami](https://togithub.com/its-sami) made their first contribution in [https://github.com/ldapjs/node-ldapjs/pull/949](https://togithub.com/ldapjs/node-ldapjs/pull/949) **Full Changelog**: https://github.com/ldapjs/node-ldapjs/compare/v3.0.5...v3.0.6 ### [`v3.0.5`](https://togithub.com/ldapjs/node-ldapjs/releases/tag/v3.0.5) [Compare Source](https://togithub.com/ldapjs/node-ldapjs/compare/v3.0.4...v3.0.5) #### What's Changed - Add integration test for issue [#​923](https://togithub.com/ldapjs/node-ldapjs/issues/923) by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/926](https://togithub.com/ldapjs/node-ldapjs/pull/926) - Resolve issue [#​924](https://togithub.com/ldapjs/node-ldapjs/issues/924) by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/935](https://togithub.com/ldapjs/node-ldapjs/pull/935) - Address issue [#​860](https://togithub.com/ldapjs/node-ldapjs/issues/860) (cannot search with non-ascii in filter) by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/938](https://togithub.com/ldapjs/node-ldapjs/pull/938) **Full Changelog**: https://github.com/ldapjs/node-ldapjs/compare/v3.0.4...v3.0.5 ### [`v3.0.4`](https://togithub.com/ldapjs/node-ldapjs/releases/tag/v3.0.4) [Compare Source](https://togithub.com/ldapjs/node-ldapjs/compare/v3.0.3...v3.0.4) #### What's Changed - Fix ensureDN by [@​mischnic](https://togithub.com/mischnic) in [https://github.com/ldapjs/node-ldapjs/pull/918](https://togithub.com/ldapjs/node-ldapjs/pull/918) #### New Contributors - [@​mischnic](https://togithub.com/mischnic) made their first contribution in [https://github.com/ldapjs/node-ldapjs/pull/918](https://togithub.com/ldapjs/node-ldapjs/pull/918) **Full Changelog**: https://github.com/ldapjs/node-ldapjs/compare/v3.0.3...v3.0.4 ### [`v3.0.3`](https://togithub.com/ldapjs/node-ldapjs/releases/tag/v3.0.3) [Compare Source](https://togithub.com/ldapjs/node-ldapjs/compare/v3.0.2...v3.0.3) #### What's Changed - build(deps-dev): bump eslint from 8.36.0 to 8.37.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/866](https://togithub.com/ldapjs/node-ldapjs/pull/866) - build(deps-dev): bump eslint from 8.37.0 to 8.38.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/869](https://togithub.com/ldapjs/node-ldapjs/pull/869) - build(deps-dev): bump eslint from 8.38.0 to 8.39.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/875](https://togithub.com/ldapjs/node-ldapjs/pull/875) - build(deps): bump [@​ldapjs/messages](https://togithub.com/ldapjs/messages) from 1.0.2 to 1.1.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/874](https://togithub.com/ldapjs/node-ldapjs/pull/874) - build(deps): bump [@​ldapjs/dn](https://togithub.com/ldapjs/dn) from 1.0.0 to 1.1.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/879](https://togithub.com/ldapjs/node-ldapjs/pull/879) - build(deps-dev): bump eslint from 8.39.0 to 8.40.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/881](https://togithub.com/ldapjs/node-ldapjs/pull/881) - Add paged searching test by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/886](https://togithub.com/ldapjs/node-ldapjs/pull/886) - Address issue [#​883](https://togithub.com/ldapjs/node-ldapjs/issues/883) by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/884](https://togithub.com/ldapjs/node-ldapjs/pull/884) - build(deps-dev): bump eslint-plugin-n from 15.7.0 to 16.0.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/889](https://togithub.com/ldapjs/node-ldapjs/pull/889) - build(deps-dev): bump eslint from 8.40.0 to 8.41.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/888](https://togithub.com/ldapjs/node-ldapjs/pull/888) - build(deps-dev): bump eslint from 8.41.0 to 8.42.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/896](https://togithub.com/ldapjs/node-ldapjs/pull/896) - update modification object in ldap.change by [@​mihir254](https://togithub.com/mihir254) in [https://github.com/ldapjs/node-ldapjs/pull/910](https://togithub.com/ldapjs/node-ldapjs/pull/910) - Address crash for unmatched server responses by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/913](https://togithub.com/ldapjs/node-ldapjs/pull/913) (thank you to [@​benzhuo](https://togithub.com/benzhuo) and [@​michelevince](https://togithub.com/michelevince) for aiding in resolving this issue) - Update minimum dependencies by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/916](https://togithub.com/ldapjs/node-ldapjs/pull/916) #### New Contributors - [@​mihir254](https://togithub.com/mihir254) made their first contribution in [https://github.com/ldapjs/node-ldapjs/pull/910](https://togithub.com/ldapjs/node-ldapjs/pull/910) **Full Changelog**: https://github.com/ldapjs/node-ldapjs/compare/v3.0.2...v3.0.3 ### [`v3.0.2`](https://togithub.com/ldapjs/node-ldapjs/releases/tag/v3.0.2) [Compare Source](https://togithub.com/ldapjs/node-ldapjs/compare/v3.0.1...v3.0.2) #### What's Changed - build(deps-dev): bump eslint from 8.35.0 to 8.36.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/851](https://togithub.com/ldapjs/node-ldapjs/pull/851) - build(deps): bump [@​ldapjs/messages](https://togithub.com/ldapjs/messages) from 1.0.1 to 1.0.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/852](https://togithub.com/ldapjs/node-ldapjs/pull/852) - Add test for issue 860 by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/861](https://togithub.com/ldapjs/node-ldapjs/pull/861) - transcontextual safe type checks by [@​axkibe](https://togithub.com/axkibe) in [https://github.com/ldapjs/node-ldapjs/pull/864](https://togithub.com/ldapjs/node-ldapjs/pull/864) #### New Contributors - [@​axkibe](https://togithub.com/axkibe) made their first contribution in [https://github.com/ldapjs/node-ldapjs/pull/864](https://togithub.com/ldapjs/node-ldapjs/pull/864) **Full Changelog**: https://github.com/ldapjs/node-ldapjs/compare/v3.0.1...v3.0.2 ### [`v3.0.1`](https://togithub.com/ldapjs/node-ldapjs/releases/tag/v3.0.1) [Compare Source](https://togithub.com/ldapjs/node-ldapjs/compare/v3.0.0...v3.0.1) #### What's Changed - build(deps-dev): bump eslint from 8.34.0 to 8.35.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/ldapjs/node-ldapjs/pull/844](https://togithub.com/ldapjs/node-ldapjs/pull/844) - Quick fix for outdated client doc still referring to result.object by [@​Tethik](https://togithub.com/Tethik) in [https://github.com/ldapjs/node-ldapjs/pull/846](https://togithub.com/ldapjs/node-ldapjs/pull/846) - Resolve issue [#​845](https://togithub.com/ldapjs/node-ldapjs/issues/845) by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/847](https://togithub.com/ldapjs/node-ldapjs/pull/847) - Add Node.js version support to readme by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/ldapjs/node-ldapjs/pull/848](https://togithub.com/ldapjs/node-ldapjs/pull/848) **Full Changelog**: https://github.com/ldapjs/node-ldapjs/compare/v3.0.0...v3.0.1 ### [`v3.0.0`](https://togithub.com/ldapjs/node-ldapjs/releases/tag/v3.0.0) [Compare Source](https://togithub.com/ldapjs/node-ldapjs/compare/v2.3.3...v3.0.0) ##### ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰ Version 3.0.0 Is Here This release has been in development for many months. The [first commit](https://togithub.com/ldapjs/controls/commit/7eb52e42fbae969e38a0f6ebd88b2187d133dbe1) toward this goal happened on 2019-09-01, but work really started with [a commit](https://togithub.com/ldapjs/controls/commit/29b26c6957545fef74cfdd76a74e390f7c1b4662) on 2022-03-27. This is *not* a trivial release. There are significant changes under the hood. They include: - Common modules have been broken out into separate installable modules: - [`@ldapjs/attribute`](https://togithub.com/ldapjs/attribute) -- a comprehensive implementation of the [LDAP `attribute` spec](https://www.rfc-editor.org/rfc/rfc4512#section-2.5). - [`@ldapjs/change`](https://togithub.com/ldapjs/change) -- a full implementation of [RFC 4511 ยง4.6](https://www.rfc-editor.org/rfc/rfc4511.html#section-4.6). - [`@ldapjs/controls`](https://togithub.com/ldapjs/controls) -- specific implementations for all supported controls (with a caveat detailed below) that inherit from a base identifiable object. - [`@ldapjs/dn`](https://togithub.com/ldapjs/dn) -- provides `DN` and `RDN` objects to represent [LDAP distinguished names](https://www.rfc-editor.org/rfc/rfc4514). - [`@ldapjs/messages`](https://togithub.com/ldapjs/messages) -- all supported messages as their own objects with methods and properties matching the specs, including a complete overhaul of the `extension` (renamed from `extended`) request and response objects (with added support for several extensions, e.g. "password modify"). - [`@ldapjs/protocol`](https://togithub.com/ldapjs/protocol) -- now with a full suite of operation identifiers, result codes, and search tags. - [`ldap-filter`](https://togithub.com/pfmooney/node-ldap-filter) has been forked to [`@ldapjs/filter`](https://togithub.com/ldapjs/filter). It includes improvements around value escaping, modern method signatures, and identifiable "class" objects. The full set of changes can be reviewed at https://github.com/ldapjs/filter/compare/daa5a5d5d11c73582275cc75aa9f3ff839b1ab06...v2.0.0 - [`asn1`](https://togithub.com/joyent/node-asn1) has been forked to [`@ldapjs/asn1`](https://togithub.com/ldapjs/asn1). Methods have been improved, e.g. `BerReader.readBoolean` now accepts a tag to expect, new ones added, e.g. `BerWriter.appendBuffer`, unreachable code removed, and bugs fixed. The full set of changes can be reviewed at https://github.com/ldapjs/asn1/compare/bf1bb90933d9b3bbe5dfff982d096000bed7a714...v2.0.0 Additionally, all of the above modules now have complete, **100%**, test coverage (except for `@ldapjs/filter`; PRs are welcome to help out here). They are also comprehensively documented with [jsdoc](https://jsdoc.app). We expect there are going to be issues with this release. We worked hard to make sure all of the current tests pass without any changes (or at least none that affect the purpose of the test). But the current test suite is by no means comprehensive, and such sweeping changes as are present in this release are almost guaranteed to introduce new bugs. Please bear with us as we resolve them. Your contributions to fix any such bugs will help greatly. Even the simple act of opening an issue describing something you've found that should be in these release notes would be a big help. For example, if you have determined that a change in some object API, e.g. the `SearchRequest` object, should be highlighted, then please open an issue describing the change so that we can add an it to an addendum on these release notes. ##### The Biggest Change We think that the most impactful change is going to be the decoupling of the underlying byte arrays from all objects. In v2 and earlier, the client, server, controls, messages, and everything else passed around single byte arrays during the handling of requests. The benefit of this is reduced memory consumption and faster handling of requests. The downside is an *extremely* difficult to understand and maintain codebase. As part of the work to modularize this codebase, we opted to make byte array processing idempotent in the majority of cases. This will have an impact on performance, but we do not know how much of an impact. We do not have any way to benchmark the before and after of this change. We suspect (hope) that in the majority of cases it will not be noticeable. ##### VLV Controls During the development of v3 we were not clear if the VLV implementation that was added to v2 was correct. So we opted to cut it for the release. Shortly after cutting it, we determined that the implementation is very likely correct. You can read about this decision at [#​797 (comment)](https://togithub.com/ldapjs/node-ldapjs/pull/797#issuecomment-1094132289) and the realization at [#​797 (comment)](https://togithub.com/ldapjs/node-ldapjs/pull/797#issuecomment-1146856841). Ultimately, we decided to postpone adding this feature back so that we could get v3 shipped. ##### Conclusion A lot of hard work has gone into this release. We think it lays the ground work for a much more maintainable codebase. We envision being able to re-implement the server and client components as `@ldapjs/server` and `@ldapjs/client` at some point in the future. We think there is a real opportunity to refactor both components into more modern interfaces with significant improvements (particularly in the form of error handling). No promises are made about when such projects might be undertaken, if ever. But they wouldn't be possible without the work in this v3 release. In regard to my (James Sumners) personal contributions to this release, please consider using my [:heart: GitHub Sponsor](https://togithub.com/sponsors/jsumners) link to show your gratitude. Contributions will be particularly helpful at this time; I was laid off as part of a significant downsizing event at my previous employer and am currently unemployed. Additionally, a big thank you to [@​dirmgr](https://togithub.com/dirmgr) for his willingness to answer general LDAP protocol questions and the abundance of well written documentation he has provided at https://nawilson.com/ldapv3-wire-protocol-reference/ and https://ldap.com/learn-about-ldap/. The help and articles were indispensable in crafting this release. *** #### Known Breaking Changes ##### Client - `options.strictDN`: removed. All DN parsing is now "strict". It does not make any sense to try and parse DN strings that are not spec compliant. - `.modify`: no longer accepts plain objects as change descriptors. An instance of `@ldapjs/change` is now required. - `searchEntry` object: the `searchEntry` object no longe provides a `.raw` property. The access this property provided is now supplied by the `searchEntry` object's standard methods and accessors, e.g. `.attributes` for the set of attributes returned on the entry. Further, accessing binary field values should be done by specifying the `;binary` attribute option as per the LDAP spec. See [https://github.com/ldapjs/node-ldapjs/issues/850](https://togithub.com/ldapjs/node-ldapjs/issues/850) and [https://github.com/ldapjs/node-ldapjs/issues/858](https://togithub.com/ldapjs/node-ldapjs/issues/858) for more detail. - Change objects: generic JavaScript objects are no longer supported as `change` objects. When creating a new `change` object, `@ldapjs/attribute` objects must be provided (or a plain object that conforms to an `attribute` object). See [https://github.com/ldapjs/node-ldapjs/issues/859](https://togithub.com/ldapjs/node-ldapjs/issues/859) for more detail. ##### Server - `options.strictDN`: removed. All DN parsing is now "strict". It does not make any sense to try and parse DN strings that are not spec compliant. - `.listen`: No longer listens on `0.0.0.0` when no `host` parameter is provided. It now uses the secure default of `127.0.0.1`. - `.search`: the results of `SearchRequest.scope` changed to the spec defined search scope names. With `ldapjs@3.0.0` (and `@ldapjs/messages@1.0.0`) you must match against `base`, `single`, and `subtree` instead of `base`, `one`, and `sub`. This has been corrected in `ldapjs@3.0.1` (with `@ldapjs/messages@1.0.1`) via PR [#​847](https://togithub.com/ldapjs/node-ldapjs/issues/847). See the unit test included in that release for the recommended approach for matching search scopes. ##### General - Message objects no longer have a `.object` accessor. This has been replaced with the `.pojo` accessor. It didn't make any sense to have a message object with an accessor that returns an object (it's confusing). The `.pojo` accessor states what will be returned: a plain JavaScript object. You may find that the actual message object now has fields you can directly use. See [https://github.com/ldapjs/node-ldapjs/issues/841](https://togithub.com/ldapjs/node-ldapjs/issues/841). - Filter strings no longer provide a static exception on case sensitive comparisons for `objectClass`. In `ldapjs@2` and earlier, there were many explicit checks for `objectClass` being compared. When such a comparison was found, the code *always* performed that specific comparison in a case insensitive manner. As of `ldapjs@3`, you must specify that you want to perform case insensitive comparisons on property names. See [https://github.com/ldapjs/filter/issues/3](https://togithub.com/ldapjs/filter/issues/3) for more detail.

Configuration

๐Ÿ“… Schedule: Branch creation - "every 2nd week starting on the 2 week of the year before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

๐Ÿšฆ Automerge: Disabled by config. Please merge this manually once you are satisfied.

โ™ป Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

๐Ÿ”• Ignore: Close this PR and you won't be reminded about these updates again.



This PR was generated by Mend Renovate. View the repository job log.

bitwarden-bot commented 6 months ago

Internal tracking:

bitwarden-bot commented 6 months ago

Logo Checkmarx One โ€“ Scan Summary & Details โ€“ a2367a89-308f-4311-a772-5ff8d4d36a59

No New Or Fixed Issues Found

eliykat commented 2 months ago

This library is no longer being maintained so we need to decide to fork it or replace it. I've started a conversation internally about how to handle this. In the meantime we will hold off on upgrading. I am leaving the PR open to make sure I follow up on it.

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

withinfocus commented 3 weeks ago

@eliykat did the team decide where to go here? I was hoping we could just directly implement the small amount of what we need and drop the library altogether.

eliykat commented 2 weeks ago

@withinfocus not yet, I have been monitoring the dependency and community chatter for any updates/successor projects, but nothing has emerged. I agree we need to do something about it ourselves, I'll schedule it for an upcoming sprint to look at it again.