Skip to content

Security Controls

The server exposes a public password-policy read endpoint and SuperAdmin-only endpoints for viewing or changing the platform password and authentication throttling policy, and for reviewing/resetting active authentication blocks.

A new installation defaults to the strong password profile and standard brute-force profile. Existing installations without a stored policy use compatible passwords and standard brute-force limits; saved policies are preserved. Password policy applies when a password is created or replaced, not when existing credentials are checked during sign-in. Existing passwords remain usable without forced migration; authentication continues to check stored credentials. Manager API JWT tokens are unaffected because they are not password credentials. Affiliate password creation has an additional minimum of 8 characters even when the platform profile is compatible.

Password lengths count Unicode code points, with a 128-character and 512-byte UTF-8 ceiling. Custom composition checks apply to ASCII uppercase/lowercase/digit/special characters. The reject_common check also rejects a short configured common-password list and passwords made of one repeated character. The reserved hashst: prefix and malformed/control-character input are rejected as PASSWORD_FORMAT.

The built-in profiles are:

Password profile Minimum length Composition Common-password rejection
compatible 6 None required No
standard 12 None required Yes
strong 15 None required Yes
custom Configured, 6–128 Each requirement configurable Configurable

Password rejection returns HTTP 400 with error: PASSWORD_POLICY_VIOLATION, a reason, and the active password_policy. Reasons are PASSWORD_FORMAT, PASSWORD_LENGTH, PASSWORD_UPPERCASE, PASSWORD_LOWERCASE, PASSWORD_DIGIT, PASSWORD_SPECIAL, and PASSWORD_COMMON. For example:

{
  "error": "PASSWORD_POLICY_VIOLATION",
  "reason": "PASSWORD_LENGTH",
  "password_policy": {
    "profile": "strong",
    "min_length": 15,
    "max_length": 128,
    "require_uppercase": false,
    "require_lowercase": false,
    "require_digit": false,
    "require_special": false,
    "reject_common": true
  }
}

Password and OTP authentication attempts share per-principal and per-IP budgets across HTTP and TCP. A blocked request returns HTTP-style status 429 and retry_after_seconds; unavailable guard state returns 503 SECURITY_GUARD_UNAVAILABLE. The configured standard profile is 10 password attempts, 5 OTP attempts and 200 IP attempts per 900-second window, with 60-second initial/IP blocks and a 900-second maximum identity block. The strong profile uses 5 password attempts, 3 OTP attempts, 100 IP attempts per 900 seconds, 300-second initial/IP blocks and a 1800-second maximum identity block. Custom ranges are enforced by the server. Policy and block snapshots are held in memory and persisted through the ordered security-guard writer to bases/security_guard.db; this file is separate from trading-state restore.

See GetPasswordPolicy, GetSecurityPolicy, SetSecurityPolicy, GetAuthBlocks, and ResetAuthBlocks.