Sign-in, roles & passkeys

No HTTP Basic Auth, no sign-up, no password reset by email. The dashboard has its own door, and what it asks follows APP_ENV.

Who gets into the dashboardOn a developer's machine (APP_ENV local) the dashboard is open. On staging and every other shared host it asks for a user: a password, an optional authenticator, or a passkey, and each role sees its pages. In production it is hidden unless LARAPILOT_FORCE_IN_PROD is true, and then every user needs a passkey or a password and an authenticator.your machineAPP_ENV=localopen — you arethe adminstaging, QA, preview…any other APP_ENVsign-in: password,authenticator, passkeyproductionAPP_ENV=productionhidden — unlessyou force itroles: admin · dev · pm · ext (your client)then passkey, orpassword + authenticator
APP_ENVWhat the dashboard does
local, testingOpen. 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
productionNot served (404), unless LARAPILOT_FORCE_IN_PROD=true. Then every user signs in with a passkey, or a password and an authenticator
The sign-in page: the form, and the loop of a story sketched by hand around the pilot

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.

Terminal
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 list

Users 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#

RoleSees
adminEverything: every page, Users, API token, Anonymization, the file manager, the Agent, Updates, and where the database lives
devEverything but Users, API token, Anonymization, the Agent, Updates, and the file manager. Never the host of the database; in production, the rows anonymized only
pmWorkflow, Insights, and Reference — Board, PRD, Plan, Versions, Roadmap, Design, Forecast, Usage, Economics, Security, Errors, API — and the Logs outside production
extWorkflow 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.

The Users page: one user per role, two with the authenticator on, one with two passkeys

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_ID shares them across subdomains, LARAPILOT_PASSKEY_ORIGINS names the origins behind a proxy, LARAPILOT_PASSKEYS=false turns them off.
Account: Maya’s two passkeys, MacBook Pro and iPhone, and the authenticator

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-dev deploy leaves it out).