From 7f9ab747234ead914fe8bbd83ed1f7fcf5163ad0 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 15 May 2023 04:22:21 +0000 Subject: automatic import of python-validate-aws-sns-message --- .gitignore | 1 + python-validate-aws-sns-message.spec | 207 +++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 209 insertions(+) create mode 100644 python-validate-aws-sns-message.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..f0a87a0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/validate_aws_sns_message-0.9.0.tar.gz diff --git a/python-validate-aws-sns-message.spec b/python-validate-aws-sns-message.spec new file mode 100644 index 0000000..076f0b9 --- /dev/null +++ b/python-validate-aws-sns-message.spec @@ -0,0 +1,207 @@ +%global _empty_manifest_terminate_build 0 +Name: python-validate-aws-sns-message +Version: 0.9.0 +Release: 1 +Summary: Validate integrity of Amazon SNS messages (Refined) +License: MIT License +URL: https://github.com/kenichi-ogawa-1988/validate_aws_sns_message +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d4/06/12cdd3d0d573941a21dc1eccd621ce372eb377246720d78fc428f29d70d9/validate_aws_sns_message-0.9.0.tar.gz +BuildArch: noarch + +Requires: python3-cffi +Requires: python3-oscrypto +Requires: python3-six + +%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](https://opensource.org/licenses/MIT) + +## Quick start + +```shell + +pip install validate_aws_sns_message + +``` + +```python + +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: + +## Special thanks + +* Original `validatesns`: + + + + +%package -n python3-validate-aws-sns-message +Summary: Validate integrity of Amazon SNS messages (Refined) +Provides: python-validate-aws-sns-message +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-validate-aws-sns-message +# 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](https://opensource.org/licenses/MIT) + +## Quick start + +```shell + +pip install validate_aws_sns_message + +``` + +```python + +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: + +## Special thanks + +* Original `validatesns`: + + + + +%package help +Summary: Development documents and examples for validate-aws-sns-message +Provides: python3-validate-aws-sns-message-doc +%description help +# 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](https://opensource.org/licenses/MIT) + +## Quick start + +```shell + +pip install validate_aws_sns_message + +``` + +```python + +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: + +## Special thanks + +* Original `validatesns`: + + + + +%prep +%autosetup -n validate-aws-sns-message-0.9.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-validate-aws-sns-message -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 15 2023 Python_Bot - 0.9.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..3b3e151 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +a1963c672755613eb38a93c01b88a581 validate_aws_sns_message-0.9.0.tar.gz -- cgit v1.2.3