This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Python lib for common OpenLDAP queries @ Mozilla. This only works with LDAP databases using a schema similar to Mozilla’s.

Install

Using pip

sudo apt-get install libldap2-dev libsasl2-dev
pip install mozlibldap

As a python module

Manually: .. code:

make install

As a rpm/deb package .. code:

make rpm
make deb
rpm -i <package.rpm>
dpkg -i <package.deb>

Testing

Fill in the LDAP URL, login, password in tests.py and run it :)

From the code/integrate in my code

Add to your project with:

git submodule add https://github.com/mozilla-it/mozlibldap
git commit -a

Python dependencies

  • python-ldap

Usage

Login/pass:

import mozlibldap

l = mozlibldap.MozLDAP(LDAP_URL, LDAP_BIND_DN, LDAP_BIND_PASSWD)
print(l.get_user_posix_uid("gdestuynder@mozilla.com"))

With client certificate (the certificate DN needs to match your LDAP DN). The client cert, key file and optional ca cert (last argument) are all PEM files.

import mozlibldap

l = mozlibldap.MozLDAP(LDAP_URL, LDAP_BIND_DN, None, LDAP_BIND_CLIENTCERT, LDAP_BIND_KEYFILE)
# If using a self-signed CA in a specific location, like Mozilla CA
#l = mozlibldap.MozLDAP(LDAP_URL, LDAP_BIND_DN, None, LDAP_BIND_CLIENTCERT, LDAP_BIND_KEYFILE,
#                       "/etc/ssl/mozca.pem")
print(l.get_user_posix_uid("gdestuynder@mozilla.com"))
Release History

Release History

1.1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mozlibldap-1.1.0.tar.gz (3.4 kB) Copy SHA256 Checksum SHA256 Source Oct 12, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting