Adaptive Risk Login & Multi-Factor Authentication (MFA / 2FA)
Okustera combines Adaptive Risk-Based Login Protection with Time-based One-Time Password (TOTP) Multi-Factor Authentication (MFA / 2FA) to protect customer accounts against credential stuffing, automated botnets, and brute-force attacks while supporting ISO/IEC 27001 (Control A.8.2) and EU NIS2 (Article 21) access control requirements.
Adaptive Risk-Based Login Protection
Every authentication request (POST /api/v1/auth/login and POST /api/v1/auth/2fa/verify) is automatically evaluated by Okustera's adaptive risk engine before credential verification completes. The engine inspects behavioral and network signals—including recognized device trust, transport security posture, and anomalous login velocity—to respond proportionally without adding friction to legitimate users:
| Risk Level | Typical Conditions | Platform Enforcement |
|---|---|---|
| Low Risk | Recognized trusted device, clean network reputation, modern TLS client posture. | Direct Pass-Through (200 OK): Proceeds directly to standard credential and TOTP 2FA verification. |
| Elevated Risk | Unrecognized device, repeated failed login attempts, or anomalous client characteristics. | Interactive Step-Up Challenge (HTTP 403): Requires completing a self-hosted, sovereign human-verification challenge before authentication proceeds. |
| High Risk | Sustained brute-force activity, multi-account credential stuffing patterns, or deprecated/malicious client signatures. | Temporary Rate-Limit (HTTP 429): Requests are throttled immediately with a cool-down window to protect account availability and credentials. |
All risk evaluation and step-up verification run entirely inside Okustera's sovereign infrastructure with zero third-party tracking scripts or external CAPTCHA data transfers.
Setting up 2FA in the Cloud Portal
Step-by-Step Activation Guide
- Log into the Okustera Cloud Portal.
- Click your profile icon in the upper right navigation bar and select Settings (
/settings). - Under the Two-Factor Authentication (2FA) section, click Enable Two-Factor Authentication.
- A secure setup modal will display:
- QR Code: Scan this code with your mobile authenticator app (Google Authenticator, Microsoft Authenticator, 1Password, Bitwarden, Authy).
- Manual Entry Key: If your device camera is unavailable, copy the alphanumeric setup secret into your authenticator app.
- In the Verification Code input field, enter the current 6-digit code displayed in your authenticator app.
- Click Verify and Activate.
- Once activated, your profile status will update to 2FA Protected. All subsequent logins will prompt for a 6-digit code upon entering your password.

Disabling 2FA
To disable two-factor authentication:
- In the Settings page (
/settings), click Disable 2FA. - For security validation, enter a current 6-digit code from your authenticator app.
- Confirm the action to deactivate 2FA.
Authenticating with 2FA via API & CLI
When 2FA is active on an account, programmatic API logins and Terraform authentication require passing the current 6-digit TOTP code alongside your credentials.
API Login (POST /api/v1/auth/login)
curl -X POST https://portal.okustera.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"username": "<YOUR_USERNAME>",
"password": "<YOUR_PASSWORD>",
"totp_code": "<6_DIGIT_TOTP_CODE>"
}'
The endpoint validates both factors and returns a signed JWT access token.
Terraform Provider Authentication
You can pass your TOTP verification code to the Okustera Terraform provider via variables or environment variables:
provider "okustera" {
api_endpoint = "https://portal.okustera.com/api/v1"
username = var.okustera_username
password = var.okustera_password
totp_code = var.okustera_totp_code # Required when 2FA is enabled
tenant_id = var.okustera_tenant_id
}
Or configure via environment variables:
export OKUSTERA_USERNAME="<YOUR_USERNAME>"
export OKUSTERA_PASSWORD="<YOUR_PASSWORD>"
export OKUSTERA_TOTP_CODE="123456"
export OKUSTERA_TENANT_ID="tenant-production"
terraform apply
For automated CI/CD pipelines (GitLab CI, GitHub Actions), do not use user credentials with dynamic 2FA codes. Instead, use a scoped Personal Access Token (PAT) or Kubernetes Workload Identity, which bypass interactive 2FA checks while maintaining least-privilege scoping.
REST API Reference
POST /api/v1/auth/login— Primary adaptive risk login endpoint; validates credentials and optional TOTP code, issuing a signed JWT session token.POST /api/v1/auth/2fa/setup— Generate a new TOTP secret key and QR code provisioning URI.POST /api/v1/auth/2fa/activate— Submit an initial 6-digit verification code to activate 2FA on the user account.POST /api/v1/auth/2fa/verify— Validate a 6-digit TOTP code during an authentication challenge.POST /api/v1/auth/2fa/disable— Provide a valid 6-digit code or account password to deactivate 2FA.