{ "info": { "author": "Kirit Saelensminde", "author_email": "kirit@felspar.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Django Fost Authentication\n==========================\n\nAn authentication back-end for Django implementing request signing using\nstrong cryptography. It is based on the request signing mechanism\nimplemented by Amazon for s3.\n\nBoth requests and URLs can be signed. Request signing are used where the\nuser agent itself is able to perform the signing (i.e. it knows the API\nkey and secret). URL signing is used where a authentication needs to be\ndelegated to a user agent not capable (or not trusted) to sign the\nrequest.\n\nTo use in a Django project\n==========================\n\nAdd the git repository to your pip install file and then use:\n\n::\n\n pip install -r setup.pip\n\nTo your settings.py you need to add the middleware. It doesn't matter\nwhere in the middleware list it is added:\n\n::\n\n MIDDLEWARE_CLASSES = (\n 'django.middleware.common.CommonMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n 'fost_authn.Middleware',\n )\n\nUnless you've already added a custom authentication backend your\nsettings.py probably doesn't already have the authentication backends\nset on it. The following will enable the normal Django authentication\n(forms/session based) and the Fost authentication:\n\n::\n\n AUTHENTICATION_BACKENDS = (\n 'django.contrib.auth.backends.ModelBackend',\n 'fost_authn.FostBackend',\n )\n\nIn order to be able to authenticate requests the authentication backend\nneeds to know how to map API keys to secrets and to users.\n\nFinding a secret from an API key is done by giving a function to the\nFOST\\_AUTHN\\_GET\\_SECRET setting. If this is not configured then the\ndefault implementation will use a SHA1 hash of the user's password\nfield. This ensures that the secret will change even if the user changes\ntheir password to the same as it was due to the change in the salt\nstored in the field.\n\nThe following is an example of what can be put in the settings.py.\n\n::\n\n def FOST_AUTHN_GET_SECRET(request, key):\n from myapp.models import api_keys\n return api_keys.objects.get(key=key).secret\n\nChanges to existing Django classes\n----------------------------------\n\nAfter installing the authentication middleware the Django HttpRequest\nobject is augmented with a new member, SIGNED, which is a ``dict``\nholding the signed request header members. If the request has not been\nproperly signed this ``dict`` will be empty.\n\nOptional settings\n-----------------\n\nFOST\\_AUTHN\\_MISSIGNED\\_SLEEP\\_TIME\n\nThe amount of time to sleep when a FOST Authorization header is\nincorrect. Defaults to 0.5 seconds.\n\nFOST\\_AUTHN\\_MAXIMUM\\_CLOCK\\_SKEW\n\nThe maximum allowed difference between the time when the request was\nsigned and the time on the server. Defaults to 300 seconds.\n\nSigning requests\n================\n\nIn order to authenticate against the back end requests must be properly\nsigned. \\`fost\\_auth.signature' includes two functions for doing this\nthat can be used.\n\n``fost_hmac_request_signature(secret, method, path, timestamp, headers = {}, body = '')``\n-----------------------------------------------------------------------------------------\n\nThe headers are in the form of a dict giving the header name and values.\nThe function returns both the signature and the document that was\nsigned.\n\nIt is the responsibility of the caller to correctly place the header\nvalues into the request object that is to be used, including the\n``Authorization`` header.\n\nRunning tests\n=============\n\nFor best results create a virtualenv, then initialise it with test.pip.:\n\n::\n\n mkvirtualenv django-fost-authn\n pip install -r test.pip\n\nRun the tests using:\n\n::\n\n ./runtest", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Felspar/django-fost-authn", "keywords": "django authentication hmac sha1 fost", "license": "Boost Software License - Version 1.0 - August 17th, 2003", "maintainer": null, "maintainer_email": null, "name": "django-fost-authn", "package_url": "https://pypi.org/project/django-fost-authn/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-fost-authn/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Felspar/django-fost-authn" }, "release_url": "https://pypi.org/project/django-fost-authn/0.3.8/", "requires_dist": null, "requires_python": null, "summary": "HTTP SHA1 HMAC authentication backend for Django", "version": "0.3.8" }, "last_serial": 929357, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "6905bc32c35a108cb62d4b8c5235385d", "sha256": "fcad7cd66b963feb9586e9a7a90e9b6a8ed23cb39c26bad96d42c9c0da123635" }, "downloads": -1, "filename": "django-fost-authn-0.3.tar.gz", "has_sig": false, "md5_digest": "6905bc32c35a108cb62d4b8c5235385d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5527, "upload_time": "2012-02-16T05:33:16", "url": "https://files.pythonhosted.org/packages/a6/08/f3580548b9d5d3c6bfdf976257d2aba819f69d680147eb3e028a49350517/django-fost-authn-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "d5254ad8ea960ac3196e9ac6d2b9fc12", "sha256": "6e767a0db8b5fc3e3c479a16e2824f6f577d9f35436e4bbab0f24d515c84edbd" }, "downloads": -1, "filename": "django-fost-authn-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d5254ad8ea960ac3196e9ac6d2b9fc12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5681, "upload_time": "2012-04-02T05:15:24", "url": "https://files.pythonhosted.org/packages/d6/21/d02e39616bcd0590c69aff8337abe4f3e3089cd39d57e4cf72894dce09bf/django-fost-authn-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "90ebbf35f65488e7ee75b5aa56ee75af", "sha256": "ba91b110763c38a89feb79ba067f98796e4fe271bf091b00d3e6e6f474e85aca" }, "downloads": -1, "filename": "django-fost-authn-0.3.2.tar.gz", "has_sig": false, "md5_digest": "90ebbf35f65488e7ee75b5aa56ee75af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5745, "upload_time": "2012-04-03T16:09:20", "url": "https://files.pythonhosted.org/packages/fb/b9/c5fc9e86f6d937b692add1d4880ab9d34fb684320cf3661f07df22154153/django-fost-authn-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "e1864b5d7e3c154cd11fa598a255696d", "sha256": "6bc4b67956022d29594a32aaa549151828a2b3ef2e1ee05281b6299c3f9e4b19" }, "downloads": -1, "filename": "django-fost-authn-0.3.3.tar.gz", "has_sig": false, "md5_digest": "e1864b5d7e3c154cd11fa598a255696d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5983, "upload_time": "2012-04-05T04:23:11", "url": "https://files.pythonhosted.org/packages/d1/b3/fdc73636093ffe11e60cbbe7be52f1ff9c65ad8bac694620b47ac176c296/django-fost-authn-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "b598bd5f08d327e45156cccf90313a9b", "sha256": "8d5f0ae8e4cfbf4afaa87b856beb589f717c2eaa26d9af7d473c5df99a610d99" }, "downloads": -1, "filename": "django-fost-authn-0.3.4.tar.gz", "has_sig": false, "md5_digest": "b598bd5f08d327e45156cccf90313a9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5970, "upload_time": "2012-04-05T04:33:22", "url": "https://files.pythonhosted.org/packages/bb/15/37e5c5afda0003dea48a76f849e10942c23b80c1c96b3fd9a6456e189d62/django-fost-authn-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "3f88bf92158443594262fbea795e05d5", "sha256": "a277671378a06aab61c48f6ad702cdd200788fb3b1caec40cf4100bbbd9b60c0" }, "downloads": -1, "filename": "django-fost-authn-0.3.5.tar.gz", "has_sig": false, "md5_digest": "3f88bf92158443594262fbea795e05d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5961, "upload_time": "2013-07-10T08:04:51", "url": "https://files.pythonhosted.org/packages/a2/b5/a9f6b7dc7d7039109b3af45cf49e495e7721b4d3e78c0ea2df11d41069db/django-fost-authn-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "7b5fc55ea50ca8ddec4ca65644c097c4", "sha256": "4eb39f44ec1a1858a391f104d55291fa672272ce2436163814a8198e642472f0" }, "downloads": -1, "filename": "django-fost-authn-0.3.6.tar.gz", "has_sig": false, "md5_digest": "7b5fc55ea50ca8ddec4ca65644c097c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5973, "upload_time": "2013-07-11T01:33:57", "url": "https://files.pythonhosted.org/packages/1d/ef/2f0963e9240ece9129cab8b61094d6fdfcf0eaeb6e8df03484b3ec5bf82c/django-fost-authn-0.3.6.tar.gz" } ], "0.3.7": [ { "comment_text": "", "digests": { "md5": "a7c5719c7e3a626cec5ad6c71cf3b3d5", "sha256": "c7fc5f6a6df95039d84a121e830112b48c3f999d29097cba1fdef61c841bc4bf" }, "downloads": -1, "filename": "django-fost-authn-0.3.7.tar.gz", "has_sig": false, "md5_digest": "a7c5719c7e3a626cec5ad6c71cf3b3d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6006, "upload_time": "2013-09-19T01:55:31", "url": "https://files.pythonhosted.org/packages/ae/88/a0b008fcb56fe1cbe93d8d734d8f21f00ceeadea58ccc6f0785d6c6fc7d3/django-fost-authn-0.3.7.tar.gz" } ], "0.3.8": [ { "comment_text": "", "digests": { "md5": "4a1ad22ac0dc21f475f998f47269f2e8", "sha256": "d654e5b8a958119708f5687b178af9fadc97e899ba759a564ec05ba226b2fb3a" }, "downloads": -1, "filename": "django-fost-authn-0.3.8.tar.gz", "has_sig": false, "md5_digest": "4a1ad22ac0dc21f475f998f47269f2e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6067, "upload_time": "2013-11-26T08:53:27", "url": "https://files.pythonhosted.org/packages/11/13/9791f2c0a615b02b2a6549c2c00bddd04e8a39878bf2b4f534c0834caa24/django-fost-authn-0.3.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4a1ad22ac0dc21f475f998f47269f2e8", "sha256": "d654e5b8a958119708f5687b178af9fadc97e899ba759a564ec05ba226b2fb3a" }, "downloads": -1, "filename": "django-fost-authn-0.3.8.tar.gz", "has_sig": false, "md5_digest": "4a1ad22ac0dc21f475f998f47269f2e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6067, "upload_time": "2013-11-26T08:53:27", "url": "https://files.pythonhosted.org/packages/11/13/9791f2c0a615b02b2a6549c2c00bddd04e8a39878bf2b4f534c0834caa24/django-fost-authn-0.3.8.tar.gz" } ] }