bloomatwork/oneloginsaml-bundle
A Symfony bundle that integrates the OneLogin SAML PHP toolkit, adding SAML 2.0 single sign-on authentication to Symfony applications. It helps configure service provider settings, handle SAML requests and responses, and authenticate users via an identity provider.
Architecture fit. The single most consequential finding for a TPM is that this artifact is not a Laravel package. bloomatwork/oneloginsaml-bundle is a Symfony bundle: its public surface is Symfony-specific plumbing — a legacy Bundle subclass, a DependencyInjection extension, YAML config tree, a security firewall authenticator, and a shipped ACS/metadata controller. None of that composes with Laravel's service container, middleware pipeline, or Auth guards. The reusable asset is the underlying framework-agnostic onelogin/php-saml toolkit; the bundle is Symfony glue around it. If the product roadmap assumes "add SAML SSO to our Laravel app via this Composer package," that premise is false and the work item needs re-scoping before any engineering hours are spent. The right framing is: we are evaluating the OneLogin SAML toolkit, and this bundle is one (Symfony-only) reference implementation of how to wire it.
Integration feasibility. For a Laravel codebase, direct integration is not feasible without effectively rewriting the bundle. A Laravel path exists and is well-trodden: depend on onelogin/php-saml directly and wrap it in a Laravel-native integration — a controller for ACS and metadata, a guard or socialite-style driver, config under config/services.php or a dedicated config/saml.php, and a user-provisioning seam. The bundle's design still has reference value: its separation of "toolkit settings object" from "Symfony service wiring" maps cleanly onto "SAML settings object" plus "Laravel service provider." For a Symfony team the bundle is closer to feasible, but the legacy Bundle base class and Symfony 2.x/3.x-era constraints mean it targets an end-of-life framework generation; a modern Symfony 5+/6+ app would need a fork or the maintained hslavich/OneloginSamlBundle / nbgrp/onelogin-saml-bundle instead.
Technical risk. Ranked by business impact:
NotBefore/NotOnOrAfter, certificate format ambiguity (PEM headers vs. raw base64 body producing misleading "invalid signature" errors), audience/recipient mismatch from trailing slashes or http-vs-https, SameSite cookie behavior across the IdP redirect, reverse-proxy baseurl drift, and attribute naming divergence across Okta / Entra / ADFS / OneLogin. These are all solvable, none are novel, and all consume calendar time during first-IdP onboarding.Key questions. A TPM should force answers to these before approving build:
php-saml version pinned by this fork against its CVE history, and what is the upgrade path?Stack fit. For a Laravel product, re-baseline the technical plan on onelogin/php-saml and treat this bundle as design documentation. Concretely, the Laravel shape is: a SamlServiceProvider binding a configured OneLogin\Saml2\Auth singleton, routes for /saml/acs, /saml/metadata, and /saml/sls, a controller that consumes the assertion and delegates to a SamlUserResolver contract, and a guard or middleware that reads the resulting session identity. That mirrors the bundle's seams — settings object, user factory, ACS/metadata controller — without inheriting its framework coupling. If a maintained Laravel SAML wrapper backed by php-saml exists that meets the audit criteria, prefer it over bespoke wiring; the TPM's job is to make that a build-vs-buy line item rather than an engineering preference.
For a Symfony product, do not adopt this fork. Specify the actively maintained bundle as the dependency and only fall back to this artifact if a concrete constraint (pinned legacy version, existing internal fork) requires it — in which case vendor it and assign explicit ownership.
Migration path. There is no meaningful migration path from this bundle — it's greenfield either way. The realistic path is: (1) spike the framework-agnostic toolkit in a throwaway branch against one real IdP sandbox; (2) prove the full SP-initiated round trip; (3) only then productionize. If a Laravel SAML package is adopted instead, the "migration" is the eventual swap of the wrapper, which is why the user-resolution seam should be an application-owned interface rather than a direct dependency on the package's types.
Compatibility. Two axes to validate explicitly and record as acceptance criteria: the php-saml toolkit version against the PHP runtime we deploy, and the wrapper (if any) against our framework major version. For Symfony, the legacy Bundle class is a hard incompatibility with modern versions. For Laravel, check the package's supported PHP range and whether it depends on the deprecated php-saml 3.x line. Also confirm license compatibility — this is an Apache/MIT-family ecosystem but should be asserted, not assumed.
Sequencing. A defensible phased plan:
baseurl behavior behind the load balancer, SameSite=Lax, ACS excluded from CSRF/WAF interference, debug disabled in prod, replay protection if the toolkit supports it.Maintenance. Treat this as a standing operational duty, not a closed project, and staff it accordingly. The recurring load is: tracking php-saml security releases and upgrading, rotating IdP and SP signing certificates before expiry, refreshing IdP metadata when a customer's IdP changes, and maintaining per-IdP attribute mapping as customers onboard. Because this specific fork has zero dependents and no visible maintainer cadence, the team inherits the entire burden with no shared-cost amortization — that is the core TPM argument against adopting it, and it should be quantified in the business case as ongoing FTE fraction rather than ignored. Preferring an actively maintained upstream bundle or a vendor-backed SDK is a hedge that converts some of this cost into a subscription.
Support. Support surface splits into two tiers. Tier 1 is ordinary user support: "SSO isn't working," which is usually a configuration drift, an expired certificate, or a customer-side IdP change. Tier 2 is the genuinely hard class: signature validation failures, audience/recipient mismatches, clock skew. These produce cryptic errors and require someone who can read the toolkit's last_error_reason and inspect the raw assertion. Plan for at least two engineers able to operate at Tier 2 — a single-person dependency on a SAML expert is a real continuity risk and should be an explicit staffing decision. Also pre-write the "customer asks us to configure their IdP" runbook; enterprise SSO support is a documentation product as much as a code product.
Scaling. Protocol-level scaling is not a concern — SAML validation is CPU-cheap and stateless per request; the ACS endpoint handles enterprise login volumes trivially. The scaling pressure is configuration cardinality. One IdP is a YAML block; fifty enterprise tenants each with their own IdP means per-tenant settings resolution, per-tenant certificates, and an admin surface to manage them. If the roadmap points at many enterprise accounts, decide early whether to build that multi-tenant config plane or push it onto a managed identity vendor that already has it. Retrofitting it later is the expensive path, and it's the most likely source of underestimated cost.
Failure modes. Enumerate these in the runbook with symptoms and first-response steps:
baseurl issue.SameSite=Lax plus Secure.Ramp-up. Budget one to two weeks of engineering for a competent PHP developer with no prior SAML exposure to reach first working SP-initiated login against a real IdP sandbox, plus additional time per IdP for attribute mapping and flow-specific quirks. The learning curve is not in the code — the code is thin — it's in the protocol's failure modes and in the IdP admin consoles, which are inconsistent and poorly documented. Two accelerants worth funding: a debug: true walkthrough of a real assertion early (one dump of the full attributes array resolves most mapping ambiguity), and a signed assertion fixture checked into the test suite so CI never touches a live IdP.
Bottom line for the decision meeting. The capability is strategically necessary — SSO unblocks enterprise procurement and strengthens the compliance narrative. This specific artifact is the wrong dependency: it is a Symfony-only, Symfony2-era, zero-adoption fork being evaluated for a Laravel stack. Approve the SSO initiative, reject this package as the implementation vehicle, and task engineering with a short, time-boxed spike to select a framework-appropriate, maintained dependency on top of onelogin/php-saml — or, if the roadmap includes OIDC and SCIM, to price a managed identity vendor against the fully-loaded total cost of ownership of owning this integration.
How can I help you explore Laravel packages today?