{ "info": { "author": "Anthony Almarza", "author_email": "anthony.almarza@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "# Shared-Secret Requests (SSR)\n\n[![CircleCI](https://circleci.com/gh/hangarunderground/ssr.svg?style=svg)](https://circleci.com/gh/hangarunderground/ssr)\n\n[![codecov](https://codecov.io/gh/hangarunderground/ssr/branch/master/graph/badge.svg)](https://codecov.io/gh/hangarunderground/ssr/branch/master/)\n\nA simple HTTP authentication library using shared secrets.\n\n## Overview\n\nThe `ssr` library exposes a simple set of interfaces that facilitate server-server\nauthentication using a shared secret. This shared secret or `secret_key` is used\nto generate a public key, using a client id and timestamp. The combination of the\nclient id, timestamp and public key form a signature that a host server can use\nto verify the identity of the client server. `ssr` provides 3 intefaces to support\nthat authentication workflow:\n\n1. `ssr.Client` - to help generate a public key from a shared secret key.\n2. `ssr.Session` - exends the `requests` library `Session` class to expose an `ssr.Client` and patch requests with the appropriate headers to correcly interface with `ssr.BaseAuthentication`\n3. `ssr.BaseAuthentication` - to help hosts validate requests from clients that have the same shared secret.\n\n## Scope\n\nThe 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:\n\n* [ansible-vault](https://github.com/tomoh1r/ansible-vault)\n* [kms-vault](https://github.com/hangarunderground/kms-vault)\n\n## Installation\n\n`pip install ssr`\n\n## Usage\n\n### SSR Client\n\nTBD\n\n### Requests Session\n\n```python\nimport ssr\n\nsession = ssr.Session(\n secret_key=os.environ.get('APP_SECRET_KEY')\n)\n\nresponse = session.get(\n 'https://myblog.com/api/post_reports/',\n params={'q': 'auth'}\n)\n```\n\n### Base Authentication\n\nTBD\n\n\n## TODO", "description_content_type": "text/markdown; charset=UTF-8", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hangarunderground/ssr", "keywords": "auth,authentication,requests,shared secrets", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ssr", "package_url": "https://pypi.org/project/ssr/", "platform": "", "project_url": "https://pypi.org/project/ssr/", "project_urls": { "Homepage": "https://github.com/hangarunderground/ssr" }, "release_url": "https://pypi.org/project/ssr/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Shared-Secret Requests: A simple HTTP authentication library using shared secrets.", "version": "0.1.2" }, "last_serial": 4541166, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "33236b46d790d2367e5bd42cc9024f4b", "sha256": "7a311aa53c67e463c474116ea95e823139320e801e2d9ae81b27bbf102134559" }, "downloads": -1, "filename": "ssr-0.0.0.tar.gz", "has_sig": false, "md5_digest": "33236b46d790d2367e5bd42cc9024f4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7452, "upload_time": "2018-03-27T05:58:26", "url": "https://files.pythonhosted.org/packages/ed/95/26cd517cdcf9769eaa6ab70991316cf5ad814e708b115dec8c28e740c8d9/ssr-0.0.0.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "d9d061a09fffd945806926e33f3b1b7d", "sha256": "0bfc86c52d53cca0152717bed81c3a587959095b4b0fee4cc751b4cc1877b594" }, "downloads": -1, "filename": "ssr-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d9d061a09fffd945806926e33f3b1b7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9519, "upload_time": "2018-03-27T21:11:30", "url": "https://files.pythonhosted.org/packages/f4/f7/b1fdbc0999f2695d1258f3924e1a7e2f3bcf4057d88737ebe7b90a57a0a8/ssr-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "940b3eed2f1373569b0e8bc987a53292", "sha256": "51b049c7af330912ecea6d4ac91aea10c3793e9a032a29e2fb238823ecf6ca23" }, "downloads": -1, "filename": "ssr-0.1.1.tar.gz", "has_sig": false, "md5_digest": "940b3eed2f1373569b0e8bc987a53292", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10659, "upload_time": "2018-04-03T05:20:15", "url": "https://files.pythonhosted.org/packages/7e/06/722e3990183ca0c3af78b94bbcff2d9f44ecd1b07e4efa5399ce5ff25b89/ssr-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8ab894cf9111cc258b6cd344c6b33033", "sha256": "8db13d6f964fbc37bd052eaff7bba8ec55f1e7256c2f586f0598f769f4d14a7e" }, "downloads": -1, "filename": "ssr-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8ab894cf9111cc258b6cd344c6b33033", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10969, "upload_time": "2018-11-29T02:41:35", "url": "https://files.pythonhosted.org/packages/5c/3c/6b21d3c8fdfe1b1381a03c2af44d42e9e03bb5bc4262307c9e43e5507887/ssr-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8ab894cf9111cc258b6cd344c6b33033", "sha256": "8db13d6f964fbc37bd052eaff7bba8ec55f1e7256c2f586f0598f769f4d14a7e" }, "downloads": -1, "filename": "ssr-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8ab894cf9111cc258b6cd344c6b33033", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10969, "upload_time": "2018-11-29T02:41:35", "url": "https://files.pythonhosted.org/packages/5c/3c/6b21d3c8fdfe1b1381a03c2af44d42e9e03bb5bc4262307c9e43e5507887/ssr-0.1.2.tar.gz" } ] }