/admin/tenants/{id}/security-policy
更新指定租户的安全策略配置
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
|---|---|---|---|---|---|---|---|
id |
path |
string |
Yes | 租户ID |
Request Body
Schema: dto.UpdateSecurityPolicyRequest
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
allowed_ip_ranges |
array of string |
No | |||
blocked_countries |
array of string |
No | |||
lock_duration |
string |
No | |||
max_attempts_per_user |
integer |
No | |||
max_concurrent_sessions |
integer |
No | |||
mfa_required |
boolean |
No | |||
password_max_length |
integer |
No | |||
password_min_length |
integer |
No | |||
require_digit |
boolean |
No | |||
require_lowercase |
boolean |
No | |||
require_special |
boolean |
No | |||
require_uppercase |
boolean |
No | |||
session_timeout |
string |
No |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | 更新成功 | dto.SecurityPolicyDetailResponse |
| 400 | 请求参数错误 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 401 | 未认证 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 403 | 权限不足 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 404 | 资源未找到 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 500 | 服务器内部错误 | gitee_com_linmes_authms_base_dto.SimpleResponse |
Referenced Schemas
dto.PasswordPolicyConfig
密码策略详细配置
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
max_length |
integer |
No | 128 |
最大长度 | |
min_length |
integer |
No | 8 |
最小长度 | |
require_digit |
boolean |
No | True |
要求数字 | |
require_lowercase |
boolean |
No | True |
要求小写字母 | |
require_special |
boolean |
No | False |
要求特殊字符 | |
require_uppercase |
boolean |
No | True |
要求大写字母 |
dto.SecurityPolicyDetailResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
data |
dto.SecurityPolicyResponse |
No | |||
message |
string |
No | |||
timestamp |
string |
No |
dto.SecurityPolicyResponse
租户安全策略配置
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
ip_whitelist |
array of string |
No | IP白名单 | ||
mfa_required |
boolean |
No | True |
强制MFA | |
password_policy |
object |
No | 密码策略 | ||
session_policy |
object |
No | 会话策略 | ||
tenant_id |
string |
No | tnt_abc123 |
租户ID |
dto.SessionPolicyConfig
会话策略详细配置
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
max_concurrent_sessions |
integer |
No | 10 |
最大并发会话数 | |
timeout_seconds |
integer |
No | 1800 |
会话超时(秒) |
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
message |
string |
No | |||
timestamp |
string |
No |