Skip to main content

Trying to obtain a decent openLDAP shell with scripting abilities by piggybacking IPython bringing history and documentation as a bonus, as well as python module to have an easy installation.

This project is a Dirty Hack.

How it works

All required files (including the tls pem/key for localhost at 127.0.0.1) are available here

example:

# activate your virtual env
python3 -mpip install blabing
# standalone ldap server for tests
standalone_ldap.sh slap
# calling bla with credentials for this server, and calling test.bla
# which creates ou=people,dc=home and create 3 users there
cat bla.test
 ldap.add("dc=home", [ "dcObject", "organization", "top"], dict(dc="home", o="home"))
 ldap.add("ou=people,dc=home",  'organizationalUnit', dict(ou="people"))
 [ user_add(i) for i in ( "boss", "manager", "louis" ) ]
 ldap.add("ou=group,dc=home",  'organizationalUnit', dict(ou="group"))
 ldap.add("cn=staff,ou=group,dc=home",  ['top', "groupOfNames"],attributes= dict(member=["uid=boss,ou=people,dc=home" ]))
 search("(uid=boss)", attributes="memberOf")
 list(walk("dc=home",lambda e:e.entry_dn))
 pe(get("uid=boss,ou=people,dc=home"))
 password("uid=boss,ou=people,dc=home")
 pe(get("uid=boss,ou=people,dc=home"))

bla bla.no_tls.json test.bla

# fill in a password has demanded
# try ldapvi("uid=boss") in the IPython shell
# exit

# browse the tree
lhl bla.no_tls.json
firefox http://127.0.0.1:5001
./img/screenshot.png

You should be focusing on the tree not on the options of the command line tools.

Synopsis

LDAP is a great extensible key/value storage with security in mind. It’s a great tool with a terrible User Experience when it comes to the tooling especially with openLDAP.

Why people (as I) are reluctant to use it ?

First problem CLI: tools

  • without kerberos CLI tools implies either to type password for every operations (search, add modify) or have it in seeable in history (if you don’t use secrets my bash tool to solve this problem);

  • who can remember what -b, -x, -W, -w, -s means ? CLI becames unreadable.

Why not have create a DSL? (Domain specific language)

We also want history since we often make the same operation over and over again.

BLA is an experimentation at brewing your own tooling for openLDAP

standalone_ldap.sh a standalone LDAP server to experiment locally. bla a CLI tools using ipython for history, completion and documentation lhl a web explorer

Design choices

  • GCU style to make a usable prototype illustrating the indented behaviour fast;

  • using an implicit local or global configuration to setup the ldap access/options;

  • helpers to recursively search for any entries bypassing the 500 items limits

  • COLORS because life is too short to have a monotone CLI (but actually does have it has a fallback mode)

Release files for blabing 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blabing 0.2.1
File Size Uploaded
blabing-0.2.1.tar.gz 32.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blabing 0.2.1
File Interpreter ABI Platform
blabing-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 55.8 kB

Release files / blabing-0.2.1.tar.gz

Download URL blabing-0.2.1.tar.gz
Size 32.7 kB
Tags Source
SHA-256 checksum
How to use checksums
03f1548f41c41d1cf7322e9e0dbc79b5dfba31365386bc5ed816d7591ab5c16f
BLAKE2b-256 checksum
How to use checksums
fa5504823ec2fd9191fc7cc562ea7f128bf840c69e356e0033ca42e8d5cf77de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / blabing-0.2.1-py3-none-any.whl

Download URL blabing-0.2.1-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80290363c9ad9d054ea7eba00395f4082b0cea6d94d48e280c1a798cdfd4f7e7
BLAKE2b-256 checksum
How to use checksums
31b6fe8eb1a83a97ae08b73f4b09bb3570f820052d068e399bed6ed980128ea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.5

1 release file

0.1.4

2 release files

0.1.3

1 release file

0.1.2

1 release file

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page