hslavich/oneloginsaml-bundle
A Symfony bundle for adding SAML 2.0 single sign-on via the OneLogin PHP SAML toolkit. Configure your identity provider, generate service provider metadata, and handle SP-initiated or IdP-initiated login and logout with attribute and assertion support.
Architecture fit (important caveat): Despite being referenced here as a "Laravel/PHP package," hslavich/oneloginsaml-bundle is a Symfony bundle, not a Laravel package. It ships Symfony-specific glue — a DependencyInjection extension, a security firewall factory for a SAML guard authenticator, event subscribers for user creation/attribute mapping, and config tree definitions bound to Symfony's security.yaml model. None of that maps cleanly onto Laravel's guard/provider/middleware model. The reusable asset is the underlying onelogin/php-saml library plus the reference implementation of SAML flow handling; the bundle itself is a poor direct fit for a Laravel codebase.
Integration feasibility: Feasible but not drop-in. Three realistic paths:
aacotroneo/laravel-saml2, a Socialite SAML provider, or onelogin/php-saml directly with a thin controller). Often lower total cost than adapting this bundle.Technical risk (elevated):
onelogin/php-saml has moved to a new maintainer (SAML-Toolkit/php-saml). Pinning to an old transitive version is a liability; the bundle's version constraints may block patched releases.Key questions for the team:
Stack fit: Poor for a Laravel monolith as-is; good for a Symfony service. The bundle's value is its reference implementation of SP-side flows, config-driven IdP metadata, and attribute-to-user mapping hooks — all portable concepts, not portable code. If the organization already runs Symfony anywhere, the broker option is the cleanest use of this package. If the stack is Laravel-only, treat this bundle as documentation and build or buy a Laravel-native SP.
Migration path:
php-saml, cert rotation, structured logging on ACS) and expose a token endpoint to Laravel.Compatibility: Verify PHP and Symfony constraints against the runtime you'd deploy the broker on. Confirm the transitive onelogin/php-saml version supports the signature algorithms and XML hardening your IdP and security review demand. Check that libxml settings (LIBXML_NOENT/entity loading) are disabled in the deployed config — this is a class of bug that historically bites SAML SPs.
Sequencing:
Maintenance: This is the dominant cost. Expect to own the dependency: monitor php-saml advisories, patch or fork the bundle when upstream moves, and re-validate IdP metadata on the IdP's schedule (certificate and endpoint changes are routine, not exceptional). Budget roughly 10–20% of an engineer's time in steady state for an auth-critical integration of this age, spiking during security reviews.
Support: Low external support surface — no active community, no vendor. Internal runbooks are mandatory: cert rotation procedure, metadata refresh, ACS troubleshooting, and a documented break-glass local login path for when the IdP is unavailable.
Scaling: SAML SP scaling is not the hard part — stateless ACS handling scales horizontally; the constraints are the IdP's session limits and your user/attribute sync. Multi-tenant SAML is the real scaling ceiling: per-customer metadata, per-tenant certs, and per-tenant attribute maps are not first-class in this bundle and would require meaningful extension work.
Failure modes to instrument explicitly:
NotBefore/NotOnOrAfter rejections; enforce NTP.inResponseTo and audience/recipient validation are enforced, and that the replay cache is viable if multiple app instances serve ACS.Ramp-up: SAML is a specialized skill. Expect 1–2 weeks for a competent engineer to become productive on the flow and the failure taxonomy, longer to be confident in the security review. The TPM should sequence a named owner and a documented runbook as deliverables of the integration itself, not as follow-up work — otherwise the knowledge leaves with the contractor.
TPM recommendation: Use this package as a validation harness and reference implementation, not as a production dependency in a Laravel system. Commit to either a hardened Symfony broker (if cross-framework SSO is a genuine requirement) or a maintained Laravel-native SP (if the stack is Laravel-only). Make fork ownership and security-patch SLA explicit go/no-go criteria before any production code is written.
How can I help you explore Laravel packages today?