Python jwt_kms library
This library is work in progress.
Isolating private asymmetric keys to AWS KMS helps improve security by making it next to impossible to make copies of them. This library aims to provide a simple interface to use KMS keys to sign payloads into JWS tokens and/or to encrypt payloads into JWE tokens.
Signing with RSA and EC keys is currently supported.
Keys
import boto3
from jwt_kms import jwk
client = boto3.client('kms')
key = jwk.JWK(client, 'some-key-id')
public_key_pem = key.public_key_pem
Signing
from jwt_kms import jws
payload = {
'something': 'yes',
'more_something': 'abc'
}
token = jws.JWS(payload).add_signature(key, 'RS256').serialize(compact=True) # or compact=False
Encrypting
TODO.
Metadata
Release files for jwt-kms 0.1.4
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 |
|---|---|---|---|---|
| jwt_kms-0.1.4.tar.gz | 4.0 kB | Without provenance | Details for jwt_kms-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jwt_kms-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for jwt_kms-0.1.4-py3-none-any.whl |
Total release size: 9.2 kB
Release files / jwt_kms-0.1.4.tar.gz
| Download URL | jwt_kms-0.1.4.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6185170479dc454b46013d99a7a75817605430c26ef3fc78ac1448e07065f60f
|
|
BLAKE2b-256 checksum How to use checksums |
1a3bd16c6bbe25602811f2d1a2984659dcebaed393daf922f60bed17d9caaafa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Linux/6.11.10-amd64
|
Release files / jwt_kms-0.1.4-py3-none-any.whl
| Download URL | jwt_kms-0.1.4-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
463597527117c81bc0899dd5c2231886b4744616160ba8d48ae25ae1944a7bb9
|
|
BLAKE2b-256 checksum How to use checksums |
9cd83aa18bb7d20d5bc3c1a51cc9748b31c2093350e160791d833081ebb1dbd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Linux/6.11.10-amd64
|
Security for jwt-kms 0.1.4
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.