Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 832 Bytes

README.rst

File metadata and controls

35 lines (24 loc) · 832 Bytes

iamvpnlibrary

Python lib for common VPN-related access queries at Mozilla. This abstracts away the (presently LDAP) query layer and prepares for a future where LDAP is replaced by... something else queryable.

Building

fpm -s python -t rpm --rpm-dist "$(rpmbuild -E '%{?dist}' | sed -e 's#^.##')" --iteration 1 iamvpnlibrary/setup.py

Testing

Fill in the [testing] subsection of the config file, then `make test`

Python dependencies

  • python-ldap
  • python-netaddr

Usage

Login/pass:

import iamvpnlibrary

l = iamvpnlibrary.IAMVPNLibrary()
print l.user_allowed_to_vpn('[email protected]')
print l.does_user_require_vpn_mfa('[email protected]')
print l.get_allowed_vpn_ips('[email protected]')
print l.get_allowed_vpn_acls('[email protected]')