When you need SAML 2.0 single sign-on for your organization, relying on a cloud identity provider isn’t always an option. Compliance requirements, data sovereignty, air-gapped networks, or cost constraints push many teams to run their own SAML Identity Provider (IdP). This guide compares the three most established open-source SAML IdP solutions: SimpleSAMLphp, Shibboleth IdP, and Apereo CAS.
If you are evaluating broader SSO protocols (OIDC, OAuth2) alongside SAML, see our guides on lightweight SSO platforms and self-hosted IAM solutions.
Why Self-Host a SAML Identity Provider
SAML 2.0 remains the standard for enterprise and academic single sign-on. Thousands of applications — from learning management systems and research portals to ERP platforms and HR tools — support SAML as their primary SSO protocol. Self-hosting a SAML IdP gives you:
- Full control over identity data — no third-party holds your user directory
- Air-gapped deployment — works in environments with no internet access
- Custom attribute mapping — define exactly what claims each service provider receives
- Cost savings — no per-user monthly fees for large organizations
- Compliance — keep authentication logs and user data within your infrastructure
- No vendor lock-in — switch or upgrade providers without migrating users
The three solutions compared here represent different design philosophies: SimpleSAMLphp (lightweight and PHP-based), Shibboleth IdP (the academic standard), and Apereo CAS (a multi-protocol enterprise platform).
| Feature | SimpleSAMLphp | Shibboleth IdP v5 | Apereo CAS v7 |
|---|---|---|---|
| Language | PHP | Java | Java |
| License | LGPL 2.1 | Apache 2.0 | Apache 2.0 |
| GitHub Stars | 1,136 | N/A (shibboleth.net) | 11,322 |
| Last Updated | 2026-04-21 | Active development | 2026-04-26 |
| SAML 2.0 IdP | ✅ Full | ✅ Full | ✅ Full |
| SAML 2.0 SP | ✅ Full | ❌ No | ❌ No |
| OIDC Provider | ❌ No | ❌ No | ✅ Full |
| OAuth2 Provider | ❌ No | ❌ No | ✅ Full |
| CAS Protocol | ❌ No | ❌ No | ✅ Full (native) |
| LDAP Integration | ✅ Auth source + attribute store | ✅ Auth source + attribute resolver | ✅ Auth source + attribute repository |
| Database Auth | ✅ SQL modules | Via JDBC attribute resolver | ✅ JDBC, Mongo, REST |
| MFA Support | Via external modules | Built-in (Duo, MFA) | Built-in (Duo, YubiKey, WebAuthn) |
| Web UI | ✅ Admin + user-facing | ❌ Command-line config | ✅ Comprehensive dashboard |
| Docker Support | Official image available | Community images | Official Docker image |
| Setup Complexity | Low | High | Medium-High |
| Best For | Small teams, quick SAML setup | Universities, research federations | Enterprise, multi-protocol SSO |
SimpleSAMLphp — Lightweight PHP SAML IdP
SimpleSAMLphp is the most approachable self-hosted SAML solution. Written in native PHP, it handles both IdP and SP roles and integrates with virtually any authentication backend (LDAP, SQL, external APIs). Its configuration is file-based, making it easy to version control and deploy.
Key strengths:
- Quick setup — get a working SAML IdP in under 30 minutes
- Dual role — works as both IdP (issuing assertions) and SP (consuming assertions)
- PHP ecosystem — easy to extend with custom authentication modules
- Federated identity — supports SAML metadata aggregation for federation participation
- Tested in production — used by universities and enterprises worldwide
Docker Deployment
| |
For a production deployment without the test image, use the official package:
| |
Basic Configuration
| |
Shibboleth IdP v5 — The Academic Standard
Shibboleth IdP has been the backbone of academic federations (InCommon, eduGAIN, REFEDS) for over two decades. Version 5 introduced significant modernization: improved container support, a new configuration framework, and better attribute handling.
Key strengths:
- Federation-ready — natively designed for large-scale federation participation
- Attribute resolution — powerful data connector system for complex attribute mapping
- Mature security model — battle-tested in thousands of universities
- Active development — strong community and institutional backing
- Standards compliance — strict adherence to SAML 2.0 and federation profiles
Installation (Traditional)
Shibboleth IdP is typically installed from source or packages:
| |
Docker Deployment (Community)
| |
Attribute Resolver Configuration
| |
Apereo CAS v7 — Multi-Protocol Enterprise SSO
Apereo CAS (Central Authentication Service) is the most feature-rich option. While originally designed around its own CAS protocol, modern versions (v6+) provide full SAML 2.0 IdP capabilities alongside OIDC, OAuth2, and its native protocol. It supports dozens of authentication methods and integrates with virtually every identity store.
Key strengths:
- Multi-protocol — SAML 2.0, OIDC, OAuth2, CAS, WS-Federation from one platform
- Extensible — modular overlay architecture for custom extensions
- Rich authentication — built-in MFA, adaptive authentication, password management
- Service registry — dynamic service registration with YAML, JSON, JDBC, or REST backends
- Active community — 11,000+ GitHub stars, large contributor base
Docker Deployment
| |
Service Registry Configuration
| |
Authentication Handler Setup
| |
Comparison: Which SAML IdP to Choose
| Criteria | SimpleSAMLphp | Shibboleth IdP | Apereo CAS |
|---|---|---|---|
| Time to deploy | Minutes | Hours | 1-2 hours |
| SAML-only focus | ✅ Yes | ✅ Yes | ❌ Multi-protocol |
| Needs both IdP + SP | ✅ Yes | ❌ IdP only | ❌ IdP only |
| Federation participation | Good | Excellent | Good |
| Academic/research use | Good | Excellent | Good |
| Enterprise SSO | Limited | Good | Excellent |
| Needs OIDC too | ❌ No | ❌ No | ✅ Yes |
| PHP environment | ✅ Native | ❌ Java only | ❌ Java only |
| Configuration method | PHP files | XML config | Properties + YAML |
| Attribute mapping | Simple | Advanced | Very advanced |
| Community support | Active | Strong (academic) | Very active |
| Container-friendly | ✅ Yes | ⚠️ Community images | ✅ Official images |
When to Choose SimpleSAMLphp
- You need a quick SAML IdP up and running with minimal infrastructure
- Your team is comfortable with PHP
- You need both IdP and SP functionality in one package
- You are setting up SSO for a handful of applications
- You prefer file-based configuration that is easy to version control
When to Choose Shibboleth IdP
- Your organization participates in academic federations (InCommon, eduGAIN)
- You need strict SAML 2.0 compliance with federation profile support
- Your IT team has Java expertise
- You require complex attribute resolution from multiple data sources
- Long-term institutional support and standards compliance are priorities
When to Choose Apereo CAS
- You need SAML and OIDC/OAuth2 from a single platform
- You want a unified SSO solution for dozens or hundreds of applications
- You need built-in MFA, password management, and self-service features
- Your team works with Spring Boot and Java ecosystems
- You want the most actively developed and feature-rich open-source option
Security Considerations for Self-Hosted SAML IdPs
Regardless of which solution you choose, follow these security best practices:
- Certificate management — use short-lived certificates for signing and encryption. Automate rotation with tools like cert-manager.
- Transport encryption — always serve the IdP over HTTPS with strong TLS settings. Consider mutual TLS for high-security deployments, as covered in our mTLS guide.
- Metadata validation — validate SP metadata signatures before accepting connections. Never accept unsigned metadata in production.
- Attribute filtering — only release attributes that each SP explicitly needs. Apply allowlist-based attribute release policies.
- Rate limiting — protect login endpoints against brute-force attacks. Use reverse proxy rate limiting or built-in controls.
- Audit logging — log all authentication attempts, attribute releases, and configuration changes. Store logs in a tamper-evident system for compliance.
FAQ
What is a SAML Identity Provider (IdP)?
A SAML Identity Provider is a server that authenticates users and issues SAML assertions to Service Providers (SPs). When a user tries to access a SAML-protected application, the SP redirects them to the IdP for authentication. After successful login, the IdP sends a signed XML assertion back to the SP, which grants access. This is the foundation of enterprise single sign-on.
Can SimpleSAMLphp act as both IdP and SP?
Yes. SimpleSAMLphp uniquely supports both roles in a single installation. It can authenticate users and issue assertions (IdP mode) and also consume assertions from other IdPs (SP mode). This makes it ideal for proxy scenarios or testing environments. Shibboleth IdP and Apereo CAS only function as IdPs.
Is Shibboleth IdP still actively maintained?
Yes. Shibboleth IdP v5 was released in 2024 with significant improvements including better container support, a new configuration framework, and enhanced security features. It remains the standard choice for academic federations worldwide and receives regular security updates from the Shibboleth Consortium.
How does Apereo CAS compare to Keycloak for SAML?
Both support SAML 2.0, but with different focus areas. Apereo CAS was extended to support SAML as one of many protocols (alongside CAS, OIDC, OAuth2). Keycloak supports SAML natively but is primarily an OIDC/OAuth2 platform. CAS has deeper SAML attribute mapping and federation support, while Keycloak offers a more polished admin UI and broader protocol coverage. For SAML-heavy environments, CAS is the stronger choice.
Do I need a reverse proxy for my SAML IdP?
Yes, in production. A reverse proxy handles TLS termination, load balancing, and rate limiting before traffic reaches your IdP. Nginx, Caddy, or Traefik are common choices. Configure the proxy to forward /simplesaml/ (SimpleSAMLphp), /idp/ (Shibboleth), or /cas/ (Apereo CAS) paths to the IdP backend.
Can I migrate from one SAML IdP to another?
Yes, but plan carefully. The migration involves:
- Exporting SP metadata from the old IdP and importing into the new one
- Reconfiguring each SP to trust the new IdP’s entityID and certificate
- Mapping user attributes between the two systems
- Testing with a subset of SPs before full cutover
- Running both IdPs in parallel during transition if possible
How do I handle SAML metadata in a federation?
Participating federations (InCommon, eduGAIN) publish aggregated metadata files containing all member IdPs and SPs. Your IdP downloads and validates this metadata regularly. SimpleSAMLphp uses the metarefresh module. Shibboleth IdP uses the MetadataProvider configuration. Apereo CAS supports metadata ingestion via its SAML IdP module. Always validate metadata signatures to prevent spoofing.