Skip to content
Library to answer queries from Mozilla VPN-related software instead of doing raw LDAP queries.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
iamvpnlibrary
test
.gitignore
DEVELOPERS.md
LICENSE
Makefile
README.rst
iamvpnlibrary.conf.sample
setup.py

README.rst

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('me@company.com')
print l.does_user_require_vpn_mfa('me@company.com')
print l.get_allowed_vpn_ips('me@company.com')
print l.get_allowed_vpn_acls('me@company.com')
You can’t perform that action at this time.