APP_ENV | What the dashboard does |
|---|---|
local, testing | Open. Whoever reaches it acts as an admin |
Any other but production — staging, qa, preview, development… | A sign-in page: a username and a password, or a passkey. An authenticator app is optional, per user |
production | Not served (404), unless LARAPILOT_FORCE_IN_PROD=true. Then every user signs in with a passkey, or a password and an authenticator |
The first admin#
An admin creates the users and sets their passwords — on the Users page, or from the shell. The first admin of a server always comes from the shell: until a user exists, a shared host answers 503 with the command to run, and serves nothing else.
php artisan larapilot:dashboard-user add andrea --role=admin # asks for the password (12+ characters)
php artisan larapilot:dashboard-user add giulia --role=pm
php artisan larapilot:dashboard-user role giulia dev # admin · dev · pm · ext
php artisan larapilot:dashboard-user password giulia # her open sessions end
php artisan larapilot:dashboard-user totp-reset giulia # a lost phone
php artisan larapilot:dashboard-user passkey-reset giulia # a lost laptop
php artisan larapilot:dashboard-user listUsers live in .larapilot/auth.yaml — password hashes, roles, authenticator secrets encrypted with APP_KEY, and the public keys of the passkeys — git-ignored, with no table and no model. Each server has its own users. A change takes effect on the next request of every open session.
Roles#
| Role | Sees |
|---|---|
admin | Everything: every page, Users, API token, Anonymization, the file manager, the Agent, Updates, and where the database lives |
dev | Everything but Users, API token, Anonymization, the Agent, Updates, and the file manager. Never the host of the database; in production, the rows anonymized only |
pm | Workflow, Insights, and Reference — Board, PRD, Plan, Versions, Roadmap, Design, Forecast, Usage, Economics, Security, Errors, API — and the Logs outside production |
ext | Workflow only — Board, PRD, Inception, Plan, Versions, Roadmap, Design and its mockups. For your client |
Each role sees its pages in the menu and in the search; any other page answers 403 and says why.
Passkeys#
Every user adds passkeys from Account — Touch ID, Face ID, Windows Hello, a phone, a security key, or a password manager — and signs in with Sign in with a passkey, typing nothing.
- A passkey is both factors. The browser asks for the fingerprint, the face, or the PIN every time, so a passkey stands for the password and the authenticator together — in production too.
- It cannot be phished: it answers this site only. The sign-in is discoverable, the challenge is one-time and lives five minutes in the session.
- No dependency. Larapilot verifies the WebAuthn ceremonies itself — ES256, RS256 (Windows Hello), Ed25519 — checks the signature counter against cloning, and keeps only public keys. Removing a passkey signs out every session it opened.
- Browsers offer passkeys over HTTPS or on
localhost.LARAPILOT_PASSKEY_RP_IDshares them across subdomains,LARAPILOT_PASSKEY_ORIGINSnames the origins behind a proxy,LARAPILOT_PASSKEYS=falseturns them off.
The authenticator#
Any TOTP app — Google Authenticator, Microsoft Authenticator, 1Password, Authy — enrolled from a QR code drawn on the server. The secret is encrypted with APP_KEY and never leaves the server; a code is good once. Optional on staging, required in production for a user without a passkey.
Safety rails#
- Throttling — wrong passwords per address (20 a minute) and per name (5 a minute); behind a proxy, trust it with
TrustProxies. - Sessions — forms with CSRF, regenerated at every sign-in.
- Audit trail —
.larapilot/auth-audit.log, one JSON line per sign-in, failure, second factor, passkey, user change, token, MCP server, anonymization map, and zip. Never a password, a code, or a token. - Separate doors — the sign-in never opens the API to a client without the token, and the token never opens the dashboard.
- HTTPS on every shared host; in production, install the package with the app (a
--no-devdeploy leaves it out).


