validate_aws_sns_message
Validate integrity of Amazon SNS messages.
Refined from validatesns.
- Verifies cryptographic signature.
- Checks signing certificate is hosted on an Amazon-controlled URL.
- Requires message be no older than one hour, the maximum lifetime of an SNS message.
Licence: MIT
Quick start
pip install validate_aws_sns_message
import validate_aws_sns_message
# Raise validate_aws_sns_message.ValidationError if message is invalid.
validate_aws_sns_message.validate(decoded_json_message_from_sns)
Gotchas
The validate function downloads the signing certificate on every call. For performance reasons, it's worth caching certificates - you can do this by passing in a get_certificate function.
This takes a url, and returns the certificate content. Your function could cache to the filesystem, a database, or wherever makes sense.
Contribute
Github: https://github.com/kenichi-ogawa-1988/validate_aws_sns_message
Special thanks
- Original
validatesns: https://github.com/nathforge/validatesns
Release files for validate-aws-sns-message 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| validate_aws_sns_message-0.9.0.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| validate_aws_sns_message-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / validate_aws_sns_message-0.9.0.tar.gz
| Download URL | validate_aws_sns_message-0.9.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
099e073c0aaf66a5e294ff71c91dbdbc32583addb1b761ee42ea8ea2de1339cc
|
|
BLAKE2b-256 checksum How to use checksums |
d40612cdd3d0d573941a21dc1eccd621ce372eb377246720d78fc428f29d70d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6
|
Release files / validate_aws_sns_message-0.9.0-py3-none-any.whl
| Download URL | validate_aws_sns_message-0.9.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3da7364c18ae54014b741e8d0ea854fb9a6966212ea96f6676a380df2d6fa98f
|
|
BLAKE2b-256 checksum How to use checksums |
d0203178770574bddf46262dfaa3142cc7d527a55a79cb3ae985dd2c2db6c689
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6
|