{ "info": { "author": "Interaction Consortium", "author_email": "studio@interaction.net.au", "bugtrack_url": null, "classifiers": [], "description": "|Build Status| |Coverage Status| |Version|\n\nOverview\n========\n\nThis app provides a mixin class that adds fallback master password\nauthentication to an existing backend, and a ready to use subclass of\nDjango's ``ModelBackend`` with master password authentication.\n\nThis could be dangerous and is generally not recommended for production,\nbut is super handy for development and staging environments.\n\nIn a pinch it can also be used temporarily (with a strong password) to\ntroubleshoot end-user issues in production environments, without having\nto reset their password.\n\nInstallation\n============\n\nInstall with pip:\n\n::\n\n $ pip install django-master-password\n\nUpdate the ``AUTHENTICATION_BACKEND`` setting:\n\n::\n\n AUTHENTICATION_BACKEND += ('master_password.auth.ModelBackend', )\n\nIf you want to use the optional ``make_password`` management command,\nupdate the ``INSTALLED_APPS`` setting as well:\n\n::\n\n INSTALLED_APPS += ('master_password', )\n\nUsage\n=====\n\nThe ``MasterPasswordMixin.authenticate()`` method will first try to\nauthenticate with its superclass, and then it will fallback to master\npassword authentication.\n\nThe default implementation authenticates against the\n``MASTER_PASSWORDS`` setting, which should be a dictionary with clear\ntext or hashed passwords as keys, and callback functions (or ``None``)\nas values.\n\nA callback function must take a user object as its only argument, and\nshould return ``True`` if the user is allowed to authenticate with that\npassword.\n\nFor example, you might have one master password that cannot be used for\nstaff or superuser accounts, and another that can be used for any\naccount:\n\n::\n\n MASTER_PASSWORDS = {\n 'user123': lambda u: not u.is_staff and not u.is_superuser,\n 'superuser123': None,\n }\n\nThe use of clear text master passwords is intended as a convenience\nduring development. When ``DEBUG=False``, you *must* use a strong hashed\npassword with at least 50 characters, 1 digit, 1 uppercase letter, 1\nlowercase letter, and 1 non-alphanumeric character:\n\n::\n\n MASTER_PASSWORDS = {\n 'pbkdf2_sha256$'\n '20000$'\n 'kGdCcfmJtsUY$'\n 'euTmHbJ9sdHirlsM2MvUjHQPDJ6CZdu02gYrxY3aAbI=': None,\n }\n\nThis is a failsafe against accidentally enabling an unsafe master\npassword for production and staging environments.\n\nYou can generate a hashed password in Python:\n\n::\n\n >>> from django.contrib.auth.models import make_password\n >>> print make_password('password123')\n pbkdf2_sha256$20000$kGdCcfmJtsUY$euTmHbJ9sdHirlsM2MvUjHQPDJ6CZdu02gYrxY3aAbI=\n\nOr use the ``make_password`` management command:\n\n::\n\n (venv)$ ./manage.py make_password\n Password:\n Hashed password: pbkdf2_sha256$20000$kGdCcfmJtsUY$euTmHbJ9sdHirlsM2MvUjHQPDJ6CZdu02gYrxY3aAbI=\n\nCustomising\n===========\n\nIf you are already using a custom auth backend, use the mixin class to\nadd master password authentication to it. You will need to define a\n``get_user_object(**kwargs)`` method, which should be the same as the\n``authenticate()`` method on the superclass but without any password\nvalidation.\n\nYou can also override the ``get_master_passwords()`` method if you want\nto get master passwords from another source than the\n``MASTER_PASSWORDS`` setting.\n\n.. |Build Status| image:: https://img.shields.io/travis/ixc/django-master-password.svg\n :target: https://travis-ci.org/ixc/django-master-password\n.. |Coverage Status| image:: https://img.shields.io/coveralls/ixc/django-master-password.svg\n :target: https://coveralls.io/github/ixc/django-master-password\n.. |Version| image:: https://img.shields.io/pypi/v/django-master-password.svg\n :target: https://pypi.python.org/pypi/django-master-password", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ixc/django-master-password", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-master-password", "package_url": "https://pypi.org/project/django-master-password/", "platform": null, "project_url": "https://pypi.org/project/django-master-password/", "project_urls": { "Homepage": "https://github.com/ixc/django-master-password" }, "release_url": "https://pypi.org/project/django-master-password/1.1.1/", "requires_dist": null, "requires_python": null, "summary": "Login as any user with a master password. Add master password support to your custom authentication backend.", "version": "1.1.1" }, "last_serial": 2289848, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "a0e3c2d31ef014d6d09ad303a57b339c", "sha256": "fb9dd319a2431ef3f8808f55e075c4eb28b2d90373184e8aa3c9c7d8ddb38a14" }, "downloads": -1, "filename": "django_master_password-1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a0e3c2d31ef014d6d09ad303a57b339c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10069, "upload_time": "2016-07-06T14:39:23", "url": "https://files.pythonhosted.org/packages/e4/f5/f945364c44be0b4aa8ab3384923147ceeb58c81589b25f09393977df57da/django_master_password-1.0-py2.py3-none-any.whl" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "d8533fd01cebe30dbe9b19383a34ddb7", "sha256": "ecccfd09ad5b76037139d826daf675658cf5f3db39963f9982ba0db65205b4da" }, "downloads": -1, "filename": "django_master_password-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d8533fd01cebe30dbe9b19383a34ddb7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10678, "upload_time": "2016-08-18T14:54:26", "url": "https://files.pythonhosted.org/packages/a1/0f/f2188c45e1fbaee75db71135452e393c59acd7cb8fa0c6d4153a448ca651/django_master_password-1.1-py2.py3-none-any.whl" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "526c05b0956d5346ae120ad51d8829e2", "sha256": "2447cdddfa0ccbd63cbc5b52ec153e90d90cbf37d66e921114a22ef5281c44ec" }, "downloads": -1, "filename": "django_master_password-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "526c05b0956d5346ae120ad51d8829e2", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10877, "upload_time": "2016-08-18T23:37:25", "url": "https://files.pythonhosted.org/packages/a4/5f/3b27cfe00f0b49f2baac9d3ad95fb06327f1ca55fdf435b3e674b55c3230/django_master_password-1.1.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "526c05b0956d5346ae120ad51d8829e2", "sha256": "2447cdddfa0ccbd63cbc5b52ec153e90d90cbf37d66e921114a22ef5281c44ec" }, "downloads": -1, "filename": "django_master_password-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "526c05b0956d5346ae120ad51d8829e2", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10877, "upload_time": "2016-08-18T23:37:25", "url": "https://files.pythonhosted.org/packages/a4/5f/3b27cfe00f0b49f2baac9d3ad95fb06327f1ca55fdf435b3e674b55c3230/django_master_password-1.1.1-py2.py3-none-any.whl" } ] }