Skip to main content

Django app for managing multiple SAML Identity Providers.

Project description

Django Simple SAML

Django app to manage SAML Identity Providers

Version support

This app support Django 3.2+ and Python 3.8+.

Background

This library builds on top of social-auth-app-django and python3-saml, which together handle the heavy lifting of a SAML authentication flow. It assumes that you are building a service that will act as the Service Provider (SP) in the flow, and that you will be integrating with a number of external Identity Providers (IdP) for user authentication.

The core change to those libraries that this package adds is a new SAMLAuth backend called SimpleSAMLAuth that reads in IdP data from a model (i.e. the database) rather than using the settings config dict SOCIAL_AUTH_SAML_ENABLED_IDPS.

The reason for this is to make it easy to update / test new IdPs on a live environment without having to deploy. If you are running a platform that offers SSO to clients as a feature, having to embed their IdP details in the settings (which also requires a redeployment) isn't a practical option.

The IdP data is input via the Django admin site.

Settings

This package relies on the existing python-social-auth settings. See their documentation for details, or refer to the demo.settings.base module for an example.

Configuration

Click this button to deploy to Heroku:

Deploy

You must supply three SAML settings that should be available from your test IdP provider. If you have a Google Workspace account, that can be used - see https://admin.google.com/ac/security/ssocert for details.

Local install & setup

If you are having problems installing xmlsec locally, try this: https://github.com/xmlsec/python-xmlsec/issues/254

DISCLAIMER

The demo app demonstrate SSO using SAML2.0, which means it's destined (but not designed) to be used in security-conscious enterprise environments. It is a demonstration only - it should NOT BE TRUSTED, and you do so at YOUR OWN RISK.

Do not deploy the demo into a secure environment, and do not connect it to a real IdP.

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_simple_saml-0.2.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

django_simple_saml-0.2.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file django_simple_saml-0.2.0.tar.gz.

File metadata

  • Download URL: django_simple_saml-0.2.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.10 Darwin/23.1.0

File hashes

Hashes for django_simple_saml-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0c6498404169756c91604c7520c4c482bcadca692ec3897fe8de5ff5847fa96b
MD5 7d1ecc7fe0cd3f0ba15210a8f1205836
BLAKE2b-256 25f0733055dda16c9fe6d85545a1d1e1c64314677325804dafd9521a3d0c0150

See more details on using hashes here.

File details

Details for the file django_simple_saml-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_simple_saml-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d7718267c37101e81b20f544d9689981cbe668cddc24ab8986a3c84c37fc1cc
MD5 76482d112c59868d2bd86b5eccd42cfb
BLAKE2b-256 588e2eca8379f86e750da3d31509f0136ab885f11e5c72510bbda45af56f987d

See more details on using hashes here.

Supported by

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