Overview
Rexec provides screen-level security features:- Screen Lock: Auto-lock after inactivity
- Passcode Protection: 6-digit PIN for unlocking
- Single Session Mode: Prevent concurrent logins
- Terminal MFA Lock: Lock individual terminals with MFA
Screen lock is separate from MFA. It’s a lightweight protection for shared workstations.
Get security settings
GET/api/security
Retrieve current security configuration.
curl
Whether screen lock is enabled
Minutes of inactivity before auto-lock (default: 15)
Whether single session mode is enabled
Whether a passcode is set
Set passcode
POST/api/security/passcode
Set or change the screen lock passcode.
6-digit numeric passcode
Required when changing existing passcode
Auto-lock timeout (5-120 minutes)
curl
Update settings
PATCH/api/security
Update auto-lock timeout.
Minutes before auto-lock (5-120)
curl
Lock account
POST/api/security/lock
Manually lock the account immediately.
curl
Unlock account
POST/api/security/unlock
Unlock with passcode. Returns a new JWT token.
6-digit passcode
curl
New JWT token (previous token is invalidated)
Updated user object
Remove passcode
DELETE/api/security/passcode
Disable screen lock by removing passcode.
Current passcode to confirm
curl
Single session mode
POST/api/security/single-session
Enable or disable single session mode. When enabled, logging in from a new location revokes all other sessions.
Enable or disable single session mode
curl
Terminal MFA lock
Lock individual terminals with MFA protection.Get terminal MFA status
GET/api/security/terminal/:containerId/mfa-status
curl
Whether terminal is MFA-locked
ISO timestamp when locked
Lock terminal
POST/api/security/terminal/:containerId/mfa-lock
Require MFA code to access this terminal.
curl
MFA must be enabled on your account to use terminal locks.
Unlock terminal
POST/api/security/terminal/:containerId/mfa-unlock
6-digit MFA code
curl
Verify MFA for temporary access
POST/api/security/terminal/:containerId/mfa-verify
Verify MFA for temporary access without permanently unlocking.
6-digit MFA code
curl
Error codes
| Code | Message | Description |
|---|---|---|
| 400 | Invalid passcode format | Passcode must be 6 digits |
| 401 | Incorrect passcode | Wrong passcode provided |
| 403 | Account locked | Must unlock before access |
| 404 | No passcode set | Cannot unlock without passcode |
| 429 | Too many attempts | Rate limited after failed unlocks |
Best practices
- Set auto-lock for shared workstations (5-15 minutes)
- Use single session mode for high-security accounts
- Lock sensitive terminals with MFA
- Don’t share passcodes—they’re per-user
- Test unlock before relying on screen lock
Related
- MFA Setup - Two-factor authentication
- Authentication Guide - Security overview
- Sessions - Session management