Shared-Secret Requests (SSR)
A simple HTTP authentication library using shared secrets.
Overview
The ssr library exposes a simple set of interfaces that facilitate server-server
authentication using a shared secret. This shared secret or secret_key is used
to generate a public key, using a client id and timestamp. The combination of the
client id, timestamp and public key form a signature that a host server can use
to verify the identity of the client server. ssr provides 3 intefaces to support
that authentication workflow:
ssr.Client- to help generate a public key from a shared secret key.ssr.Session- exends therequestslibrarySessionclass to expose anssr.Clientand patch requests with the appropriate headers to correcly interface withssr.BaseAuthenticationssr.BaseAuthentication- to help hosts validate requests from clients that have the same shared secret.
Scope
The scope of this project is limited to server-server authentication e.g. to support RESTful data transfer between micro-services. Logistics around managing secrets is not included in the scope of this project. For tools to manage secrets you can look into:
Installation
pip install ssr
Usage
SSR Client
TBD
Requests Session
import ssr
session = ssr.Session(
secret_key=os.environ.get('APP_SECRET_KEY')
)
response = session.get(
'https://myblog.com/api/post_reports/',
params={'q': 'auth'}
)
Base Authentication
TBD
TODO
Metadata
Release files for ssr 0.1.2
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 | |
|---|---|---|---|---|
| ssr-0.1.2.tar.gz | 11.0 kB | Without provenance | Details |
Release files / ssr-0.1.2.tar.gz
| Download URL | ssr-0.1.2.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8db13d6f964fbc37bd052eaff7bba8ec55f1e7256c2f586f0598f769f4d14a7e
|
|
BLAKE2b-256 checksum How to use checksums |
5c3c6b21d3c8fdfe1b1381a03c2af44d42e9e03bb5bc4262307c9e43e5507887
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14
|
Security for ssr 0.1.2
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.