offline-agency/filament-spid
Filament plugin that adds SPID login to your admin panel, letting Italian users sign in with their digital identity. Configure the SPID providers, map SAML responses to users, and secure Filament access without building the integration yourself.
Architecture fit
filament-spid 1.0.0 is not a standalone auth library: it is a Filament panel integration layer over italia/spid-laravel, which in turn wraps onelogin/php-saml for the SAML 2.0 SP role. The 1.0 architecture makes that layering explicit and, correctly, narrows the plugin's job: italia/spid-laravel owns the ACS endpoint (spid-auth_acs) and emits auth events, while the plugin ships HandleSpidLogin / HandleSpidLogout listeners that provision the user, authenticate on the panel guard and call FilamentUser::canAccessPanel() before granting access. For any Italian public-sector or SPID-mandated service already on Filament, this is a good fit — it avoids hand-rolling SAML plumbing and removes the per-application listener code that 0.1.x required. The plugin is also usable outside a SPID panel (SpidPlugin::resolve() returns null), which keeps blast radius small on multi-panel apps.
Integration feasibility
Feasible but with an unusually heavy prerequisite chain for a Composer package. Installation requires: PHP 8.3+, Laravel 12–13, minimum-stability: beta, cweagans/composer-patches enabled, and a patched fork of italia/spid-laravel, because every published upstream version pins onelogin/php-saml 4.1.0 (CVE-2025-66475) and Composer refuses to install it. That is a supply-chain and governance decision, not a composer require. The filament-spid:install command materially improves feasibility — validated input (paths to key material, never the material itself), a shown plan, non-destructive publishing, idempotent re-runs, explicit manual steps and exit 1 on anything unsafe. But it edits bootstrap/app.php and the panel provider via PHP's tokenizer; that must be reviewed in a PR and backed by version control, not run blind in CI.
Technical risk
HOSTED_VALIDATOR_NOT_RUN and FORMAL_AGID_ACCEPTANCE_NOT_OBTAINED; passing it is not AgID accreditation. Plan for the AgID test cycle as a separate track.filament-spid.minimum_level (default SpidL2) while the library defaults to SpidL1; auto_create_users now defaults to false. Both are safety-positive and both will look like outages to users if not configured.spid_sp_test 1.2.18 with a xmlsec1 system dependency, is a lot of surface to keep current.<fiscal code>@spid.local to @spid.invalid; with update_user_data on, existing accounts change on next login. Anything keyed on email will drift.Key questions
italia/spid-laravel fork and the php-saml patch, and what is the exit plan when upstream ships a fixed release?minimum-stability: beta + patching acceptable under our dependency policy, and who signs that off?filament-spid.panel pins exactly one)?sp_spid_level is provisioned as L1 by default?update_user_data rewrite them?xmlsec1 and the pinned spid_sp_test, and do we allow outbound HTTPS to IdP metadata URLs?Stack fit
Target the supported matrix explicitly: PHP 8.3–8.5, Laravel 12–13, Filament 3–5; CI covers every combination, which is a strong signal. Users table: the new default field_mapping maps password to RandomPassword so auto_create_users works against Laravel's stock users table (password NOT NULL) — this removes a common custom-mapping chore. Use filament-spid.sp_profile and filament-spid.deployment to declare intent (public SP with IPA code vs private with VAT number) rather than encoding it in prose. Apply data minimisation up front via store_spid_data / spid_data_attributes instead of accepting the eight-attribute default.
Migration path (0.1.x → 1.0.0) Treat this as a breaking migration, not an upgrade:
italia/spid-laravel fork, enable patching and beta stability.redirect_after_login → spid-auth.after_login_url, spid_level → spid-auth.sp_spid_level, providers → SpidPlugin::providers(); drop the corresponding env vars.sp_spid_level to SpidL2 or higher (library default is L1 and will now be refused).auto_create_users deliberately (default is now off).HandleSpidLogin/HandleSpidLogout replace them; opt out only via filament-spid.register_listeners if you truly need custom behaviour.SpidPlugin::acsRoute() usage; the library owns spid-auth_acs. Re-check CSRF exemptions — only the ACS should be exempt.@spid.local → @spid.invalid before enabling update_user_data in production.->login() chaining still leaves the SPID login page intact (a warning now logs when it is replaced).Compatibility
The contract is now SemVer from 1.0.0, which is the single biggest improvement for planning: future 1.x upgrades should be non-breaking. Compatibility risk concentrates in three places — the fork/patch, the pinned spid_sp_test version and its xmlsec1 dependency, and the panel/guard assumptions in the listener.
Sequencing
filament-spid:install --dry-run, review the diff, then apply with --migrate.filament-spid:doctor --strict in CI; fail the build on non-zero exit. Track the JSON schema_version and pin against it.filament-spid:metadata:validate against our published metadata; archive the report (SHA-256, versions, profile, timestamp) as evidence.tools/spid lab and the spid-validation workflow, including the failure sentinels.showSpidButton(false) as the rollback lever.access_denied, level-mismatch refusals and auth failure rates as distinct signals.Maintenance
Two upstreams to watch (the italia/spid-laravel fork and onelogin/php-saml), plus a patch we must retire once upstream fixes CVE-2025-66475. Budget recurring effort for: certificate/metadata rotation, spid_sp_test version bumps, the PHP 8.3 floor (and 8.2 security EOL on 31 Dec 2026), and advisory-floor checks the doctor now automates. Release automation (label-driven tagging, notes from the changelog) and SECURITY.md/CODE_OF_CONDUCT.md indicate a maintained project, but this is a single-maintainer-risk profile until proven otherwise.
Support
filament-spid:doctor is the standout operational feature: read-only, no network, stable JSON schema_version, exit codes 0/1/2, --strict for CI gating, and it judges the php-saml patch by the metadata the library actually builds rather than by PATCHES.txt — that is the right test. filament-spid:metadata:validate fails closed (missing tool, wrong version, crash, timeout, missing xmlsec1, unreadable report → exit 2, never a pass) and uploads nothing. Documentation in docs/ plus an Italian guide lowers first-line support load; assume the Italian material is the authoritative source and that English drift is possible. Boost resources are a developer-experience nicety only — no runtime dependency, do not count them in an operational plan.
Scaling No unusual scaling characteristics: SPID is a redirect-based SAML handshake per login, and the package adds no background workers, queues or storage. Two real considerations: the once-per-hour configuration warnings use the cache, so a shared cache store is required for them to behave across nodes; and metadata validation makes outbound HTTPS requests with TLS verification, no redirects and size/time limits, so egress allowlisting to IdP metadata hosts is the only network change to plan.
Failure modes
sp_spid_level below minimum_level, or a non-URI minimum, refuses every SPID login. Fail-closed and correct, but reads as a total outage; alert on it.auto_create_users: false silently blocks first-time citizens — a top-tier support ticket generator after the default flip.filament-spid.panel naming no registered panel throws SpidPanelNotFoundException instead of falling back to the default guard — good, because the old behaviour could authenticate on the wrong guard.@spid.invalid can create duplicate or orphaned accounts if lookups assume email stability.bootstrap/app.php or the panel provider; mitigate with --dry-run, VCS, and code review.Ramp-up
Moderate to high. SAML/SPID domain knowledge and Italian regulatory context are the real cost, not Laravel familiarity. A single-panel stock-users application should reach a working staging login in roughly a day using the installer and quickstart; the AgID test-and-evidence cycle is the multi-week critical path and should be resourced independently of the engineering work. Recommendation: adopt, contingent on (a) an accepted dependency-policy exception for the fork, patch and beta stability, (b) Laravel 12+/PHP 8.3+ confirmed across all in-scope apps, (c) doctor --strict wired into CI, and (d) the AgID track opened before the first production cutover. Obtain the untruncated changelog before final sign-off.
How can I help you explore Laravel packages today?