-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PM-13007] Replace ldapjs with ldapts #641
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #641 +/- ##
========================================
+ Coverage 2.21% 8.46% +6.25%
========================================
Files 60 60
Lines 2662 2633 -29
Branches 475 467 -8
========================================
+ Hits 59 223 +164
+ Misses 2600 2392 -208
- Partials 3 18 +15 ☔ View full report in Codecov by Sentry. |
No New Or Fixed Issues Found |
b457986
to
93f13b3
Compare
* Don't set tls options if not using * Don't unbind immediately after binding
7073494
to
49b4ce7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Holding this one until after the next release (last week of October). |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-13007
📔 Objective
ldapjs
is unmaintained. Replace it withldapts
, which is a TS fork from a previous version ofldapjs
. It appears to be well maintained, and because it shares the same origin, it's a reasonably straightforward replacement.The main changes are:
getAttrObj
,getAttrVals
andgetAttr
methods.ldapjs
represented attributes as an array of key-value pairs, whereasldapts
stores these in a dict. DeletegetAttrObj
entirely because it's not really applicable here (it returned the key-value pair but now we can just index the value we want)tlsOptions
construction into its own methodclient.bind
andclient.startTLS
(the old code explicitly returned newPromise
s and had callback chains etc, none of which appear necessary)Note that I added ldap integration tests in preparation for this change, we'll still have QA test manually particularly for Azure services, but they provide some assurance that it basically works.
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes