Docs / Reference

Security

What is stored, how credentials are protected and what to do on your side.

What is stored

  • Accounts: username, hashed PIN, limits, status, last activity.
  • Logins: a hash of each device token.
  • Usage: a timestamp and the size of each question. Never the text of questions or answers.

The model provider you configure still receives each question to answer it, under that provider's own terms.

Credentials

  • PINs are hashed with scrypt and a per-user salt.
  • The terminal keeps a random token, not your PIN. The server stores only its SHA-256 hash and can revoke it at any time.
  • The administrator password is compared in constant time.
  • The provider API key exists only in server environment variables.

Abuse protection

A 4-character PIN is short by design, so protection relies on lockouts: 5 failures lock a username and 20 lock a network address, each for 15 minutes. Unknown usernames take the same time to reject as real ones.

Recommendations

  • Use a long, random ADMIN_PASSWORD and rotate it if it leaks.
  • Keep a small balance on the provider account so a leaked login cannot run up a large bill.
  • Lower per-user limits for people who only need occasional use.
  • Disable accounts of people who leave. Their logins stop immediately.