feat(contrib): Add a helper script for ldapsearch debugging#139
feat(contrib): Add a helper script for ldapsearch debugging#139tlater-famedly wants to merge 1 commit intomainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #139 +/- ##
=======================================
Coverage 88.40% 88.40%
=======================================
Files 10 10
Lines 1785 1785
=======================================
Hits 1578 1578
Misses 207 207 Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Just a directory with some random bonus scripts that are useful. It's pretty common in FOSS projects; often plugins and other related things not part of the main codebase make it in there, too.
f7c533f to
1756b96
Compare
| fi | ||
|
|
||
| grep_from_yaml() { | ||
| grep "$1" "$config" | cut -f 2 -d ':' | tr -d '" ' |
There was a problem hiding this comment.
Sadly the simple approach doesn't work very well in practice; various attributes used in DNs and filters often contain spaces and :. tr-ing and cut-ing all of them breaks.
We'd need to do a more thorough yaml parse to not run into this, sadly non-greedy matches are hard to do with just POSIX utilities.
We've needed to figure out what famedly-sync is seeing a few times while debugging in customer environments now; this is a quick solution that helps get this more easily. Short of a full command to do various searches in famedly-sync (which would basically just reimplement `ldapsearch`) I think this is a pretty good way to patch up that use case a bit.
1756b96 to
dad0687
Compare
We've needed to figure out what famedly-sync is seeing a few times while debugging in customer environments now; this is a quick solution that helps get this more easily.
Short of a full command to do various searches in famedly-sync (which would basically just reimplement
ldapsearch) I think this is a pretty good way to patch up that use case a bit.