puaa
An uaa test server in python. The main purpose is to serve as an easily configurable mock oauth server.
Attention: it's not a secured OAuth server and must never be used on production machines.
Install
Like any python package:
pip install puaa
Configure
The server is configured through a regular uaa.yml but uses only a small subset of it, mainly "jwt" and "oauth" sections:
issuer:
uri: http://localhost:8000
oauth:
clients:
test:
id: test
secret: test
authorized-grant-types: client_credentials
scope: none
authorities: uaa.admin,clients.admin,clients.read,clients.write,clients.secret
jwt:
token:
policy:
accessTokenValiditySeconds: 3600
activeKeyId: key-id-1
keys:
key-id-1:
signingKey: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
Run locally
Needs few environment variables to start:
export AUTHLIB_INSECURE_TRANSPORT=true
export UAA_CONFIG_FILE=<PATH>/uaa.yaml
gunicorn -k gevent puaa.app:app
Then can retrieve a token with e.g.:
curl -sS http://localhost:8000/oauth/token -u test:test -d 'grant_type=client_credentials'
To list JWT keys:
curl -sS http://localhost:8000/token_keys
Limitations
Supports the "client_credentials" grant only so far.
Alternatives
The full uaa server https://github.com/cloudfoundry/uaa/ But I gave up to configure it as I wish.
License
MIT License
Metadata
Release files for puaa 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| puaa-0.3.2.tar.gz | 4.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| puaa-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / puaa-0.3.2.tar.gz
| Download URL | puaa-0.3.2.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb624b53a6d719ea56464c4f735d71a38a906062919a2234958ffca7291e9d9b
|
|
BLAKE2b-256 checksum How to use checksums |
6839c9b99215ef70a0aca4ebaa911d8eba461480880b276e5e71bb4d9b376bbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4
|
Release files / puaa-0.3.2-py3-none-any.whl
| Download URL | puaa-0.3.2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9afd72c04a195f2640a184ea8a0ad6fd0421bf8e62a402c3a588deebd0408b3
|
|
BLAKE2b-256 checksum How to use checksums |
1b944333e302162e4839cd632996f6a1d18971684b41ca5a413b8d28a48ce4b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4
|
Security for puaa 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.