lightsaml2/sp-bundle
Symfony bundle integrating LightSAML so your application acts as a SAML 2.0 service provider. Provides DI services, configuration, and routing to handle authn requests, assertions, and metadata exchange with identity providers.
lightsaml2/sp-bundle is a Symfony Bundle built on Symfony's kernel, DI container, event dispatcher, and config tree. On a Laravel codebase the honest read is that the bundle is not adoptable — but the underlying lightsaml/lightsaml core is framework-agnostic and is the reusable asset. The PM decision becomes: do we fund wrapping LightSAML in a Laravel-native service provider, or buy?Consider the LightSAML core, and treat the bundle only as a reference implementation, when:
lightsaml/lightsaml directly.xmlseclibs-class libraries) for CVEs, because no one in this repo is watching them for you.services.yml and Configuration.php as a blueprint for the ~200 lines of service graph a Laravel service provider would need.Look elsewhere when:
composer requireing the bundle pulls Symfony kernel components into an Illuminate app and will expect a Symfony kernel to boot. Evaluate Laravel-native SAML packages (aacotroneo/laravel-saml2, 24slides/laravel-saml2, which wrap OneLogin's toolkit) or the LightSAML core wrapped yourself — and expect to write the glue either way.To executives: Enterprise SSO is a recurring blocker on mid-market and enterprise deals, appearing as a hard requirement in security reviews. It's a solved problem with two viable paths — assemble an open-source SAML library or buy a managed identity broker. The candidate here is MIT-licensed and technically credible at the protocol layer, but it is a Symfony component with essentially zero public adoption. On our Laravel stack the honest framing is: this is a technical reference, not a dependency. Recommendation: timebox a two-week spike behind a feature flag, reimplement the SAML flow in a Laravel-native service provider against the LightSAML core (or benchmark against laravel-saml2), and hold a managed-broker quote as the fallback so the roadmap date doesn't move if the OSS path disappoints.
To engineering: The valuable part is LightSAML's standards-compliant assertion parsing and signing — the expensive, security-critical surface. This bundle is thin Symfony plumbing around that core, and that plumbing does not port into Laravel. Use the bundle's Configuration.php and services.yml as a wiring blueprint, then build the SP flow with Laravel idioms: a service provider, config/saml.php, /saml/metadata, /saml/acs, /saml/login routes, and a controller that calls Auth::login() and regenerates the session. Expect to hand-wire the service graph, store the SP private key and IdP certificate in env/secret storage (never committed), and dispatch a Laravel event from the ACS for audit logging and user provisioning. Treat the SAML path as security-critical: pin dependencies, review XML signature validation against wrapping attacks, and plan per-tenant certificate and metadata rotation from day one. Effort is measured in engineering weeks, not days; the ongoing cost is dependency hygiene plus an on-call story for auth outages — and note that at 1 star and 0 dependents, there is no community to lean on when SSO breaks.
How can I help you explore Laravel packages today?