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:8080
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'
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.2.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 | Actions |
|---|---|---|---|---|
| puaa-0.2.2.tar.gz | 4.1 kB | Without provenance | Details for puaa-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| puaa-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for puaa-0.2.2-py3-none-any.whl |
Total release size: 9.7 kB
Release files / puaa-0.2.2.tar.gz
| Download URL | puaa-0.2.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
decce85294cd9b641d4636c88718096cb46834ddcf73d2022f26ce372a12ca90
|
|
BLAKE2b-256 checksum How to use checksums |
dfc971871d1cc684eb543096bc5e25cee67aa8e5c6b78d46e3d7c457211b6790
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3
|
Release files / puaa-0.2.2-py3-none-any.whl
| Download URL | puaa-0.2.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bebb3e81162f932c1f4f63cf0f8e618ce6c9e1afee71eccbd47f52d30bb5bba
|
|
BLAKE2b-256 checksum How to use checksums |
882a3a71493c28fe320c474efa344924a8304bc66bcee88dc47b827118926807
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3
|
Security for puaa 0.2.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.