Skip to main content

uniAuth is a Django SAML2 Identity Provider

Project description

Django uniAuth

CI build pypi Python version Documentation Status License

uniauth-saml2-idp is an SAML2 IDentity Provider built on top of Pysaml2 and Django. It was born as a fork of djangosaml2idp project of which very little has by now remained.

Consult the Official Documentation at readthedocs for usage specifications and advanced topics.

Alt text

SAML2 Features

  • HTTP-REDIRECT and POST bindings (signed authn request must be in HTTP-POST binding);
  • ForceAuthn;
  • SLO, SAML Single Logout;
  • Signed and Encrypted assertions;
  • AllowCreate, nameid is stored with a persistent nameid format.

Implementation specific Features

  • no restart is needed on new matadata store or SP registration;
  • Full Internazionalization support (i18n);
  • Interactive Metadata Store definitions through the Admin Backend UI;
  • Interactive ServiceProvider definition through the Admin Backend UI;
  • Customizable Template and style based on AGID guidelines;
  • MetadataStore and SP validations on save, to prevent faulty configurations in production environment;
  • Configurable digest algorithm and salt for Computed NameID;
  • Many configurable options, for every SP we can decide:
    • enable/disable explicitally;
    • signature and digest algorithms;
    • attributes release (force a set or release what requested by sp);
    • attribute rewrite and creation, fully configurable AttributeProcessors per SP, every aspect of attribute release can be customized from scratch;
    • agreement screen message, availability, data consent form.
  • Configurable log rotation through uwsgi and python logging;
  • Importable StoredPersistentID for each user, from migrations from another IDP;
  • An optional LDAP web manager with a configurable app (ldap_peoples) through django-ldap-academia-ou-manager <https://github.com/peppelinux/django-ldap-academia-ou-manager>__;
  • Multiple LDAP sources through pyMultiLDAP;
  • Multifactor Authentication support, as originally available in djangosaml2idp;
  • aacli and mdquery management command (yes, inspired by Shibboleth IdP);
  • Detailed logs.

Examples

uniAuth permit to add new metadata and register new Service Providers directly from the Admin backend interface, via Web. See Official Documentation at readthedocs for usage specifications and advanced topics.


Alt text Alt text Every Metadata store, during creation or update, will be validated to avoid faulty configurations in production environment.


Alt text Alt text Create a new SP. If SAML_DISALLOW_UNDEFINED_SP is True this configuration is mandatory, otherwise only the sp metadata is needed, the SP configuration will be created automatically using a default configuration.

Tests

pip install -r requirements-dev.txt
pytest tests/ -x --pdb

code coverage

coverage erase
coverage run -m pytest tests/
coverage report -m

A test LDAP server is available in tests/ldapd.py. You can run it manually and test a query with ldapsearch. Unit test will run ldapd.py automatically.

python3 tests/ldapd.py

ldapsearch -H ldap://localhost:3899 -b "dc=testunical,dc=it" -x uid=mario

# auth bind
ldapsearch -H ldap://localhost:3899 -b "dc=testunical,dc=it" uid=mario -D "uid=mario,ou=people,dc=testunical,dc=it" -w cimpa12

Contribute

Feel free to contribute creating separate PR from dedicated branches for each feature. Please open an Issue if you want to talk before develop, to reduce the risk to be not merged for some reason.

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

uniauth_saml2_idp-2.0.0.post1.tar.gz (68.3 kB view details)

Uploaded Source

Built Distribution

uniauth_saml2_idp-2.0.0.post1-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

Details for the file uniauth_saml2_idp-2.0.0.post1.tar.gz.

File metadata

  • Download URL: uniauth_saml2_idp-2.0.0.post1.tar.gz
  • Upload date:
  • Size: 68.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for uniauth_saml2_idp-2.0.0.post1.tar.gz
Algorithm Hash digest
SHA256 34173da6218c01bcd43a6cda025cfd35208d036fa33d04b22387a2ff4ae0fd9a
MD5 5e5de221ff4ded54a2935b8fca6614a1
BLAKE2b-256 160d21f98bc84863407cbc9a10ca996775531c44377e59488a257070b25ff9d9

See more details on using hashes here.

File details

Details for the file uniauth_saml2_idp-2.0.0.post1-py3-none-any.whl.

File metadata

  • Download URL: uniauth_saml2_idp-2.0.0.post1-py3-none-any.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for uniauth_saml2_idp-2.0.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 84952ac3b8d09a83587db059ed7590891431569798a1bdf0cfd00d4410409c6c
MD5 b16e87a947daaa95b78dbcade1a5950a
BLAKE2b-256 8743548a566ca1862cc4cf437f5e79ba935fc8e16da7068492f36a257fbf9b15

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