Change the password and session policy; audited with before and after
Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication
/api/v1/tenants/{tid}/security/password-policyChange the password and session policy; audited with before and after
Authentication: session cookie __Host-panel_session (contract default; see Authentication).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tid | path | string | required | |
X-CSRF-Token | header | string | optional | Required on unsafe requests authenticated by session cookie; API keys do not use it. |
Request body
required
Content type: application/json
min_lengthinteger requiredShortest password; at least the scope's floor, at most 64
min_classesinteger requiredKinds of characters (lower, upper, digit, other) required; 0 or 1 asks for no mix
- minimum 0
- maximum 4
block_commonboolean requiredRefuse common passwords and their simple variations (offline list)
block_contextboolean requiredRefuse a password containing the account's own name, e-mail or domain
Fields of PasswordRules are shown above.
Fields of PasswordRules are shown above.
Fields of PasswordRules are shown above.
breach_checkboolean requiredAsk the Have I Been Pwned range API with a 5-hex-digit SHA-1 prefix; off by default (ADR 0112)
force_changeboolean requiredSend panel users whose password fails the panel rules to the change page at their next sign-in
session_idle_minutesinteger required- minimum 5
- maximum 1440
session_max_hoursinteger required- minimum 1
- maximum 720
Example
{
"panel": {
"min_length": 0,
"min_classes": 0,
"block_common": true,
"block_context": true
},
"mailbox": {
"min_length": 0,
"min_classes": 0,
"block_common": true,
"block_context": true
},
"ftp": {
"min_length": 0,
"min_classes": 0,
"block_common": true,
"block_context": true
},
"database": {
"min_length": 0,
"min_classes": 0,
"block_common": true,
"block_context": true
},
"breach_check": true,
"force_change": true,
"session_idle_minutes": 5,
"session_max_hours": 1
}Responses
200 Policy
Content type: application/json
Fields of PasswordPolicy are shown above.
floorsmap<string, integer> requiredLowest minimum length per scope
common_countinteger requiredEntries in the offline common-password list
Example
{
"policy": {
"panel": {
"min_length": 0,
"min_classes": 0,
"block_common": true,
"block_context": true
},
"mailbox": {
"min_length": 0,
"min_classes": 0,
"block_common": true,
"block_context": true
},
"ftp": {
"min_length": 0,
"min_classes": 0,
"block_common": true,
"block_context": true
},
"database": {
"min_length": 0,
"min_classes": 0,
"block_common": true,
"block_context": true
},
"breach_check": true,
"force_change": true,
"session_idle_minutes": 5,
"session_max_hours": 1
},
"floors": {
"key": 0
},
"common_count": 0
}default Error
Content type: application/json
codestring requiredmessagestring requireddetails_redactedboolean requiredcorrelation_idstring requiredretryableboolean required