--- id: djangosaml2idp2 version: "0.9.1" license: Apache Software License 2.0 license_treatment: permissive maintenance: active --- # djangosaml2idp2 — SAML 2.0 Identity Provider for Django License: permissive · Maintenance: active · Downloads: 84.0K/mo ## What it is and what it does djangosaml2idp2 is a Django application that implements the Identity Provider (IdP) side of the SAML 2.0 protocol, enabling your Django application to act as a federated authentication server. It builds on PySAML2 and handles the cryptographic signing and encryption of SAML assertions, metadata generation, and single sign-on flows. You configure it by adding it to Django's installed apps, including its URL routes, and then defining your IdP configuration (certificates, endpoints, signing algorithms) and registering Service Providers through the Django admin interface. The package is production-ready and supports modern Django versions and Python 3.9 and later. It requires the xmlsec binary to be installed separately on your system for SAML assertion signing. Configuration is done via Django settings and the admin interface, with hooks for custom access control logic via processor classes and customizable attribute mapping between Django user fields and SAML assertions. Use it for: - Build a corporate SSO server where multiple web applications authenticate users against a central Django-based IdP. - Integrate Django with federated identity systems by acting as an IdP for SAML 2.0 service providers. - Implement custom access control logic per service provider using processor subclasses to enforce fine-grained authentication rules. - Map Django user attributes to SAML fields for seamless user provisioning across federated applications. - Support multiple authentication algorithms and encryption standards by configuring signing and digest algorithms per service provider. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements the SAML 2.0 Identity Provider side for Django applications, enabling federated authentication and single sign-on (SSO) by building on PySAML2. Yes. This is a production-ready, actively maintained SAML 2.0 IdP implementation for Django with low install friction, permissive licensing, no known vulnerabilities, and support for current Django and Python versions. Install it if you need to operate a federated authentication server. The main prerequisite is having xmlsec available on your system. ## Install pip install djangosaml2idp2 uv add djangosaml2idp2 poetry add djangosaml2idp2 ## Installing djangosaml2idp2 Before you install: Low install friction with a pure-Python wheel distribution. Active maintenance with recent commits and support for current Django versions (4.2, 5.1, 5.2) and Python 3.9–3.13. Requires xmlsec binary (XML Security Library) to be installed separately on the system for SAML assertion signing. License in practice: Licensed under Apache Software License 2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for production deployments. Quickstart: pip install djangosaml2idp2 # In Django settings.py: INSTALLED_APPS = [ 'djangosaml2idp', ... ] # In urls.py: urlpatterns = [ path('idp/', include('djangosaml2idp.urls')), ] # Configure SAML_IDP_CONFIG with xmlsec_binary path, certificates, and service endpoints. Requires xmlsec binary (XML Security Library) to be installed on the system; the package will not function for signing SAML assertions without it. Verify before relying: - Whether the fork actively maintains compatibility with the original OTA-Insight/djangosaml2idp or diverges significantly. - Performance characteristics under high-volume SSO traffic or with many service providers configured. - Completeness of documentation and examples beyond the excerpt provided. ## Package facts - License: Apache Software License 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 84.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags saml2 identity provider django, sso federated authentication, django saml idp, saml2 service provider integration, django authentication federation, saml2-idp, federated-auth, sso [View on SkillFed](https://skillfed.io/packages/djangosaml2idp2) · [View on PyPI](https://pypi.org/project/djangosaml2idp2/)