{ "info": { "author": "Rasmus Munk", "author_email": "munk1@live.dk", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": ".. image:: https://travis-ci.org/rasmunk/jhub-authenticators.svg?branch=master\n :target: https://travis-ci.org/rasmunk/jhub-authenticators\n\n=========================\nJupyterhub Authenticators\n=========================\n\nAn extended collection of HTTP(S) header JupyterHub Authenticators that relies on proxy authenticating.\nEvery mentioned authenticator should be used while following\nthe mentioned security recommendations at `cwaldbieser `_.\n\n------------\nInstallation\n------------\n\nInstallation from pypi::\n\n pip install jhub-authenticators\n\nInstallation from local git repository::\n\n cd jhub-authenticators\n pip install .\n\n-------------\nConfiguration\n-------------\n\nYou should edit your ``jupyterhub_config.py`` config file to set the\nauthenticator class::\n\n c.JupyterHub.authenticator_class = 'jhubauthenticators.RemoteUserAuthenticator'\n\nYou should be able to start jupyterhub. The \"/login\" resource\nwill look for the authenticated user name in the HTTP header \"Remote-User\".\nIf found, and not blank, you will be logged in as that user.\n\nAlternatively, you can use `RemoteUserLocalAuthenticator`::\n\n c.JupyterHub.authenticator_class = 'jhubauthenticators.RemoteUserLocalAuthenticator'\n\nThis provides the same authentication functionality but is derived from\n`LocalAuthenticator` and therefore provides features such as the ability\nto add local accounts through the admin interface if configured to do so.\n\n--------------------\nDummy Authentication\n--------------------\n\nProvides an option for testing JupyterHub authentication with a dummy authenticator\nthat can have a global preset password for any account::\n\n c.JupyterHub.authenticator_class = 'jhubauthenticators.DummyAuthenticator'\n c.DummyAuthenticator.password = 'password'\n\n\nNote! Don't use in production.\n\n-------------------------------------------------------------\nRemote User Authentication extended with user-defined headers\n-------------------------------------------------------------\n\nProvides the capability to supply the jupyterhub user with additional state information\nvia the /data path. This adds two base request paths to the jupyterhub web application::\n\n'/login' -> requires a non empty Remote-User header\n'/data' -> requires both an authenticated request and a valid configured header\n\nBefore information can be passed to the user via the ``/data`` path, a list of valid\nheaders is required. These preset valid headers are then upon a POST request to the\n``/data`` URl appended to the current authenticated jupyterhub user data dictionary. I.e.\nuser.data[Header] = HeaderValue\n\nThe extended authenticator can be activated by setting the following option in the\njupyterhub config file::\n\n c.JupyterHub.authenticator_class = 'jhubauthenticators.DataRemoteUserAuthenticator'\n # Making 'State' a valid header to pass to /data\n c.DataRemoteUserAuthenticator.data_headers = ['State']\n\nBeyond providing the custom header possibility, the authenticator also by default\nencodes the Remote-User header with ``b32encode``. The authenticator therefore also provides\nthe possibility of storing the actual value for debugging purposes in the user.real_name\nvariable via the jupyterhub auth_state mechanism of passing information to\nthe spawner as noted at `Authenticators `_.\n\n---------------------\nHeader Authentication\n---------------------\n\nThis Header Authentication method provides multiple functionalities beyond mere authentication, and should in the future \nreplace the RemoteUserAuthenticator and DataRemoteUserAuthenticator. It can activated by adding the following to the JupyterHub configuration::\n\n c.JupyterHub.authenticator_class = 'jhubauthenticators.HeaderAuthenticator'\n\nBy default, it exposes the following paths::\n\n '/login' -> is utilizied to authenticate the user, relies on the 'allowed_headers' parameter to accomplish this.\n '/logout' -> clears the users authenticated session.\n '/user-data' -> allows an authenticated user to provide data to be persisted during the authenticated session. Controlled via 'user_external_allow_attributes' parameter.\n\nSpecify Authentication Header\n-----------------------------\n\nFirst it provides the possibility to define a custom authentication header,\nthis is accomplished by overriding the default allowed_headers dict required ``auth`` key::\n\n c.HeaderAuthenticator.allowed_headers = {'auth': 'MyAuthHeader'}\n\nThis will overrive the default ``Remote-User`` header authentication to use the ``MyAuthHeader`` instead.\n\nAdditional User Data Headers\n----------------------------\nBeyond the ``auth`` key, the administrator is allowed to set additional headers that the authenticator will accept requests on.\n\nFor instance, if the ``MyCustomHeader`` should be accepted as well during authentication::\n\n c.HeaderAuthenticator.enable_auth_state = True\n c.HeaderAuthenticator.allowed_headers = {'auth': 'MyAuthHeader',\n 'auth_data': 'MyCustomHeader'}\n\nAny information provided via the ``MyCustomHeader`` during authentication will be added to the JupyterHub user's ``auth_state``,\ndictionary as defined by `Authenticators auth_state `_. The data will be added to the ``auth_state`` by utilizing the header value in the \n``allowed_headers`` dictionary as the key in the 'auth_state' dictionary. For instance the above configuration, will produce the following user profile::\n\n user = {\n name: 'stored MyAuthHeader value',\n 'auth_state': {'MyCustomHeader': 'stored MyCustomHeader value'}\n }\n\nIt's important to note here, that this information is only persisted for the life-time of the authenticated session.\n\nSharing auth_state data with Spawner Environement\n-------------------------------------------------\nIf any of the defined ``auth_state`` key-value pairs should be set as Spawner environement variables before a notebook is spawned, the ``spawner_shared_headers`` parameter is available to define this, E.g if the \"MyCustomHeader' should do this, it can be accomplished with the following addition to the configuration::\n\n c.HeaderAuthenticator.spawner_shared_headers = ['MyCustomHeader']\n\nWhich during `pre_spawn_hook `_ will produce the following environment variable::\n\n ~>env | grep MyCustomHeader\n\n MyCustomHeader=\"stored MyCustomHeader value\"\n\n\nSpecial Parsers\n---------------\nIf the administrator requires that the defined ``allowed_headers`` should be parsed in a special way.\nThe administrator can use the ``header_parser_classes`` parameter to define how a request with a particular header should be parsed, E.g::\n\n from jhubauthenticators import Parser, JSONParser\n\n c.HeaderAuthenticator.header_parser_classes = {'auth': Parser,\n 'auth_data': JSONParser}\n\nThe ``auth`` header is here set to be parsed by the default Parser, which just returns the provided value unchanged.\nThe JSONParser, however does what it indicated, attempts to parse the data as JSON.\n\nIn addition to these, the authenticator also provides the ``RegexUsernameParser`` which can be used as an ``auth`` parser, E.g::\n\n # RegexUsernameParser\n c.HeaderAuthenticator.header_parser_classes = {'auth': RegexUsernameParser}\n # Email regex\n RegexUsernameParser.username_extract_regex = '([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+)'\n\nWhich will try to expand an email from the defined ``auth`` allowed_headers Header. If this can't be accomplished, the user will not be authenticated.\n\nIt is possible to define additional parsers by extending the Parser class and implementing the required parse method, E.g::\n\n class MyParser(Parser)\n\n # MyAdvancedParser\n def parse(self, data)\n return data\n\nWhich can subsequently be activate by adding it to the ``header_parser_classes`` parameter, E.g.::\n\n # MyAdvancedParser\n c.HeaderAuthenticator.header_parser_classes = {'auth': MyParser}\n\nSet User state after Authentication\n-----------------------------------\n\nFinally, the HeaderAuthenticator also provides the administrator the possibility to define the ``user_external_allow_attributes`` parameter.\nThis allows defines which user attributes an authenticated user is allowed to set the ``user.data`` variable via the ``/user-data`` URL, E.g::\n\n c.HeaderAuthenticator.user_external_allow_attributes = ['data']\n\nBy default the ``user_external_allow_attributes`` allows no such attributes and has to be explicitly enabled/defined.\nIn addition, any posted value to the ``/user-data`` path\nThe provided data on this URL, has to be decodable as JSON or it will fail.\n\nAdditional configuration examples can be found in the ``tests/jupyterhub_configs`` directory.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rasmunk/jhub-authenticators", "keywords": "Interactive,Interpreter,Shell,Web", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "jhub-authenticators", "package_url": "https://pypi.org/project/jhub-authenticators/", "platform": "Linux", "project_url": "https://pypi.org/project/jhub-authenticators/", "project_urls": { "Homepage": "https://github.com/rasmunk/jhub-authenticators" }, "release_url": "https://pypi.org/project/jhub-authenticators/0.2.2/", "requires_dist": [ "jupyterhub (>=0.9.2)", "docutils (>=0.14)" ], "requires_python": "", "summary": "A collection of HTTP(s) JupyterHub Header Authenticators,includes Header, Remote-User and Dummy", "version": "0.2.2" }, "last_serial": 5134634, "releases": { "0.0.7": [ { "comment_text": "", "digests": { "md5": "7e7bdc11c90725873138dc3deab53f2b", "sha256": "e316b16e6ff3f3af77f21c308e5294525f113d15074b089cb7308c82f33bd7de" }, "downloads": -1, "filename": "jhub_authenticators-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "7e7bdc11c90725873138dc3deab53f2b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5213, "upload_time": "2018-08-15T20:34:40", "url": "https://files.pythonhosted.org/packages/ec/de/d9dd3368be134a7c2ffe96e0cfcf0c8c8cf401d569df123f738e676c9c00/jhub_authenticators-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f66bf6cee987d98c83d6ae173a2c21ba", "sha256": "a986bf2c65aa2c39433f6e1f3aa83c91447e56c0778dd11034545efc850ad347" }, "downloads": -1, "filename": "jhub-authenticators-0.0.7.tar.gz", "has_sig": false, "md5_digest": "f66bf6cee987d98c83d6ae173a2c21ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4627, "upload_time": "2018-08-15T20:34:41", "url": "https://files.pythonhosted.org/packages/f1/8c/ea467cb2ec65555a6b98eb45a7facfa1b127fe2b1447666ca75acbe2c1f1/jhub-authenticators-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "f633bed9f870ccfa41a2c8c88326eb45", "sha256": "6c9b1fcc910c9816197414377e363c357a2146b9347d96aac3a7419fed1060bf" }, "downloads": -1, "filename": "jhub_authenticators-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "f633bed9f870ccfa41a2c8c88326eb45", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5570, "upload_time": "2018-09-16T18:33:16", "url": "https://files.pythonhosted.org/packages/75/3e/840fba174293726e2d651a2ec5335cab3d13d49b7892e4603122626271ee/jhub_authenticators-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dde9d164445935566f20787587c3ca42", "sha256": "dd7521a6d1ae0c04d3f4843204ec5f013bd0b2b4c4ca901ec3f776dd0b57c0cf" }, "downloads": -1, "filename": "jhub-authenticators-0.0.8.tar.gz", "has_sig": false, "md5_digest": "dde9d164445935566f20787587c3ca42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5004, "upload_time": "2018-09-16T18:33:17", "url": "https://files.pythonhosted.org/packages/46/1b/844872cb91b49e53ac27c4b60414968ab9aa53c7482e7d185ba326acb4e1/jhub-authenticators-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "500f8f610e1d44e222fd7ddb72ac6049", "sha256": "ee5ae2a584b385088bbe7c131724fc1f927abffb34c0df488f904cdb6177d2e9" }, "downloads": -1, "filename": "jhub_authenticators-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "500f8f610e1d44e222fd7ddb72ac6049", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5785, "upload_time": "2018-09-16T22:41:48", "url": "https://files.pythonhosted.org/packages/74/32/4d2277e641bc6555c08d03443f66387364d3d042a258a1ac151f7f094b9e/jhub_authenticators-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca982d30c51b084aac1ce0cfcdb6f76e", "sha256": "73ed0e9f42e77a1f82c2c4d8726f71ea8a5af1741d32726698d7dd42ac1f3b2f" }, "downloads": -1, "filename": "jhub-authenticators-0.0.9.tar.gz", "has_sig": false, "md5_digest": "ca982d30c51b084aac1ce0cfcdb6f76e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5240, "upload_time": "2018-09-16T22:41:49", "url": "https://files.pythonhosted.org/packages/53/fb/725a4a0035bfeb0a9a5208dce3b6efafc7d9de560fc041ad2e4c2619a457/jhub-authenticators-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "a8ff678fbcafa97f536cf466e34bf52f", "sha256": "040b3d3a1ae8c7773f6aa136b6010fee45739b81922bd3a63bdd588c9499b556" }, "downloads": -1, "filename": "jhub_authenticators-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a8ff678fbcafa97f536cf466e34bf52f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5699, "upload_time": "2018-09-24T20:16:11", "url": "https://files.pythonhosted.org/packages/8e/a8/f1e5473563d31dd1c972f1030d2ffc7547d391d1eba72746e074f3566334/jhub_authenticators-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9faed11b3bb763b864da1a97fd30b6cb", "sha256": "813fc86a27c1b5110c6dfb63e69425dd54ff9d93b02f613dd172af8a2514e013" }, "downloads": -1, "filename": "jhub-authenticators-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9faed11b3bb763b864da1a97fd30b6cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5224, "upload_time": "2018-09-24T20:16:12", "url": "https://files.pythonhosted.org/packages/64/e7/958d3600d9a293b93bc4f0892a780d5905b3423aa13c57939d42af14db99/jhub-authenticators-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "cc8d4bd436c006924dc5fff24b24125b", "sha256": "77210ace195254ac3e1137f03f1c8d1b0bd3d4f79762e71e5c9691225091740b" }, "downloads": -1, "filename": "jhub_authenticators-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cc8d4bd436c006924dc5fff24b24125b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18041, "upload_time": "2018-10-28T12:58:01", "url": "https://files.pythonhosted.org/packages/2a/72/b01bea209f221770f860cea2a214ccaf18f9996fb5720a80acb771c0a844/jhub_authenticators-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "812f6a5804c6cda2b7c41d372a757c93", "sha256": "9c0ff70cc73af47ea603198918652542354fdc0d1cb3f7abe32dcfe2ef412685" }, "downloads": -1, "filename": "jhub-authenticators-0.1.1.tar.gz", "has_sig": false, "md5_digest": "812f6a5804c6cda2b7c41d372a757c93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5219, "upload_time": "2018-10-28T12:58:02", "url": "https://files.pythonhosted.org/packages/b8/aa/a54be4ec1c57ae77e19f72e8f34b10e628d707a3122c023f32ae6cb1350c/jhub-authenticators-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "12f55f576bc8e6a43dbb1552d1e82222", "sha256": "fa6c21ec8a1b1d8f9bb4d17df788597fe804943f3a40531d91df1be58f9e22a8" }, "downloads": -1, "filename": "jhub_authenticators-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "12f55f576bc8e6a43dbb1552d1e82222", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23386, "upload_time": "2019-04-08T10:10:23", "url": "https://files.pythonhosted.org/packages/80/a0/6684d9a67b0f4b2beae564037539d29811c7d63e275d62f580fc178c29d4/jhub_authenticators-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9e0f5e849913f2027d0f307ffd45a131", "sha256": "d0ad6684f69b2cfe3c45fae1893d1cdc6c764b7fd3e4c295c0e751a7862a4b30" }, "downloads": -1, "filename": "jhub-authenticators-0.2.0.tar.gz", "has_sig": false, "md5_digest": "9e0f5e849913f2027d0f307ffd45a131", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11651, "upload_time": "2019-04-08T10:10:24", "url": "https://files.pythonhosted.org/packages/92/66/1b6e0374edbab49ebea2bd0e0af1b16efb3c9e77704b094380bdd3015dbe/jhub-authenticators-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "28fd5769ad77bf328264e038be3bbcfb", "sha256": "8995e9c861b6aacb0b72185b7501d75a854f19abbafc6ee3385b7dd69fadec2a" }, "downloads": -1, "filename": "jhub_authenticators-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "28fd5769ad77bf328264e038be3bbcfb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23475, "upload_time": "2019-04-08T14:56:25", "url": "https://files.pythonhosted.org/packages/b0/79/739f42ff037b83c4f1fd49d7941abb4a6b1142d15ef67cb0253eb595df50/jhub_authenticators-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4e091aa3212581a09b7fcbe99280bbc", "sha256": "3aac3e22e296f7d5d3bac155ea88ba61209e50e9d310fc7f512d77d2a9768d46" }, "downloads": -1, "filename": "jhub-authenticators-0.2.1.tar.gz", "has_sig": false, "md5_digest": "b4e091aa3212581a09b7fcbe99280bbc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11847, "upload_time": "2019-04-08T14:56:27", "url": "https://files.pythonhosted.org/packages/b0/29/16f0d25a1224aff6621a685986c3eae505e3a59d191e9cd704ff0ce443ed/jhub-authenticators-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "01d720a086c76d3f8867a056e1354f95", "sha256": "38645092e5482dbb91e98a1dc7791db3947ca3c6d2af35a2b664960a2575fce3" }, "downloads": -1, "filename": "jhub_authenticators-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "01d720a086c76d3f8867a056e1354f95", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23680, "upload_time": "2019-04-12T15:51:39", "url": "https://files.pythonhosted.org/packages/fe/80/31b1e5ac354c23e127696d0be6bfa2dfd14b788336fc635508ae1d261006/jhub_authenticators-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e5fecbc175efa8fe1f8f6ddb5a904ac", "sha256": "d39290eea58620d1a45a0325fc1b494af73b1c7ba3bb95caa291dd177d52a47a" }, "downloads": -1, "filename": "jhub-authenticators-0.2.2.tar.gz", "has_sig": false, "md5_digest": "4e5fecbc175efa8fe1f8f6ddb5a904ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9901, "upload_time": "2019-04-12T15:51:41", "url": "https://files.pythonhosted.org/packages/b8/4d/5bd07c1d9b6eb90e94fcd09024ebea96d11fdff0a3612fe698966c2c7e4d/jhub-authenticators-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "01d720a086c76d3f8867a056e1354f95", "sha256": "38645092e5482dbb91e98a1dc7791db3947ca3c6d2af35a2b664960a2575fce3" }, "downloads": -1, "filename": "jhub_authenticators-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "01d720a086c76d3f8867a056e1354f95", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23680, "upload_time": "2019-04-12T15:51:39", "url": "https://files.pythonhosted.org/packages/fe/80/31b1e5ac354c23e127696d0be6bfa2dfd14b788336fc635508ae1d261006/jhub_authenticators-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e5fecbc175efa8fe1f8f6ddb5a904ac", "sha256": "d39290eea58620d1a45a0325fc1b494af73b1c7ba3bb95caa291dd177d52a47a" }, "downloads": -1, "filename": "jhub-authenticators-0.2.2.tar.gz", "has_sig": false, "md5_digest": "4e5fecbc175efa8fe1f8f6ddb5a904ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9901, "upload_time": "2019-04-12T15:51:41", "url": "https://files.pythonhosted.org/packages/b8/4d/5bd07c1d9b6eb90e94fcd09024ebea96d11fdff0a3612fe698966c2c7e4d/jhub-authenticators-0.2.2.tar.gz" } ] }