A AuthMS API Wiki API Reference iam.tianv.com →

PUT /admin/tenants/{id}/security-policy

更新指定租户的安全策略配置

租户服务 `bearerAuth` application/json

Request Parameters

NameInTypeRequiredDefaultExampleConstraintsDescription
id path string Yes 租户ID

Request Body

Schema: dto.UpdateSecurityPolicyRequest

FieldTypeRequiredExampleConstraintsDescription
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

StatusDescriptionSchema
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

密码策略详细配置

FieldTypeRequiredExampleConstraintsDescription
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

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.SecurityPolicyResponse No
message string No
timestamp string No

dto.SecurityPolicyResponse

租户安全策略配置

FieldTypeRequiredExampleConstraintsDescription
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

会话策略详细配置

FieldTypeRequiredExampleConstraintsDescription
max_concurrent_sessions integer No 10 最大并发会话数
timeout_seconds integer No 1800 会话超时(秒)

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No