Skip to main content

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 when add a new metadata or Service Provider Definition;
  • 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.

Metadata

Release files for uniauth-saml2-idp 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uniauth-saml2-idp 2.0.1
File Size Uploaded
uniauth_saml2_idp-2.0.1.tar.gz 68.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uniauth-saml2-idp 2.0.1
File Interpreter ABI Platform
uniauth_saml2_idp-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 110.9 kB

Release files / uniauth_saml2_idp-2.0.1.tar.gz

Download URL uniauth_saml2_idp-2.0.1.tar.gz
Size 68.3 kB
Tags Source
SHA-256 checksum
How to use checksums
94e738da3c3456e6ee584b2a2f2019ae7adb641d9475842e33c77ddc43e5f304
BLAKE2b-256 checksum
How to use checksums
795c34078a03e4aa1b7607b59ca0f13cff19b288271f58882457ecdc85e5496c
Upload date
Uploaded using Trusted Publishing?
What is 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.10

Release files / uniauth_saml2_idp-2.0.1-py3-none-any.whl

Download URL uniauth_saml2_idp-2.0.1-py3-none-any.whl
Size 42.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61459dc46ef4be6d2036f7432943e1d56bb1e638a8b9282ff5511bc336f853d1
BLAKE2b-256 checksum
How to use checksums
abaca9bf1453e39da4774452a1a8dace24e21b5b2bacf2d9bec9e4206e896d06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page