overtrue/laravel-saml
A Laravel package for SAML 2.0 single sign-on. It provides configurable identity provider settings, login/logout routes, and a straightforward integration for adding SSO authentication to Laravel applications.
Architecture fit. overtrue/laravel-saml is a thin Laravel service-provider wrapper around php-saml/xmlseclibs-style SAML tooling: it publishes config, registers routes/middleware, and maps IdP/SP settings into the framework's container. That is the right shape for a Laravel app acting as a SAML Service Provider — it keeps SAML policy in config, keeps HTTP handling in middleware, and does not impose a persistence or user-model decision. 2.0.0 is a platform-floor release, not a feature release: it requires PHP 8.3+ and Laravel 13.x and otherwise explicitly preserves SAML APIs, config keys, security defaults, validation policy, and logout response behavior. Treat this as a compatibility gate rather than a capability upgrade.
Integration feasibility. Low-to-moderate effort, but hard-gated. The only breaking change is the runtime floor, so the work is not code adaptation — it is proving your stack meets PHP 8.3 / Laravel 13 and then re-validating against a real IdP. The two substantive fixes reduce operational friction: explicit IdP settings no longer incorrectly invoke the configuration resolver (relevant to multi-tenant or per-environment IdP configs), and PHP Error/TypeError from SAML processing is now preserved instead of being masked by a secondary TypeError in AssertException. That second fix matters for incident diagnosis: previously, a real failure could surface as a misleading type error in logs and alerting.
Technical risk.
Key questions.
AssertException/TypeError behavior — i.e., would the error-preservation fix change our alert signatures or error dashboards?Stack fit. Well-matched for a Laravel monolith or a small number of Laravel services that need SP-initiated SSO. It is a poorer fit for polyglot estates that need one SAML strategy across PHP, Node, and Java services — there, a gateway/broker (e.g. an IdP-side proxy or a shared OIDC front door) is the better long-term architecture, with this package as a downstream consumer.
Migration path.
overtrue/laravel-saml, and record its PHP and Laravel version, its IdP, and whether it uses SLS and explicit IdP settings.^1.0 explicitly in composer.json so a routine composer update cannot attempt 2.0.0.Compatibility. The upgrade is one-way for the version constraint but reversible at the dependency level: the package preserves config keys, APIs, and security defaults, so a rollback to 1.x should not require config changes. Keep the rollback path validated (lockfile revert plus a tested deploy) rather than assumed.
Sequencing.
Maintenance. Low ongoing effort — the package is config-driven and the API surface is stable across the major version. The real maintenance load is adjacent: IdP metadata and signing certificate rotation, which is a scheduled operational task regardless of package version. Budget for a periodic dependency review; the project keeps Composer security-advisory blocking and strict validation enabled, which is a good signal for routine patching.
Support. The maintainers provide an upgrade guide and a clear statement of what is and is not tested. Expect to be largely self-sufficient for IdP-specific problems — attribute mapping, nameid format, clock skew, and SLO quirks are your integration to own, and vendor support for this package should not be assumed for those classes of issue.
Scaling. Authentication volume is rarely the bottleneck here; SAML assertion validation is CPU-bound but cheap at typical login rates, and session state lives in Laravel, not the package. The scaling concerns are organizational: one IdP config per tenant multiplies certificate-rotation work, and a single shared SP entity ID across environments is a common misconfiguration that causes cross-environment assertion confusion. Multi-tenant deployments should get dedicated config and explicit isolation tests.
Failure modes.
TypeErrors and plan triage accordingly.Ramp-up. A Laravel developer can integrate this in well under a day using the published config. The genuine ramp-up is SAML literacy: assertion validation rules, signing vs. encryption, SP- vs. IdP-initiated flows, and certificate rotation. Assign one owner for the SAML integration surface, write a runbook covering certificate rotation and login-failure triage, and require a live-IdP smoke test as part of any release that touches auth — the automated suite alone is not sufficient evidence for a production auth change.
How can I help you explore Laravel packages today?