The whitelist checker for authentication with CGP HCA Data Store
Project description
bouncer
The whitelist checker for authentication with CGP HCA Data Store
setup
regular
Either add cgp-bouncer
to your project requirements or
pip install cgp-bouncer
in a Python 3 virtualenv.
for development
Instead of the steps above clone the repo, cd
into the repo, and run
pip install -e .
To test, run
python -m unittest -v test.py
how to use
Using is simple!
Here's an example
>>> from bouncer import Bouncer
>>> b = Bouncer('commons/dev/whitelist')
>>> b.is_authorized('jrbrenna@ucsc.edu')
True
>>> b.is_authorized('evil.gnomes@ucsc.edu')
False
This checks the AWS Secret Keeper called commons/dev/whitelist
to see
if the users jrbrenna@ucsc.edu
and evil.gnomes@ucsc.edu
are in the
whitelist.
adding users to the whitelist
- Go to the AWS Console and find the AWS Secrets Manager service.
- Find the secret to which you want to add. For example, one might
search for
commons/dev/whitelist
. - Under Secret value select Edit.
- Add your email with NO WHITESPACE to the comma separated list
under the key
email
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cgp-bouncer-0.0.1.tar.gz
(2.9 kB
view details)
File details
Details for the file cgp-bouncer-0.0.1.tar.gz
.
File metadata
- Download URL: cgp-bouncer-0.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f8e37d5e5c651231e35c3417701a6c67f9398f8754277bb8454559ab63d0e0 |
|
MD5 | 88dadb0424134609e714832786e8b9c7 |
|
BLAKE2b-256 | 9797e9cb97d5a9602464b5014c4663d9412a89cf12ce5448933fb6a1677b8aae |