Skip to content

SetSecurityPolicy

Replaces the platform-wide password and authentication throttling policy. Use custom to set individual values. For standard or strong, the server normalizes settings to that profile's fixed defaults.

PUT

https://{some_domain}/mng/security/policy

Authorization

Requires an authenticated staff session whose manager record has super_admin: 1.

Request

Send the complete policy object, including both password and bruteforce objects. When profile is custom, all fields shown below are required. For standard profiles, provide only the profile names; any extra values are normalized to profile defaults.

{
  "password": {
    "profile": "custom",
    "min_length": 12,
    "require_uppercase": true,
    "require_lowercase": true,
    "require_digit": true,
    "require_special": false,
    "reject_common": true
  },
  "bruteforce": {
    "profile": "custom",
    "window_seconds": 900,
    "password_attempts": 8,
    "otp_attempts": 4,
    "initial_block_seconds": 60,
    "max_block_seconds": 900,
    "ip_attempts": 200,
    "ip_block_seconds": 60
  }
}

Ranges: password min_length is 6–128; brute-force window_seconds 60–86400, password_attempts 1–100, otp_attempts 1–10, initial_block_seconds 1–3600, max_block_seconds from initial_block_seconds through 86400, ip_attempts at least password_attempts and at most 10000, and ip_block_seconds 1–86400. Password max_length is fixed at 128 and is returned by reads; it is not a settable field.

Request Fields

Field Type Required Description
password.profile string Yes compatible, standard, strong, or custom. For custom, all password policy fields below are required.
password.min_length integer Custom only Minimum password length, 6–128 Unicode code points.
password.require_uppercase boolean Custom only Require an ASCII uppercase letter.
password.require_lowercase boolean Custom only Require an ASCII lowercase letter.
password.require_digit boolean Custom only Require an ASCII digit.
password.require_special boolean Custom only Require an ASCII punctuation/symbol character.
password.reject_common boolean Custom only Reject common and repeated-character passwords.
bruteforce.profile string Yes standard, strong, or custom. For custom, all brute-force fields below are required.
bruteforce.window_seconds integer Custom only Attempt accounting window. Range 60–86400 seconds.
bruteforce.password_attempts integer Custom only Password attempt limit, 1–100 per identity/window.
bruteforce.otp_attempts integer Custom only OTP attempt limit, 1–10 per identity/window.
bruteforce.initial_block_seconds integer Custom only First identity block duration, 1–3600 seconds.
bruteforce.max_block_seconds integer Custom only Maximum identity block, at least the initial duration and at most 86400 seconds.
bruteforce.ip_attempts integer Custom only IP attempt limit; at least password_attempts and at most 10000.
bruteforce.ip_block_seconds integer Custom only IP block duration, 1–86400 seconds.

Success Response

Returns the normalized full policy object:

{
  "password": {
    "profile": "custom",
    "min_length": 12,
    "max_length": 128,
    "require_uppercase": true,
    "require_lowercase": true,
    "require_digit": true,
    "require_special": false,
    "reject_common": true
  },
  "bruteforce": {
    "profile": "custom",
    "window_seconds": 900,
    "password_attempts": 8,
    "otp_attempts": 4,
    "initial_block_seconds": 60,
    "max_block_seconds": 900,
    "ip_attempts": 200,
    "ip_block_seconds": 60
  }
}

Errors

HTTP Error Description
400 INVALID_SECURITY_POLICY Missing fields, invalid types, unsupported profile, or a value outside its allowed range.
403 PERMISSION_DENIED Caller is not a SuperAdmin.
503 SECURITY_GUARD_UNAVAILABLE Policy could not be updated because the security manager is unavailable.