dasundev/filament-access-secret
A Laravel Filament package that adds secret-key protection to your admin panel, letting only visitors with the correct access secret reach Filament pages. Lightweight and easy to configure, it helps gate or hide your panel without extra roles or complex auth setup.
Architecture fit. Filament panels are composed through a PanelProvider that assembles middleware, routes, and Livewire components. This package slots in as an additive middleware/config layer that gates panel entry behind a URL secret. It requires no schema changes, no model changes, and no changes to Filament resources or pages, so it is architecturally low-friction and cleanly removable. Conceptually it is "security through obscurity plus a shared secret," which is a legitimate defense-in-depth layer for staging, internal tools, or pre-launch admin surfaces—but it is not an authentication or authorization mechanism and should never be positioned as one.
Integration feasibility. High. Typical wiring is composer require, publish config, set an env var, register the plugin/middleware in the relevant PanelProvider. A competent Laravel developer can complete the happy path in well under a day. The real effort is validation—confirming which routes are actually covered—not the install.
Technical risk.
Referer headers on outbound or third-party requests. Any embed, analytics script, or external link inside the panel can leak the secret.route:list diffs, not assumed.Authenticate and session middleware determines whether the secret acts as a pre-auth gate (intended) or is bypassable/duplicated.Key questions.
Authenticate and session middleware?Stack fit. Standard Laravel + Filament stack; the package touches only the HTTP/middleware layer, so it is orthogonal to data models, queues, storage, and frontend build. Low blast radius.
Migration path. No data migration and no lock-in. Deployment is a composer dependency plus a PanelProvider edit plus an env var. Rollback is deregistering the plugin—reversible in a single deploy. This makes it a good candidate for a per-environment config flag (enabled in staging, conditionally in production).
Compatibility. Pin exact versions in composer.json and record the Filament constraint the package requires. Before merge: capture php artisan route:list before/after and diff, confirm panel routes and Livewire endpoint behavior, and test with Filament's native auth enabled to ensure the two layers compose cleanly. Validate asset publishing and config caching (config:cache) since a cached config with a stale/empty secret is a common failure.
Sequencing.
Maintenance. Low code churn expected, but the maintainer and dependency risk is real at this adoption level. Budget for either pinning aggressively or copying the middleware into the application (it is a small, easily vendored unit). Track upstream releases and Filament major bumps; the package may lag.
Support. Community-only—no SLA, no vendor escalation. Assign an internal owner who understands the middleware and can patch it. Document the "why" so future maintainers don't mistake it for real access control.
Scaling. Negligible. One string comparison per request against cached config; no DB or external calls. Scales horizontally without concern.
Failure modes.
Referer, screenshots, or support tickets—the most likely incident.Ramp-up. Fast for a Laravel developer—half a day to a day including validation. The training burden is not technical but conceptual: the team must internalize that a URL secret is an obscurity layer, must be layered with real authentication, must be rotated, and must be treated as sensitive in logs and incident response. Ops needs a runbook for rotation and for the case where the secret is exposed.
How can I help you explore Laravel packages today?