lightsaml2/symfony-bridge
Symfony bridge for LightSAML2 that integrates SAML 2.0 service provider and identity provider support into Symfony apps, with bundle configuration, security firewall integration, and endpoints for authentication requests, responses, metadata, and single logout.
Architecture fit — the framing is wrong by one framework. lightsaml2/symfony-bridge is a Symfony bundle, not a Laravel package. Its entire value is the bridge layer: LightSAML's SAML 2.0 service layer wired into Symfony's Security component, kernel/bundle registration, and DI container compiler passes to produce firewall listeners and an SamlProvider-style token flow. Laravel consumes selected Symfony components (HttpFoundation, Routing, Console) but has no bundle system, no SecurityBundle, and no firewall-listener seam. The part that would make this package worth installing is precisely the part that does not transfer into a Laravel application. A TPM should treat this as reference architecture for a spike, not a candidate dependency.
Integration feasibility. Low for the bundle; moderate if scope is narrowed to the underlying lightsaml/lightsaml core. A realistic Laravel path discards the bundle and hand-builds four things against the core library: an SP metadata endpoint, an ACS (assertion consumer service) controller, a custom auth guard with a UserProvider, and a JIT provisioning listener. That is roughly a 2–4 week build for an engineer already fluent in SAML — and it means the package under evaluation contributes essentially nothing to the shipped design. That asymmetry is the core finding to report upward.
Technical risk. High and asymmetric, because SAML fails silently. The failure mode of a broken integration is not a stack trace; it is an authentication bypass that looks like a successful login. Specific exposure to price in: XML Signature Wrapping (XSW), XML canonicalization edge cases, XXE in assertion parsing, assertion replay outside a cached-ID window, clock-skew tolerance, encrypted-assertion support, and IdP certificate/metadata rotation. A thin wrapper over a low-activity core library means inheriting that full attack surface with no upstream security response — and the adoption signals here are a null result (1 star, 0 dependents, composite score 0.005). For a package whose job is verifying cryptographic assertions, "nobody has looked at this" is disqualifying on its own, not merely a yellow flag.
Key questions to resolve before any build commitment.
lightsaml2 fork actively maintained, or a namespace continuation of an abandoned original? Commit cadence, last release date, Packagist publication, PHP 8.2/8.3 constraints?Stack fit. Poor as packaged; useful only as a source of patterns. Laravel's auth stack wants a Guard/UserProvider pair; this bundle supplies Symfony firewall listeners. Do not attempt to port the bundle. Instead extract the two or three things it demonstrates well — metadata XML generation, AuthnRequest construction, and the orchestration of response validation — and re-express them as a Laravel service provider plus a route group (/saml/metadata, /saml/acs, /saml/sls) and a custom guard. Cite the bundle in the design doc as prior art; do not add it to composer.json.
Migration path, in preference order. (1) Buy/managed: delegate to a managed IdP broker and integrate via Socialite, or use a maintained Laravel SAML package (24slides/laravel-saml2, itself a wrapper over onelogin/php-saml), which has materially better maintenance signals and a large enough installed base to have absorbed security review. (2) Build on a maintained core: onelogin/php-saml or SimpleSAMLphp behind a Laravel guard. (3) LightSAML core — distant third, chosen only if a specific capability (e.g. its XMLSec signing layer) is a hard requirement. Any migration from existing session-based login must be additive: run SAML as an additional guard alongside the current one, feature-flag per tenant, prove it with a design-partner customer, then promote to primary.
Compatibility. Unverified and likely the practical blocker. Expect constraints resolving against Symfony 5.x/6.0-era APIs and PHP 8.0/8.1, which will conflict with a Laravel 11/12 on PHP 8.3 target. Make the first task a 30-minute composer require --dry-run in a scratch branch, before any design work; also verify PSR-4 autoloading and whether the bundle references Symfony\Component\Security\Core\Authentication\Token\* classes removed in Symfony 6.
Sequencing.
composer.json; confirm Packagist availability, PHP constraint, last release. This alone likely ends the evaluation and saves the sprint.Maintenance — the dominant cost and the reason to decline. There is no realistic expectation of upstream fixes; 0 dependents means no community pressure and nobody else hitting, reporting, or patching the same bugs. Adopting this package converts the team into maintainers of a private fork of a security-critical SAML bridge. Budget roughly 15–25% of one senior engineer's capacity in perpetuity for dependency drift, PHP/Symfony upgrades, and CVE triage on transitive XML and crypto libraries. That is a bad trade for a commodity capability, and it should be stated in those terms in any build-vs-buy memo.
Support. None. MIT license, no vendor, no SLA, no security contact, no disclosure process. For an auth path this matters more than for a utility library: when a signature-validation bug is disclosed, you need a patch inside days, not a fork you triage yourself. The escalation path in an incident is "our own engineer reads the SAML specification." Name that person in advance.
Scaling. Protocol-level scaling is a non-issue — an SP is stateless per request and assertion validation costs one or two RSA verifies per login; login volume is a rounding error beside normal API traffic. The real constraints are operational: multi-tenant metadata and certificate storage, a shared replay/assertion-ID cache (Redis) that must be consistent across nodes, and SLO session state, which is genuinely hard in a horizontally scaled multi-region deployment. Decide sticky-vs-shared session state before enabling SLO, not after.
Failure modes to enumerate in the runbook. IdP outage (login unavailable — is there a documented break-glass local-admin path, tested?); signing certificate rotation at the IdP without a metadata refresh (total login failure, usually discovered by users first); clock skew beyond the acceptance window (intermittent, region-dependent, painful to diagnose); XSW or replay acceptance (silent, worst case); ACS behind a proxy that rewrites POST bodies or strips RelayState; metadata endpoint caching causing stale config after an IdP change. Each needs an owner and a detection signal — and most need alerting on ACS error rate rather than waiting for support tickets.
Ramp-up. Assume 1–2 weeks before an engineer is productive, because SAML debugging requires fluency in base64/XML inspection, certificate chains, and IdP-side trace logs — plus the specific archaeology of an unmaintained codebase with no issue history to learn from. Capture that knowledge in the runbook as the spike proceeds; it is the only durable asset this evaluation produces, and it transfers intact to whichever maintained library or managed broker is ultimately chosen.
How can I help you explore Laravel packages today?