mirror of
https://github.com/nestriness/nestri.git
synced 2026-11-22 23:19:50 +02:00
`bash <(curl -fsSL https://api.nestri.io/install.sh)` with nothing after it now installs the host agent and hands over to onboarding without a token, and the agent signs in instead: it shows a code, and the machine is registered once that code is approved in a browser on any device. That removes the step of copying a command with a secret in it from the dashboard, and keeps a secret out of shell history. A token still works exactly as before and skips the browser; `-u`, `-h` and asking sudo for root are unchanged. With no token, NESTRI_INSTALL_TOKEN is left unset rather than set empty, and the re-run under sudo is passed no argument rather than an empty one.
1.5 KiB
1.5 KiB
Installer sign-in (work in progress; deleted in the final commit)
Branch: feat/installer-sign-in
Done
-
- installer device client, 15 min, no refresh (engine
clientTTL, apps/authclientTTL)
- installer device client, 15 min, no refresh (engine
-
- per-address limit on POST /device/authorize (engine
deviceVerification.requestLimit), 429 slow_down + Retry-After
- per-address limit on POST /device/authorize (engine
-
- confirm wording per client (engine
deviceConfirm, apps/authdeviceConfirm), preview entry
- confirm wording per client (engine
-
- api middleware: aud
installeronly on POST /machine/install-token, else 403 (test: apps/api/test/install-token.test.ts)
- api middleware: aud
-
- core InstallToken.create: 5/h + 3 outstanding per user (HOURLY_LIMIT, OUTSTANDING_LIMIT), 429 too_many_requests
-
- Machine.TEAM_MACHINE_LIMIT = 10 in Machine.register (team row lock) + InstallToken.create, 429 quota_exceeded
-
- install.sh: token optional; NESTRI_INSTALL_TOKEN unset when none
Left
- issuer:
installerdevice client, 15 min access, no refresh token - issuer: per-address limit on POST /device/authorize (10 per 600 s)
- issuer: confirm screen wording for
installer - api:
installeraudience accepted only on POST /machine/install-token - api: 5 install tokens per user per hour, 3 outstanding
- api: 10 machines per team, at mint and at registration
- install.sh: token optional
Resume
Test db: postgres://postgres:postgres@127.0.0.1:5434/nestri_installer
(migrate with DATABASE_URL=... bun run db:migrate from the repo root;
run tests with TEST_DATABASE_URL and DATABASE_URL both set to it).