ziffmedia/laravel-onelogin
OneLogin SAML single sign-on for Laravel. This package provides a simple, configurable integration for OneLogin authentication, handling SAML responses, login and logout flows, and user provisioning so you can add enterprise SSO to your Laravel app with minimal setup.
Architecture fit The package is a thin Laravel service-provider wrapper for SAML 2.0 federation, positioning OneLogin as the identity provider. It fits the common shape of a Laravel web app using session-based auth with an SSO entry point (login redirect, ACS callback, metadata endpoint, optional SLO). Architecturally it is a leaf dependency: it touches the auth boundary, not the domain model, which limits blast radius but concentrates all risk in one place — a broken auth path is a full outage, not a degraded feature.
Adoption signal is the headline finding. 10 stars and a single-vendor release history places this in the "internal package extracted for a client, published as a courtesy" category rather than "community infrastructure." That is not disqualifying — many good SAML bridges are small — but it changes the TPM's posture from evaluate and adopt to evaluate, vendor, and own.
Integration feasibility
The happy path is fast: composer require, publish config, populate IdP metadata (entity ID, SSO URL, x509 signing cert), register routes, wire the guard. For a team that already has a OneLogin tenant configured, a sandbox spike should close in 1–3 engineering days (estimate). The real effort sits downstream of the protocol handshake: just-in-time user provisioning, attribute-to-role mapping, handling users who exist locally but not in the IdP (and vice versa), and single-logout semantics. Budget 1–2 additional weeks for a production-grade rollout with dual-auth transition.
Technical risk
| Risk | Severity | Note |
|---|---|---|
| Transitive SAML toolkit security posture | High | SAML libraries are a known CVE surface (XML signature wrapping, XXE, assertion parsing). Whatever version range this package pins is inherited risk; the package's own correctness is secondary to its dependency's |
| Release staleness | High | Last release 2023-09-29. Laravel 11 and 12 support is unverified; a stale illuminate/* constraint will block framework upgrades |
| Single-maintainer / no security contact | Medium-High | No disclosed vuln process, no SLA, no bus factor |
| Hard-fail auth path | High | Certificate or metadata drift produces total login outage with no graceful degradation |
| IdP-specific assumptions | Medium | If attribute names or endpoints are hardcoded to OneLogin's schema, portability to Entra ID/Okta is lost — likely, but needs verification |
Key questions to resolve before committing
Verdict: Conditional go for a single, well-bounded internal application where the team accepts ownership. No-go as a platform-wide authentication standard without a fork-and-vendor plan and a named maintainer.
Stack fit
Confirm the compatibility matrix first — this package predates both Laravel 11 and 12. Map: PHP runtime version → Laravel version → this package's illuminate/* constraints → the underlying SAML toolkit's PHP requirements. A constraint conflict here is the single most likely reason the spike fails, and it is cheap to test on day one.
Migration path For an app currently on local password auth, migration is additive and reversible: keep the existing guard active, add SAML as an additional authentication route behind a feature flag, and dual-run through a transition window. Preserve at least one break-glass local account with elevated credentials stored outside the IdP — non-negotiable, since IdP outages otherwise become total lockouts.
For an app already on another SAML package (e.g., aacotroneo/laravel-saml2, 24slides/laravel-saml2), migration is route- and config-level, not data-level. User records are unchanged; only the ACS endpoint and metadata URL move. That means cutover can be done IdP-side by swapping the ACS URL — which also means rollback is a config change, not a deploy.
Compatibility SAML 2.0 is SAML 2.0; if the package is well-built it should federate against Okta, Entra ID, or Google Workspace without code changes. Verify this early — if it is not IdP-agnostic, you are buying a one-way door into OneLogin, which materially changes the vendor-negotiation leverage story.
Sequencing
Maintenance Assume ownership from day one. Budget a named maintainer, a quarterly dependency review, and a documented fork path. The realistic steady-state cost is low — SAML integrations are quiet when healthy — but the tail risk is concentrated: a toolkit CVE or a Laravel major version bump forces action on someone else's timeline. Forking at adoption time is cheap; forking under pressure during an upgrade freeze is not.
Support There is no vendor support and no implied SLA. OneLogin (now under One Identity) supports the identity provider, not this Laravel package — a distinction that will confuse an on-call engineer at 2 a.m. if it isn't written down. Internal runbooks must cover: cert rotation, metadata refresh, ACS URL changes, and what to do when login fails for everyone.
Scaling The service-provider side is effectively stateless and scales horizontally without special handling, with two caveats: the ACS endpoint must be consistently reachable and configured identically across instances (no per-node metadata drift), and the session store becomes auth-critical — a Redis outage now means a login outage, not just a cache miss. IdP-side, watch connection/rate limits if you are federating many apps through one tenant.
Failure modes
| Failure | Blast radius | Detection | Mitigation |
|---|---|---|---|
| Signing certificate expiry | Total login outage | Cert-expiry monitor at 30/14/7 days | Rotation runbook, dual-cert overlap window |
| IdP metadata drift (endpoint change) | Total login outage | Synthetic login probe per environment | Alerting on ACS 4xx/5xx rate |
| Clock skew between SP and IdP | Intermittent, user-specific failures | Assertion-validation error logs | NTP enforcement, skew tolerance config |
| Attribute/claim rename | Silent role-mapping corruption — users log in with wrong or no permissions | Diff JIT-provisioned roles against expected | Integration test on claim shape |
| SAML toolkit CVE | Potentially auth bypass | Advisory monitoring on transitive dep | Fork + patch SLA |
| IdP-side outage | Total lockout for all SSO users | IdP status feed | Break-glass local admin accounts, tested quarterly |
Note the asymmetry: four of six failure modes are total rather than partial. Design for that — synthetic login monitoring in every environment, not just production, and a break-glass path that is actually exercised.
Ramp-up A mid-level Laravel developer with no SAML background needs roughly 2–4 days to become productive, and the bottleneck is SAML semantics (assertion validation, signature verification, RelayState), not this package's API — the wrapper is deliberately thin, which is a point in its favor. That is also the argument for a template with a written runbook: the knowledge should not live in one person's head, given that the upstream project will not be providing it.
How can I help you explore Laravel packages today?