Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sp Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Upstream LightSAML is effectively unmaintained (PHP 7 era). Signature validation is the security-critical surface for SAML — XML Signature Wrapping, XXE/DTD handling, and stale transitive dependencies are live exposure here.
  • Single maintainer, 0 stars, 0 dependents, no security review, no disclosure process, no CVE response. On auth, "no upstream cadence" means your team is the CVE process.
  • The bundle's config contract is Symfony-shaped and is lost in any port, so your team owns reimplementing the semantics from scratch anyway.
  • Failure is binary: a defect is an outage or an auth bypass, not a cosmetic bug. That changes how you price the work and who signs off.

Key questions:

  • Is SAML 2.0 genuinely mandated by the IdP, or would OIDC satisfy the buyer with a far more mature Laravel ecosystem? This is the cheapest possible resolution and should be asked before any code.
  • Which flows are in scope — SP-initiated only, or IdP-initiated and Single Logout too? IdP-initiated with assertion-only validation is where XSW risk concentrates, and SLO is where most "we support SAML" claims quietly fail.
  • Does the IdP require encrypted assertions, signed metadata, or specific bindings (HTTP-POST vs Redirect)?
  • Who is the named owner of the SP after launch, and what's the certificate-rotation review cadence? If there's no name, there's no plan.
  • Do compliance obligations (SOC 2, ISO 27001, HIPAA) require a dependency with an active disclosure process and an SLA? For most mid-market/enterprise buyers, yes.
  • Which Symfony/LightSAML versions does the fork track, and has it been exercised on PHP 8.2/8.3?

Integration Approach

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:

  1. Reframe the decision up front: this is a build-vs-buy call for enterprise SSO, not a package selection. Get the buyer's actual requirement (one IdP vs a certification matrix, SSO vs SCIM) in writing.
  2. Time-boxed spike against a test IdP (SimpleSAMLphp or a vendor sandbox) in a throwaway branch. Goal is evidence for the build-vs-buy call, not a prototype.
  3. Make that call on spike results, not on README claims.
  4. Implement ACS and metadata endpoints behind a feature flag, running parallel to existing auth.
  5. Security-focused test suite gate: replayed assertions, expired NotBefore/NotOnOrAfter, wrong audience, tampered signature, XSW payloads. This gate is a release condition, not a nice-to-have.
  6. Cut over per tenant, keeping the legacy password+MFA path warm for one full release cycle as the rollback.

Operational Impact

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:

  • Rotated or expired IdP signing certificate — the most common real-world SSO outage. Alert on validation failures, not just 5xx.
  • Clock skew invalidating NotBefore/NotOnOrAfter — enforce NTP and apply leeway deliberately, not accidentally.
  • ACS URL drift after deploy (load balancer rewriting scheme/host) — assert the configured ACS URL at boot so it fails loudly rather than at login.
  • Hostile XML on an unauthenticated endpoint — cap request size, disable DTDs and external entities, rate-limit ACS.
  • Silent partial failure: user authenticates at the IdP, SP rejects, and you see only 403s with no login telemetry. Log rejection reasons, not just status codes, or you will have no way to tell a bad cert from a bad audience from a malformed assertion.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource