%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 * Tue May 30 2023 Python_Bot - 0.9.0-1 - Package Spec generated