Docs/Account/Guides/Tenant Settings

Tenant Settings

Every tenant in Vyntech Account has a settings object that controls security policies, session behavior, risk engine thresholds, branding, and notifications. This guide covers the full settings structure, how to read and update settings via the API, and common configuration patterns for different security postures.

Overview

Tenant settings are stored as a JSON object in the database and cached in Redis for fast access. When you update settings via the API, changes take effect immediately — the cache is invalidated and all subsequent authentication and authorization operations use the new values.

The settings object is divided into logical sections. You can update one section at a time or multiple sections in a single request. Updates use deep merge semantics — only the fields you include are changed; everything else remains untouched.

Deep merge behavior: If your current password_policy.min_length is 8 and you send a PATCH with {"password_policy": {"require_symbols": true}}, the min_length stays at 8. Only require_symbols is updated.

Settings Sections

The settings object contains 7 top-level sections. Each section controls a specific aspect of tenant behavior.

password_policy

Controls password strength requirements and rotation rules. Applied at registration, password change, and password reset.

FieldTypeDefaultDescription
min_lengthinteger8Minimum password length (4–128)
require_uppercasebooleantrueRequire at least one uppercase letter
require_lowercasebooleantrueRequire at least one lowercase letter
require_numbersbooleantrueRequire at least one digit
require_symbolsbooleanfalseRequire at least one special character
max_age_daysinteger0Force password rotation after N days (0 = disabled)
history_countinteger0Prevent reuse of last N passwords (0 = disabled)

mfa

Controls multi-factor authentication availability and enforcement for the tenant.

FieldTypeDefaultDescription
enabledbooleantrueWhether MFA is available for users to opt-in
enforcedbooleanfalseRequire all users to set up MFA
allowed_methodsstring[]["totp"]Accepted MFA methods: "totp", "webauthn"

session

Controls token lifetimes, idle timeouts, and concurrent session limits.

FieldTypeDefaultDescription
access_token_ttl_secondsinteger900Access token lifetime (60–86400)
refresh_token_ttl_secondsinteger604800Refresh token lifetime (3600–2592000)
idle_timeout_secondsinteger0Revoke session after inactivity (0 = disabled)
max_concurrent_sessionsinteger5Max active sessions per user (1–100)
absolute_timeout_secondsinteger0Force re-auth after N seconds regardless of activity (0 = disabled)

risk_engine

Controls the behavioral risk engine that scores login attempts and triggers challenges or blocks.

FieldTypeDefaultDescription
enabledbooleantrueEnable risk scoring on login
challenge_thresholdinteger70Score at which step-up MFA is required (1–99)
block_thresholdinteger90Score at which login is blocked (1–100)
challenge_typestring"mfa"Challenge method: "mfa" or "email_verification"
trust_device_daysinteger30Days a device is trusted after passing challenge (0 = never trust)

ip_access

IP allowlist/blocklist configuration. When enabled, restricts login to specific IP addresses or CIDR ranges.

FieldTypeDefaultDescription
enabledbooleanfalseEnable IP-based access control
modestring"allowlist""allowlist" (only listed IPs can access) or "blocklist" (block listed IPs)
addressesstring[][]IP addresses or CIDR ranges (e.g., "10.0.0.0/8", "203.0.113.42")

branding

Customize the appearance of hosted login pages and email templates.

FieldTypeDefaultDescription
logo_urlstringnullURL to company logo (displayed on login page)
primary_colorstring"#0066FF"Hex color for buttons and accents
company_namestringnullCompany name shown in emails and login page

notifications

Control which email notifications are sent to users automatically.

FieldTypeDefaultDescription
welcome_emailbooleantrueSend welcome email on user registration
login_alertbooleanfalseEmail users on new device/IP login
password_change_alertbooleantrueNotify users when password is changed

Reading Settings

Retrieve the full settings object for your tenant. The response includes all sections with their current values (including defaults for any fields you haven't explicitly set).

GET/api/v1/settings🔒 Auth

Retrieve the complete tenant settings object.

curl -X GET https://id.vyntech.com.au/api/v1/settings \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

Updating Settings

Update one or more settings sections with a single PATCH request. The API uses deep merge — only the fields you include in the request body are modified. Omitted fields retain their current values.

PATCH/api/v1/settings🔒 Auth

Update tenant settings (deep merge). Only include fields you want to change.

curl -X PATCH https://id.vyntech.com.au/api/v1/settings \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{ "password_policy": { "min_length": 12, "require_symbols": true, "max_age_days": 90, "history_count": 5 }, "session": { "access_token_ttl_seconds": 600, "idle_timeout_seconds": 1800, "max_concurrent_sessions": 3 } }'
Request Body
{
  "password_policy": {
    "min_length": 12,
    "require_symbols": true,
    "max_age_days": 90,
    "history_count": 5
  },
  "session": {
    "access_token_ttl_seconds": 600,
    "idle_timeout_seconds": 1800,
    "max_concurrent_sessions": 3
  }
}

Response behavior: The response always contains the complete settings object after the merge, so you can verify exactly what changed and confirm the final state.

Common Configurations

Here are three battle-tested configuration patterns for different security postures. Copy and adapt these to your needs.

Enterprise Security

Maximum security posture: strict password requirements, mandatory MFA, short sessions, aggressive risk engine. Ideal for financial services, healthcare, and government.

PATCH/api/v1/settings🔒 Auth

Enterprise security configuration — maximum protection.

curl -X PATCH https://id.vyntech.com.au/api/v1/settings \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{ "password_policy": { "min_length": 14, "require_uppercase": true, "require_lowercase": true, "require_numbers": true, "require_symbols": true, "max_age_days": 60, "history_count": 12 }, "mfa": { "enabled": true, "enforced": true }, "session": { "access_token_ttl_seconds": 300, "refresh_token_ttl_seconds": 28800, "idle_timeout_seconds": 900, "max_concurrent_sessions": 2, "absolute_timeout_seconds": 28800 }, "risk_engine": { "enabled": true, "challenge_threshold": 50, "block_threshold": 75, "trust_device_days": 7 } }'

Developer-Friendly

Balanced security with minimal friction: reasonable password rules, optional MFA, longer sessions for better developer experience. Good for internal tools and dev environments.

PATCH/api/v1/settings🔒 Auth

Developer-friendly configuration — balanced security with low friction.

curl -X PATCH https://id.vyntech.com.au/api/v1/settings \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{ "password_policy": { "min_length": 8, "require_uppercase": true, "require_lowercase": true, "require_numbers": true, "require_symbols": false, "max_age_days": 0, "history_count": 0 }, "mfa": { "enabled": true, "enforced": false }, "session": { "access_token_ttl_seconds": 3600, "refresh_token_ttl_seconds": 2592000, "idle_timeout_seconds": 0, "max_concurrent_sessions": 10 }, "risk_engine": { "enabled": true, "challenge_threshold": 80, "block_threshold": 95, "trust_device_days": 90 } }'

Compliance Mode

Meets common compliance requirements (SOC 2, HIPAA, PCI-DSS): password rotation, session limits, IP restrictions, and mandatory notifications. Suitable for regulated industries.

PATCH/api/v1/settings🔒 Auth

Compliance mode configuration — meets SOC 2, HIPAA, PCI-DSS requirements.

curl -X PATCH https://id.vyntech.com.au/api/v1/settings \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{ "password_policy": { "min_length": 12, "require_uppercase": true, "require_lowercase": true, "require_numbers": true, "require_symbols": true, "max_age_days": 90, "history_count": 10 }, "mfa": { "enabled": true, "enforced": true }, "session": { "access_token_ttl_seconds": 900, "refresh_token_ttl_seconds": 86400, "idle_timeout_seconds": 1800, "max_concurrent_sessions": 3, "absolute_timeout_seconds": 43200 }, "ip_access": { "enabled": true, "mode": "allowlist", "addresses": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"] }, "notifications": { "welcome_email": true, "login_alert": true, "password_change_alert": true } }'

IP restriction warning: When enabling IP allowlist mode, make sure your current IP is included in the addresseslist. Otherwise, you'll lock yourself out of the API. Include your admin network and any CI/CD IPs.

Best Practices

Test in staging first

Always apply settings changes to a staging tenant before production. Misconfigured session timeouts or IP restrictions can lock out all users — including admins. Verify the behavior with a test user account.

Communicate changes to users

When tightening security (enforcing MFA, reducing session length, requiring password rotation), notify users in advance. A surprise lockout generates support tickets and frustrates users who weren't prepared for the change.

Don't lock yourself out

Before enabling IP restrictions or lowering max sessions to 1, ensure you have an active admin session that won't be affected. The settings API respects the current session — your active token remains valid until it expires, giving you a window to revert if needed.

Use the schema endpoint for validation

Call GET /api/v1/settings/schema to retrieve the full JSON Schema for settings. Use this to validate values client-side before submitting, or to dynamically build settings forms in your admin UI.

Audit log tracks all changes

Every settings update is recorded in the audit log with the full before/after diff, the actor (user ID), IP address, and timestamp. Use GET /api/v1/audit-logs?action=settings.updated to review the history of settings changes for compliance or troubleshooting.

What's Next

We use cookies and similar technologies to measure traffic and improve the site. You can choose which categories to allow. Manage Preferences.