{ "info": { "author": "Issac Gable", "author_email": "issac.gable@ironmail.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "===================\nDjango-python3-saml\n===================\n\nDjango-python3-saml is a Django app designed to allow plug & play SAML authentication setup for Python 3 enabled Django instance.\n\nInstall\n-------\n\nRun the following command to install::\n\n $pip install django-python3-saml\n\nSetup\n-----------\n\n1. Create .env file in the same folder as settings.py if one does not already exist.\n2. Copy the template below into the .env::\n\n # Fill out all that apply.\n # On true or false pick the one that applies.\n # Django-environ expects lowercase true/false\n\n # Redirect URL passed to the next parameter.\n LOGIN_REDIRECT_URL=\"\"\n\n # Absolute Path to X509CERT file location.\n X509CERT=\"\"\n\n # HTTPS setting\n HTTPS=true or false\n\n # Service Provider Information\n SP_METADATA_URL=\"\"\n SP_LOGIN_URL=\"\"\n SP_LOGOUT_URL=\"\"\n SP_X509CERT=\"\"\n SP_PRIVATE_KEY=\"\"\n\n # Identity Provider Information\n IDP_METADATA_URL=\"\"\n IDP_SSO_URL=\"\"\n IDP_SLO_URL=\"\"\n IDP_X509_FINGERPRINT=\"\"\n\n # New User Groups is a list of Groups to assign\n # Upon new Django account creation.\n\n # Environ expects a comma separated string.\n # E.G. \"Now,Is,The,Time\"\n\n # If no groups to be assigned leave list blank.\n NEW_USER_GROUPS=\"\"\n\n # New Users setup\n ACTIVE_STATUS=true or false\n STAFF_STATUS=true or false\n\n # Contact Information Technical\n CI_TECH_GIVEN_NAME=\"\"\n CI_TECH_EMAIL=\"\"\n\n # Contact Information Support\n CI_SUPPORT_GIVEN_NAME=\"\"\n CI_SUPPORT_EMAIL=\"\"\n\n # Organizational Information EN_US\n ORG_NAME=\"\"\n ORG_DISPLAY_NAME=\"\"\n ORG_HOME_URL=\"\"\n\n3. Copy the template below into settings.py::\n\n # Set up django-environ by the instructions\n # https://github.com/joke2k/django-environ\n # if the project has a different .env package\n # simply change the env(\"variable\") to package format\n\n import os\n import sys\n import environ\n\n # This should setting should walk the path\n # back to the project's root (e.g. where manage.py exists)\n # Three folder back (/config/settings/.env - 3 = /)\n root = environ.Path(__file__) - 3\n\n # Initialize root function\n PROJECT_ROOT = root()\n\n # Initialize Env function\n # Environ requires variable casting.\n # Required variables are initialized\n # in the ENV_CAST dict below.\n ENV_CAST = {\n 'HTTPS': (bool,False),\n 'NEW_USER_GROUPS': (list,[]),\n 'ACTIVE_STATUS': (bool,False),\n 'STAFF_STATUS': (bool,False),\n 'DEBUG': (bool,False),\n }\n env = environ.Env(**ENV_CAST)\n\n # Reads the .env file\n env.read_env()\n\n # Set the system path to the base application folder.\n # This may not be required in your project.\n # Below is an example setup.\n sys.path.insert(0, os.path.join(PROJECT_ROOT, 'apps'))\n\n # SAML variable houses all .env variables in a single location.\n # All variable requests in the module will pull from these settings.\n # The .env file is used for security and should not be committed.\n SAML = {\n 'LOGIN_REDIRECT': env(\"LOGIN_REDIRECT_URL\"),\n 'X509CERT': env(\"X509CERT\"),\n 'HTTPS': 'on' if env(\"HTTPS\") else 'off',\n 'SP': {\n 'METADATA_URL': env(\"SP_METADATA_URL\"),\n 'LOGIN_URL': env(\"SP_LOGIN_URL\"),\n 'LOGOUT_URL': env(\"SP_LOGOUT_URL\"),\n 'X509CERT': env(\"SP_X509CERT\"),\n 'PRIVATE_KEY': env(\"SP_PRIVATE_KEY\"),\n },\n 'IDP': {\n 'METADATA_URL': env(\"IDP_METADATA_URL\"),\n 'SSO_URL': env(\"IDP_SSO_URL\"),\n 'SLO_URL': env(\"IDP_SLO_URL\"),\n 'X509_FINGERPRINT': env(\"IDP_X509_FINGERPRINT\"),\n },\n 'NEW_USER': {\n 'GROUPS': env(\"NEW_USER_GROUPS\"),\n 'ACTIVE': env(\"ACTIVE_STATUS\"),\n 'STAFF': env(\"STAFF_STATUS\"),\n },\n 'CONTACT_INFO': {\n 'TECHNICAL': {\n 'GIVEN_NAME': env(\"CI_TECH_GIVEN_NAME\"),\n 'EMAIL': env(\"CI_TECH_EMAIL\"),\n },\n 'SUPPORT': {\n 'GIVEN_NAME': env(\"CI_SUPPORT_GIVEN_NAME\"),\n 'EMAIL': env(\"CI_SUPPORT_EMAIL\"),\n }\n },\n 'ORGANIZATION_INFO': {\n 'EN_US': {\n 'NAME': env(\"ORG_NAME\"),\n 'DISPLAY_NAME': env(\"ORG_DISPLAY_NAME\"),\n 'URL': env(\"ORG_HOME_URL\"),\n }\n }\n }\n\n4. Add 'django-python3-saml' to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = [\n ...\n 'django_python3_saml',\n ]\n\n5. Include the dango-python3-saml URLconf into project urls.py like this::\n\n url(r'^saml/', include('django_python3_saml.urls')),\n\n6. Once the urls have been included as above the SP url paths should be as the following example::\n\n Start Url --> https://example.com/saml/initiate-login/\n ACS URL --> https://example.com/saml/complete-login/\n Enitiy ID --> https://example.com/saml/metadata/\n\n7. Add 'django-python3-saml.backends.SAMLServiceProviderBackend' to AUTHENTICATION_BACKENDS like this::\n\n AUTHENTICATION_BACKENDS = [\n 'django-python3-saml.backends.SAMLServiceProviderBackend',\n ...\n ]\n\n8. Setup chosen Identity Provider (IDP) and Attribute Mapping::\n\n Example Google Attribute Mapping expected format for new users:\n\n first_name - Basic Information - First Name\n last_name - Basic Information - Last Name\n email - Basic Information - Primary Email\n\nSpecial Thanks\n==============\n\n1. Kristian Oellegaard --> `django-saml-service-provider `_\n2. OneLogin's SAML Python Toolkit --> `python3-saml `_\n3. Daniele Faraglia --> `django-environ `_", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/IronCountySchoolDistrict/django-python3-saml", "keywords": "", "license": "BSD 3-Clause License", "maintainer": "", "maintainer_email": "", "name": "django-python3-saml", "package_url": "https://pypi.org/project/django-python3-saml/", "platform": "", "project_url": "https://pypi.org/project/django-python3-saml/", "project_urls": { "Homepage": "https://github.com/IronCountySchoolDistrict/django-python3-saml" }, "release_url": "https://pypi.org/project/django-python3-saml/1.0/", "requires_dist": null, "requires_python": "", "summary": "Django SAML auth plugin for python 3", "version": "1.0" }, "last_serial": 3685250, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "254ce963973e96b74a277dd75976c9af", "sha256": "4913f1a231a1e4af3cf4ad603f92c93246caac60d1974c7974deb847e3c34a98" }, "downloads": -1, "filename": "django_python3_saml-1.0.tar.gz", "has_sig": false, "md5_digest": "254ce963973e96b74a277dd75976c9af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10135, "upload_time": "2018-03-19T20:04:44", "url": "https://files.pythonhosted.org/packages/5d/37/635b414b959b73ad935744a310bdcd2fbf0ad7699127954655b811e6809d/django_python3_saml-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "254ce963973e96b74a277dd75976c9af", "sha256": "4913f1a231a1e4af3cf4ad603f92c93246caac60d1974c7974deb847e3c34a98" }, "downloads": -1, "filename": "django_python3_saml-1.0.tar.gz", "has_sig": false, "md5_digest": "254ce963973e96b74a277dd75976c9af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10135, "upload_time": "2018-03-19T20:04:44", "url": "https://files.pythonhosted.org/packages/5d/37/635b414b959b73ad935744a310bdcd2fbf0ad7699127954655b811e6809d/django_python3_saml-1.0.tar.gz" } ] }