mlightsaml/sp-bundle
Symfony bundle that adds SAML 2.0 Service Provider support using LightSAML. Configure identity providers, enable SSO login and logout, generate and consume metadata, and integrate SAML authentication into Symfony applications through flexible bundle configuration.
Architecture fit: Misaligned with a Laravel codebase, and that is the deciding fact. mlightsaml/sp-bundle is a Symfony bundle — it ships a Bundle class, a DI extension, a configuration tree, service definitions, and HttpKernel event subscribers. Laravel's container, config repository, and HTTP lifecycle have no bridge to any of it. The reusable asset is the upstream LightSAML core (XML-DSig handling, AuthnRequest/Response models, metadata parsing), not the wrapper. From a TPM scoping standpoint: this package represents the shape of SSO work — metadata exchange, assertion validation, attribute mapping, ACS routing — which is genuinely useful for sizing an SSO epic. It is not an implementation candidate for a Laravel product.
Integration feasibility: Low. There are two paths, both builds rather than integrations. (a) Pull symfony/dependency-injection, symfony/http-kernel, symfony/config, and symfony/event-dispatcher into Laravel and hand-boot a container — large surface area, pinned to a Symfony major, unidiomatic, and a maintenance liability nobody will want to own. (b) Depend on lightsaml/core directly and write the SP — ACS/metadata/SLO routes, a guard, session state, and a validation policy. Path (b) is the only credible one, and it is still a project, not a composer require. composer require succeeding tells you nothing about whether the thing works.
Technical risk: High and asymmetric, concentrated on the authentication boundary.
Key questions:
Stack fit: Low-to-none as a direct dependency, and this should be stated plainly to stakeholders so it doesn't re-enter the evaluation matrix. There is no Laravel service provider, no adapter, no usage example, no Packagist traction. The bundle's real value to a TPM is as a specification artifact: it documents the AuthnRequest → IdP → POST ACS → validate → establish-session sequence, which is the diagram you need for scoping either an in-house build or a broker integration.
Migration path: Do not plan "adopt, then migrate." Plan to adopt a Laravel-native SP and, if a specific gap appears, port targeted logic from this bundle. If LightSAML is a hard requirement for some reason, depend on lightsaml/core directly and keep the Symfony wrapper out of the dependency graph entirely — it contributes version constraints and no runtime benefit. Route the roadmap to slab/saml2 or a hosted broker (WorkOS/Auth0/FusionAuth), and use this repo as reference only.
Compatibility: Expect friction. Symfony-major pins, psr/* ranges, and PHP constraints are unlikely to have been reconciled against a current Laravel skeleton given zero dependents. If anything is ever vendored in, validate against the real composer.lock and audit for abandoned transitive packages first. Check whether it declares replace: lightsaml/sp-bundle — if not, and anything else pulls the upstream bundle, you get duplicate service definitions and DI errors that will burn a day.
Sequencing:
NotBefore/NotOnOrAfter, wrong audience, tampered signature, XSW payloads. This gate is a release condition, not a nice-to-have.Maintenance: The dominant lifetime cost, and the reason to decline. No upstream cadence means your team absorbs IdP metadata and certificate changes, library CVEs, and every PHP/Laravel upgrade that breaks a pinned Symfony constraint. Budget a named owner explicitly — and that name is on call when login breaks. For a TPM this is the number to put in front of the deal team: not the integration cost, the forever cost.
Support: Nil. No community of scale, no vendor, no meaningful issue history, no escalation path. On an authentication path, "escalate to ourselves" is the single largest risk factor in this evaluation. Against a broker, the trade is explicit: you pay per connection and someone else carries the pager and the CVE feed.
Scaling: SAML state is small; session affinity is the trap. In-flight AuthnRequests and RelayState must survive the round trip through the IdP — store them in Redis or a signed cookie, never local file sessions, or multi-node deployments fail ACS callbacks intermittently and unreproducibly. That class of bug is expensive to diagnose and erodes trust in the feature. Cache IdP metadata and certificates with an explicit refresh; never fetch per request.
Failure modes to instrument:
NotBefore/NotOnOrAfter — enforce NTP and apply leeway deliberately, not accidentally.Ramp-up: A developer new to SAML needs real time to be productive — the bundle's documentation is thin, and Symfony idioms do not transfer to Laravel. Realistically days to weeks for a safe implementation versus hours with a maintained Laravel-native package that ships a working example. That delta is the honest cost of choosing this path, and it should sit in the epic estimate alongside the security review.
Recommendation: Do not take a production dependency on this package. Use it as a design reference at most — it's a useful teaching artifact for how SAML SP wiring looks. Select a maintained Laravel SAML SP library or a hosted broker, and fund the integration as a small, security-reviewed project with an explicit owner, an alerting plan for certificate rotation, and a documented fallback to password + MFA.
How can I help you explore Laravel packages today?