{ "info": { "author": "Catalyst IT", "author_email": "", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# django-realme: a Django app for integrating the RealMe authentication service\n\nThis is a Django package and a small example Django application to show how to\nuse the RealMe authentication service with your Django project. All instructions\nare based on Ubuntu 16.04 LTS.\n\n\n## Install prerequisites\n\n- libxmlsec1-dev\n- pkg-config\n\n\n## Stages and Environments\n\nThe RealMe authentication service is divided into three separate environments,\nsplit up by function: development, testing, and production. These are:\n\n- Stage 1: Message Test Site (MTS)\n- Stage 2: Integration Test Environment (ITE)\n- Stage 3: Production Environment (PRD)\n\n\n## Bundles\n\nFor each environment above, RealMe will provide a Bundle zip file:\n\n- Integration Bundle MTS V2.1.zip\n- Integration Bundle ITE V2.0.zip\n- Integration Bundle Production V2.0.zip\n\nEach Bundle contains the keys, certificates and configuration for integrating\nwith the RealMe service. For MTS, it contains a pre-built sample key and\ncertificate, so you can use them directly for development. For ITE and PRD, you\nhave to create your own key and certificate.\n\nIn this app, we require you to put all the bundles into a directory, and put\nyour key and certificate into each bundle. You may need to split them into\nmulitiple environments. For example, in endoflife, we split ITE into `ITE-uat`\nand `ITE-testing`, each with its own key and certificate files. The directory\nlayout is as follows:\n```\n bundles\n \u251c\u2500\u2500 MTS\n \u251c\u2500\u2500 ITE-uat\n \u251c\u2500\u2500 ITE-testing\n \u2514\u2500\u2500 PRD\n```\n\n\n## Create key and cert for ITE and PRD\n\nTo generate certificates for ITE and PRD, you will need to go through a\nchecklist with the Department of Internal affairs. Part of this is using OpenSSL\nto generate a private key and CSR:\n\n STAGE=ite # or prod\n DOMAIN=$STAGE.sa.saml.sig.mysite.mydomain.nz;\n PK_FILE=\"$DOMAIN.private.key\"\n CSR_FILE=\"$DOMAIN.csr\"\n GPG_FILE=\"$PK_FILE.gpg\"\n openssl req -new -nodes -newkey rsa:2048 -keyout $PK_FILE -out $CSR_FILE \\\n -subj \"/C=NZ/O=Department of Internal Affairs/OU=Births, Deaths and Marriages/CN=$DOMAIN\";\n\nThen send the CSR to DIA for approval, and they will hopefully furnish you with\na certificate.\n\nMore documentation about this process and the specification may be available\nhere: https://see.govt.nz/realme/realme/Library/Forms/Library.aspx\n\n\n## Django settings\n\n- Add `realme` and `django.contrib.sessions` to `INSTALLED_APPS`\n- Add `realme.backends.SamlBackend` to `AUTHENTICATION_BACKENDS`\n- Make sure `django.contrib.sessions.middleware.SessionMiddleware` is in `MIDDLEWARE`\n- Set `BUNDLES_ROOT` to your bundles directory\n- Set `BUNDLE_NAME` to one of `FAKE`, `MTS`, `ITE`, `PRD` as appropriate\n- Adjust `BUNDLES` with settings to override realme.bundles.BUNDLES_DEFAULT\n\nRefer to the supplied `example/example/settings.py` for examples.\n\nThe `site_url` in `BUNDLES` is optional, you can also set it with a global\n`SITE_URL` setting.\n\nWhile loading the bundle configuration, the code will load\n`realme.bundles.BUNDLES_DEFAULT` first, and merge settings from `settings.BUNDLES`.\n\n\n## URLs\n\nSet up the URLs as follows:\n```\n from django.conf.urls import url, include\n urlpatterns = [\n ...\n url(r'^realme/', include('realme.urls', namespace='realme')),\n ...\n ]\n```\n\nThen you can use the RealMe URLs in templates:\n\n```\n {% url 'realme:login' %}\n {% url 'realme:logout' %}\n {% url 'realme:acs' %}\n ...\n```\n\nFor login, it defaults to low strength, but you can specify with:\n\n```\n {% url 'realme:login' %}?strength=low\n {% url 'realme:login' %}?strength=moderate\n```\n\n\n## Metadata\n\nWe provide two ways to generate metadata:\n\n1. login to the site as admin and save the `/realme/metadata` URL as an XML file.\n2. run the `render_metadata` Django management command.\n\nFor the MTS RealMe service, you can upload an XML file containing this metadata\nto the MTS site:\n\n1. Navigate to https://mts.realme.govt.nz/logon-mts/metadataupdate\n2. Select your XML file and click the \"Upload\" button.\n3. In the next screen, click the \"Import\" button.\n\nFor ITE and PRD, you need access to https://see.govt.nz/realme/realme to\nupload the metadata. Once that is done you can notify the DIA team, and wait for\nthem to apply it.\n\n\n## Seamless logon\n\nThis app has code for seamless logon but at this stage it is not fully verified.\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/catalyst/django-realme/archive/1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/catalyst/django-realme", "keywords": "", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "django-realme", "package_url": "https://pypi.org/project/django-realme/", "platform": "", "project_url": "https://pypi.org/project/django-realme/", "project_urls": { "Download": "https://github.com/catalyst/django-realme/archive/1.0.tar.gz", "Homepage": "https://github.com/catalyst/django-realme" }, "release_url": "https://pypi.org/project/django-realme/1.0/", "requires_dist": null, "requires_python": "", "summary": "A Django app client for the RealMe service", "version": "1.0" }, "last_serial": 3536985, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "370da47f6d8a582d6df4ed3d3a28eaed", "sha256": "7c0ee352c3bd03a22fdc108cb4c2a74e46617372f12595c0fb6b7dcf6703f0bd" }, "downloads": -1, "filename": "django-realme-1.0.tar.gz", "has_sig": false, "md5_digest": "370da47f6d8a582d6df4ed3d3a28eaed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 71546, "upload_time": "2018-01-31T02:11:09", "url": "https://files.pythonhosted.org/packages/8f/f1/2a1b815888fcff00f9a870b78288cb5aa4a7a305bbc315e749c6af74e692/django-realme-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "370da47f6d8a582d6df4ed3d3a28eaed", "sha256": "7c0ee352c3bd03a22fdc108cb4c2a74e46617372f12595c0fb6b7dcf6703f0bd" }, "downloads": -1, "filename": "django-realme-1.0.tar.gz", "has_sig": false, "md5_digest": "370da47f6d8a582d6df4ed3d3a28eaed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 71546, "upload_time": "2018-01-31T02:11:09", "url": "https://files.pythonhosted.org/packages/8f/f1/2a1b815888fcff00f9a870b78288cb5aa4a7a305bbc315e749c6af74e692/django-realme-1.0.tar.gz" } ] }