Skip to main content

SAML 2.0 IdP for Django (patched fork for Django 3.2+ compatibility)

Project description

dj-saml-idp

This project is a fork of bctiemann/dj-saml-idp,
which itself is a fork of deforestg/dj-saml-idp,
originating from the original mobify/dj-saml-idp.

The original project was created by Mobify Research & Development Inc. and is licensed under the MIT License.
This fork updates compatibility to Django 3.2+ and fixes package metadata issues.

dj-saml-idp implements the Identity Provider (IDP) side of the SAML 2.0 protocol and makes user authentication available to external applications.

This package supports Django 1.9+ through 4.1.3.

Development And Testing

The package uses a Docker container to support both development and tests. The container creates virtual environments for different Python versions as below:

  • Python 2.7 in /venv27
  • Python 3.8 in /venv38

These environments may be used for development and interactive testing.

To build and run the container, to get a bash prompt:

docker build -t dj-saml-idp:latest .
docker-compose run --service-ports test

To support use of IDEs (such as PyCharm) for development, the container can also run SSHD; run the command docker/run_sshd.sh at a bash prompt in the container. In the commands above, the --service-ports option is only needed if you intend to run sshd in the container.

The test runner is pytest. For release tests, we use tox to run the tests against different versions of Python and Django. The tests can be run inside the Docker container using tox:

$ . /venv38/bin/activate
$ tox

Release

First of all, create a new version of the package. We use bumpversion_ to handle updating all version strings, committing the changes and creating a new git tag automatically. To bump the package version use the following command with whichever part of the semantic version you'd like to update::

$ bumpversion (major|minor|patch)

for instance for a minor update, use (which should be the most common case)::

$ bumpversion minor

You need the PyPI credentials for the mobify account to be able to release a new version and the build script is expecting it defined as an environment variable:

$ export PYPI_PASSWORD=supersecretpassword

Releasing a new version to PyPI is very simple. The first thing you need to do is make sure that all the test are passing and that the version in saml2idp/__init__.py is the one that you'd like to create on PyPI.

With that done, all you need to do is run the following commands::

$ rm -rf build/ dist/ django_saml_idp.egg-info
$ make release

This will cleanup the build/ and dist/ directories, build a source package and a Python wheel. Both will then be uploaded to PyPI.

License

Distributed under the MIT License.

.. _novapost/django-saml2-idp: https://github.com/novapost/django-saml2-idp .. _MIT License: https://github.com/mobify/dj-saml-idp/blob/master/LICENSE .. _wheel: http://wheel.readthedocs.org/en/latest/ .. _bumpversion: https://github.com/peritus/bumpversion

Release History

1.0.0 (2019-11-06)

  • Refactor development and test environment
  • Support Python 3

0.22.0 (2016-05-26)

  • Allow a redirect_to parameter to be passed to the logout view to redirect the user to after succesful logout instead of showing the logout page.
  • Introduce logging through structlog and provide more informative logging out put to make SAML flows easier to debug. Log messages are all logged under the saml2idp logger now.
  • Adding a new-style processor that carries a name attribute which allows custom templates for each processor during the SSO process. Custom templates are optional and will default to the same templates as before. The change is backwards compatible and handles old-style processors as previously.

0.21.2 (2016-04-18)

  • Switched from django.utils.importlib to Python's standard importlib to work with Django 1.9.
  • Update the test setup to run tests against Django 1.9 in addition to all other versions of Django.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-saml-idp-32-1.4.1.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_saml_idp_32-1.4.1-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file django-saml-idp-32-1.4.1.tar.gz.

File metadata

  • Download URL: django-saml-idp-32-1.4.1.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.7

File hashes

Hashes for django-saml-idp-32-1.4.1.tar.gz
Algorithm Hash digest
SHA256 a007df586bdf08036d18c6edfd7e07773f523723ca748799fefcb2371c91eb0f
MD5 4ee080974f3b3210a34cb500fe739180
BLAKE2b-256 42556298cd728d84cb3c8f4502d2ed4acbb67548701e977dcff8ce22f3852253

See more details on using hashes here.

File details

Details for the file django_saml_idp_32-1.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_saml_idp_32-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f9f25bffa18478bd8077537bfbe841c50248d718c495e9c8568f466c502508d3
MD5 d501faa417f5329e4e9bc130f9ab4cb1
BLAKE2b-256 93e650d95162c4a6b57e2904ed1a3fed237a512f51ccd94b25a50a6e61a3a01f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page