The Secure AI Appliance stores all sensitive data (models, outputs, keys, auth state) on a LUKS-encrypted partition called the vault. The vault auto-locks after inactivity and can be manually locked or unlocked.
curl http://127.0.0.1:8480/api/vault/statusExample response:
{
"state": "unlocked",
"detail": "",
"idle_seconds": 142,
"last_activity": 1741444200.0
}Fields:
- state --
locked,unlocked, orunknown. - detail -- Reason for the last state change (e.g.,
manual_lock,auto_lock_idle,tpm2_unseal). - idle_seconds -- Seconds since last user activity.
- last_activity -- Unix timestamp of last activity.
Open the Security tab in the Web UI. The vault status is shown at the top with a lock/unlock indicator and the idle timer.
curl -X POST http://127.0.0.1:8480/api/vault/lock \
-H "Authorization: Bearer <session-token>" \
-H "X-CSRF-Token: <csrf-token>"This will:
- Stop all AI services (inference, diffusion).
- Sync filesystem buffers.
- Unmount
/var/lib/secure-ai. - Close the LUKS device (
cryptsetup close secure-ai-vault). - Update the vault state file to
locked.
Response on success:
{
"success": true,
"state": "locked"
}- Go to the Security tab.
- Click Lock Vault.
- Confirm the action. The UI will show a "Vault Locked" state and all AI features will be unavailable until unlocked.
When the vault locks:
- All model files become inaccessible (they are on the encrypted partition).
- Inference and diffusion services stop.
- The Web UI remains accessible (it runs from the immutable OS partition) but can only show the unlock form.
- Auth state remains in memory briefly but the session is invalidated.
- Outputs, logs, and keys on the vault are inaccessible.
curl -X POST http://127.0.0.1:8480/api/vault/unlock \
-H "Content-Type: application/json" \
-d '{"passphrase": "your-luks-passphrase"}'This will:
- Open the LUKS device with the provided passphrase
(
cryptsetup open <partition> secure-ai-vault). - Mount the vault at
/var/lib/secure-ai. - Reset the activity timer.
- Restart AI services (inference, diffusion, UI).
- Update the vault state to
unlocked.
Response on success:
{
"success": true,
"state": "unlocked"
}Response on wrong passphrase:
{
"success": false,
"error": "incorrect passphrase or device error"
}When the vault is locked, the UI shows an unlock form:
- Enter the LUKS passphrase.
- Click Unlock.
- Wait for services to restart (10-30 seconds).
- The UI returns to normal operation.
If Secure Boot and TPM2 are configured, the vault key is sealed to TPM2 PCR values. At boot:
- If the boot chain is intact (firmware, kernel, bootloader, secure boot state match the sealed PCR values), the TPM2 unseals the key automatically.
- If any PCR value has changed (e.g., after a kernel update), the TPM2 refuses to unseal and the user must enter the passphrase manually.
The vault auto-locks after vault.auto_lock_timeout minutes of inactivity
(default: 30 minutes). During long inference runs, you may want to prevent
auto-lock.
Send a keepalive request to reset the idle timer:
curl -X POST http://127.0.0.1:8480/api/vault/keepalive \
-H "Authorization: Bearer <session-token>" \
-H "X-CSRF-Token: <csrf-token>"Response:
{
"success": true
}The Web UI automatically sends keepalive requests while you are actively using it. If you leave the tab open but inactive, the vault will eventually auto-lock.
The Security tab shows the idle timer and has a Keep Alive button for manual reset.
For automated workloads, send periodic keepalives:
# Send a keepalive every 10 minutes
while true; do
curl -s -X POST http://127.0.0.1:8480/api/vault/keepalive \
-H "Authorization: Bearer $TOKEN" \
-H "X-CSRF-Token: $CSRF"
sleep 600
doneThe vault watchdog checks for inactivity every vault.check_interval seconds
(default: 30 seconds). When the idle time exceeds vault.auto_lock_timeout
minutes:
- A warning is logged.
- AI services are stopped.
- The vault is unmounted and the LUKS device is closed.
- The vault state is set to
lockedwith detailauto_lock_idle. - A
vault_auto_lockedaudit entry is written.
To change the auto-lock timeout, edit appliance.yaml:
vault:
auto_lock_timeout: 60 # lock after 60 minutes of inactivity
check_interval: 30 # check every 30 secondsTo disable auto-lock entirely (not recommended):
vault:
auto_lock_timeout: 0Independent of the vault lock, the authentication session also has a timeout.
After auth.session_timeout minutes of inactivity, the user must log in
again (but the vault stays unlocked if the timeout has not passed).
auth:
session_timeout: 30 # re-authenticate after 30 min idle
max_failed_attempts: 5 # lock out after 5 failed attempts
lockout_duration: 60 # initial lockout: 60 seconds
escalated_lockout: 900 # escalated lockout: 15 minutes