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

Laravel Saml Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Hard version cliff. Applications on Laravel 9–12 cannot take 2.0.0 and must remain on 1.x. Anyone who pulls 2.0.0 into a Laravel 12 app gets a Composer platform conflict at best, or a broken deploy pipeline if constraint resolution is loose.
  • Auth-path blast radius. SAML is on the login and logout critical path. A misconfiguration locks all users out; there is no partial-degradation mode.
  • Test coverage is improved but still not an IdP matrix. 26 tests / 100 assertions across PHP 8.3/8.4/8.5, including signed-response acceptance, unsigned/tampered rejection, and request-ID mismatch rejection, is a meaningful step up from a placeholder test. But the maintainers state explicitly that no live identity-provider integration test was performed. Signed-response acceptance against your specific IdP, assertion attribute mapping, clock skew, and SLO behavior are unverified for your environment.
  • Maintainer concentration. Single-maintainer package on the authentication path implies supply-chain and bus-factor exposure that should be acknowledged regardless of release quality.

Key questions.

  1. Is Laravel 13 in our upgrade roadmap and on what date? If not, 2.0.0 is not adoptable and the real question becomes 1.x patch cadence.
  2. Do we run more than one IdP (multi-tenant, staff vs. customer, per-region)? That determines how much the resolver fix matters to us and how large the test matrix is.
  3. Which environments run PHP 8.2 or below, and what blocks them from 8.3?
  4. Does any of our code or log-parsing depend on the current AssertException/TypeError behavior — i.e., would the error-preservation fix change our alert signatures or error dashboards?
  5. Who owns IdP certificate rotation and metadata refresh, and does our on-call runbook cover SAML failures?
  6. Is 1.x still receiving security fixes, and for how long? That determines the cost of deferring.
  7. Do we use single logout (SLS)? 2.0.0 says logout response behavior is preserved, but that is exactly the path least covered by automated tests.

Integration Approach

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.

  • Inventory every application requiring overtrue/laravel-saml, and record its PHP and Laravel version, its IdP, and whether it uses SLS and explicit IdP settings.
  • Split the inventory into ready (PHP 8.3+ / Laravel 13) and blocked (Laravel 9–12). Pin blocked apps to ^1.0 explicitly in composer.json so a routine composer update cannot attempt 2.0.0.
  • For ready apps: read the upgrade guide, diff the published config against current config (config keys are unchanged, so a clean diff is the expected outcome), and confirm ACS/SLS routes and middleware are untouched.
  • Roll out to a non-production environment first with a real IdP, not just the test suite.
  • Promote one low-traffic production app as a canary, then the remainder.

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.

  1. Constraint hygiene — pin all apps to a known-good line today. This is the highest-value, lowest-cost action and is independent of the Laravel 13 timeline.
  2. Local/staging upgrade on one representative app, with live IdP login, assertion validation, attribute mapping, and logout.
  3. IdP test matrix across all distinct IdPs and any multi-IdP resolver configurations.
  4. Canary in production with login success rate and error-rate dashboards watched.
  5. Fleet rollout aligned to the Laravel 13 upgrade waves.

Operational Impact

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.

  • Certificate expiry or metadata drift — total login outage; the classic and most likely failure.
  • Clock skew between SP and IdP — intermittent, hard-to-reproduce assertion rejections.
  • Unsigned/tampered response rejection — working as intended, but surfaces as a login failure to the user; needs distinct alerting so it is not confused with an outage.
  • Logout (SLS) failure — users appear logged out locally while the IdP session persists, which is a security-relevant UX bug rather than an availability one.
  • Error masking (pre-2.0.0) — the reason a fix landed; if you are still on 1.x, expect some SAML failures to present as secondary TypeErrors and plan triage accordingly.
  • Accidental major-version pull in a Laravel 12 pipeline — mitigated by explicit constraint pinning.

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.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core