codegreencreative/laravel-samlidp
A Laravel package that turns your app into a SAML Identity Provider (IdP), with SSO endpoints, service provider management, metadata, and certificate handling so Laravel can authenticate users for external SAML service providers.
What the package is. codegreencreative/laravel-samlidp turns a Laravel application into a SAML 2.0 Identity Provider — the app authenticates users and asserts their identity to third-party Service Providers (customer SaaS tools, internal dashboards, partner portals). It is not a Service Provider package; if our need is "let users log in with Okta/Entra," this is the wrong side of the protocol and should be disqualified early.
Architecture fit. Good fit when the Laravel app is the system of record for user identity and we need to federate outward to SPs we don't control. The package is Laravel-idiomatic — publishable config, routes/controllers for metadata, SSO and SLO endpoints, and a service-provider registry — so it slots into existing middleware, auth guards, and event patterns rather than requiring a parallel auth stack. Poor fit if we need fine-grained, per-tenant protocol customization, non-standard bindings, or certified/audited federation behavior.
Delta in v5.4.0. The release is a single change: a community PR adding Laravel 13.x compatibility, shipped as a minor version bump (5.3.2 → 5.4.0). No new features, no deprecations, no breaking API changes, no protocol-layer changes. Read it as a maintenance signal, not a capability change: the package is keeping pace with Laravel's annual major cadence. The practical consequence is that the v5.3.x line is now the "old framework" line, and staying on it accrues framework-upgrade debt rather than package-upgrade debt.
Integration feasibility. Low-to-moderate. Installation and configuration are a few hours; a working end-to-end SSO flow against one real SP is a few days; a production-grade, multi-SP, cert-rotating deployment is measured in weeks. The hard parts are never the Composer install — they are the certificate/key lifecycle, the per-SP attribute and NameID contracts, and interop testing against the specific SPs our customers actually use.
Technical risk. This is a security-critical component sitting directly on the authentication path, so risk is asymmetric — a defect means either lockout or, worse, an authentication bypass. Key exposures:
NotBefore/NotOnOrAfter windows are enforced, and only modern signing algorithms (SHA-256+) are offered.Key questions to answer before committing:
composer.json, and does it drop any Laravel/PHP version we currently run?Stack fit. Targets the standard Laravel application structure and modern PHP. It composes with existing auth rather than replacing it: the package answers "who is this user and how do I assert it," while our existing guards, session handling, and user model stay authoritative. Assumes a stable, non-reassignable user identifier — do not anchor NameID to a mutable email address without an explicit, agreed format and a change-management story.
Migration path.
Compatibility. Build an explicit SP interop matrix and test against the real ones — Okta, Microsoft Entra ID, Google Workspace, and any bespoke customer SP — rather than against a reference implementation. SAML interoperability failures cluster in attribute naming, NameID format expectations, and clock/algorithm defaults, and they surface only against the real counterparty. Also confirm behavior behind our load balancer and TLS termination: some SAML libraries reconstruct URLs from request headers and produce wrong ACS/entity IDs behind a proxy.
Sequencing.
composer.json and add the Laravel 13 job to CI before changing our framework default.Maintenance. Low ongoing code footprint, but not zero-touch. Expect an update roughly annually to track Laravel majors, plus ad-hoc security releases from the transitive SAML dependency. Budget on the order of one sprint per year for upgrades and interop re-verification, and treat any advisory in the underlying SAML library as an out-of-band page, not a backlog item.
Support. Support is community-only — GitHub issues, no SLA, no vendor escalation. Internally we own the on-call story: federated login failure is a total access outage for the affected user population, and the first responder will be our team, not the package author. Before launch we need a runbook covering certificate expiry, metadata drift, SP-side config errors, and the "disable federation temporarily" escape hatch. If enterprise customers require contractual uptime, audit evidence, or a named support contact for federation, that requirement points toward a commercial IdP rather than this package.
Scaling. Endpoints are conventional HTTP handlers and scale horizontally with the app tier; there is no stateful bottleneck in the package itself. Two things to watch: RSA sign/verify is CPU-bound, so model it against peak login concurrency rather than average (it is cheap per-request but not free at burst); and any session-index tracking for Single Logout implies shared session storage across nodes — an in-memory or per-node session driver will silently break SLO.
Failure modes, ranked by likelihood.
Ramp-up. A competent Laravel developer is productive with the package in a day or two; the package is not the learning curve. SAML itself is — bindings, profiles, signature validation, and the fact that failures are opaque and bilateral. Realistic time to independent confidence is one to three weeks, and the fastest path is pairing with someone who has shipped SAML before, or paying for a short interop engagement. Plan knowledge to live with at least two engineers; a single person who understands the certificate lifecycle is an operational single point of failure.
How can I help you explore Laravel packages today?