Validate integrity of Amazon SNS messages (Refined)
Project description
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file validate_aws_sns_message-0.9.0.tar.gz.
File metadata
- Download URL: validate_aws_sns_message-0.9.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
099e073c0aaf66a5e294ff71c91dbdbc32583addb1b761ee42ea8ea2de1339cc
|
|
| MD5 |
a1963c672755613eb38a93c01b88a581
|
|
| BLAKE2b-256 |
d40612cdd3d0d573941a21dc1eccd621ce372eb377246720d78fc428f29d70d9
|
File details
Details for the file validate_aws_sns_message-0.9.0-py3-none-any.whl.
File metadata
- Download URL: validate_aws_sns_message-0.9.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da7364c18ae54014b741e8d0ea854fb9a6966212ea96f6676a380df2d6fa98f
|
|
| MD5 |
4be1257821481d8cdfc16cd18f70116d
|
|
| BLAKE2b-256 |
d0203178770574bddf46262dfaa3142cc7d527a55a79cb3ae985dd2c2db6c689
|