Skip to content
Lightning VMBeta

Features

Security and identity

Sign-in methods, two-factor authentication, passkeys, LDAP and single sign-on, roles and role limits, signing in on behalf of a user, and what happens when an address is first proven.

Sign-in methods

Authentication is handled by better-auth: password, passkey and two-factor authentication. Sign-in with an e-mailed code and with a sign-in link also exist; both are off by default.

Two-factor authentication is switched on under My account → Security:

  • An authenticator app (TOTP), set up with a QR code or a key typed in by hand.
  • 10 backup codes, each usable once.
  • A code by SMS or e-mail, valid for 5 minutes.
  • With "Trust this device", the second step is not asked for in that browser for 30 days.
  • After 10 wrong attempts, verification is locked for 15 minutes.

Signing in with a passkey takes the place of two-factor authentication. An account with two-factor authentication on cannot sign in with an e-mailed code or a sign-in link.

Directory and single sign-on

  • LDAP / Active Directory: Settings → Directory. A read-only service account finds the person by e-mail address, then a bind is attempted with the person's own password. Groups can be mapped to roles. The password of a directory account cannot be changed in the panel.
  • Single sign-on with OpenID Connect: Keycloak, Entra ID, Okta, Google and authentik. The redirect address to register with the provider has the form https://<panel>/api/auth/callback/oidc. Roles are updated from the groups at every sign-in.

Directory and SSO accounts can sign in only by their own route. Their sessions end SESSION_TTL_HOURS hours after they were opened, even when in use. The permissions of whoever saves the directory or SSO setting must cover the permissions of every account that signs in from that source; only admins can map to the admin role.

Personal API tokens of these accounts are accepted only if the account was confirmed at its source within the last DIRECTORY_TOKEN_DAYS days (30 by default). The tokens of an account the directory no longer lists are put to sleep.

Roles, permissions and role limits

Authority is granted through permissions; a role is a named set of permissions. A user can have several roles, and individual permissions can be added or taken away per person. The built-in roles are Admin (every permission, cannot be changed), Customer, Operator, Support and Auditor; you create further ones yourself.

Besides permissions, a role carries limits:

  • Quota: the maximum number of servers and of vCPU, RAM and disk.
  • The number of snapshots per server, of firewalls and of SSH keys.
  • The number of operations that may be started per hour.
  • The maximum length of a session, and whether two-factor authentication is required.
  • The locations that may be ordered in and the IP addresses sign-in is allowed from.

Signing in on behalf of a user

Staff with the permission can sign in on behalf of a user. Such a session cannot leave a lasting mark on the account: passkeys, linked accounts, the password, two-factor settings, webhooks and the billing e-mail cannot be changed; the account cannot be taken away from its reseller, and a transferred server cannot be accepted. The session ends after one hour, and as soon as the staff member who opened it loses the authority to do so.

First proof of an address

The e-mail address of an account opened by registration is not verified. When an account with an unproven address proves it for the first time (by a sign-in link, an e-mailed code or a password reset by e-mail), what had been set up on the account before is erased once: linked sign-ins, other sessions, API tokens, passkeys, webhooks, saved SSH keys and saved cards. Servers, images, the balance and tickets stay. The reasoning is that the account may not have been opened by the owner of the address.

Other protections

  • CSRF protection, rate limits, request-body limits, and secrets encrypted with a master key.
  • Protection against duplicate operations: Idempotency-Key, a single open operation per server, and refusal of the second request on a double click.
  • On Proxmox every request carries the VM's expected name, so a reused VM number cannot make an operation land on another server.
  • Every path that sends an SMS or an e-mail is limited per account and per destination.
  • CAPTCHA: Cloudflare Turnstile, reCAPTCHA v2/v3 and hCaptcha.
  • When a session ends, and when the panel is opened for someone else in the same browser, the drafts, recently opened items and half-finished order kept in the browser are erased.

What the panel's security audit covered, and what it did not, is the subject of a separate article: What the security audit covered, and what it did not.

Source: docs/auth.md (Turkish).

Install command

curl -fsSL https://lightningvm.app/install.sh | sudo sh

Ubuntu 22.04 / 24.04 / 26.04. Requirements and options