EldapStringFilters - An RFC4515 ldap string filter parser for eldap

Hello!

Ok, this is may be a niche library since not many people works with ldap :slight_smile: .

For those who do, the de-facto client for ldap is :eldap which is included in otp, but is very low level.
Some elixir libraries exists to abstract it’s interface but no one (afaik) address the standard filtering syntax.

LDAP has a text string filter syntax which is defined in RFC4515, which is commonly used when you want to provide a generic search interface to an ldap server.

This library is a parser for those string and is based on the ABNF grammar defined in the RFC itself.

Given a text filter like (cn=foo) (or more complex ones!) outputs a filter suitable to be used in :eldap itself. The test suite has some exotic examples on what is possible to parse.

The code is very simple, since is built on the shoulder of giants, namely nible_parsec and abnf_parsec :wink:

The code can be found on GitHub and the package on hex.pm as usual!

7 Likes