djangosaml2idp2
SAML 2.0 Identity Provider for Django
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires xmlsec binary (XML Security Library) to be installed on the system; the package will not function for signing SAML assertions without it.
- 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.
License · maintenance · safety
Apache Software License 2.0 (permissive) — Licensed under Apache Software License 2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for production deployments.
last release 2026-03-09 (158 days) · last repo commit 2026-07-30
0 known vulnerabilities (OSV.dev, 2026-08-14) · 83,976 downloads/mo, #14,037 on PyPI
Alternatives
Verify before relying
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.- 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.
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 on this page. Verify before relying on it.
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
djangosaml2idp2 on PyPI
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.
Requires xmlsec binary (XML Security Library) to be installed on the system; the package will not function for signing SAML assertions without it.
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.
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 the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesdjangopysaml2pytzarrow |
| Maintenance | Actively maintained 158 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 83,976 / month, #14,037 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Internet :: WWW/HTTP :: WSGITopic :: SecurityTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python Modules |
Evidence: djangosaml2idp2-0.9.1-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sso federated authentication”
- djangosaml2idp2Implements the SAML 2.0 Identity Provider side for Django…
- djangosaml2Integrates SAML2 single sign-on authentication into Django…
- pysaml2PySAML2 is a pure Python implementation of SAML Version 2 Standard…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also djangosaml2 · grafana-django-saml2-auth · pysaml2 · python3-saml · social-auth-app-django · django-allauth · descope · django-oidc-provider · django-auth-adfs · types-pysaml2