校验配置是否合法(当前仅支持SAML2配置校验) - ValidateConfig
功能介绍
校验配置是否合法(当前仅支持SAML2配置校验)。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,当前API调用无需身份策略权限。
URI
POST /v2/{project_id}/auth-config/validate-config
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID。 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
id | 否 | String | 认证配置id。 |
is_multi_domain_authenticate_enabled | 否 | Boolean | 是否支持多域。 |
auth_type | 否 | String | 认证类型。 RADIUS_GATEWAY:短信辅助认证 OAUTH2:OAUTH2认证 CLIENT_TOKEN:本地token认证 USER_PASSWORD:密码认证类型 SAML2:SAML 2.0 联邦认证 |
radius_gateway_config | 否 | RadiusGatewayConfig object | 短信辅助认证配置。 |
third_party_auth_config | 否 | ThirdPartyAuthConfig object | 第三方认证配置信息。 |
emergency_login_mode | 否 | String | 应急登录模式。 |
saml2_auth_config | 否 | Saml2AuthConfig object | SAML2认证配置信息。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
enable | 否 | Boolean | 是否启用。 |
app_id | 否 | String | 用户名。 |
password | 否 | String | 密码。 |
token_url | 否 | String | 获取token地址。 |
verification_cipher_url | 否 | String | 获取验证码地址。 |
cert_content | 否 | String | 证书内容(PEM)。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
update_type | 否 | String | 更新认证配置类型,认证类型为第三方单点登录时使用。 |
enable | 否 | Boolean | 是否启用。 |
update_object | 否 | String | 更新认证配置对象,认证类型为第三方单点登录时使用。 |
auth_type | 否 | String | 认证类型。 |
client_interface_config | 否 | InterfacesConfig object | 接口配置。 |
server_interface_config | 否 | InterfacesConfig object | 接口配置。 |
third_password_update_type | 否 | String | 更新认证配置类型,认证类型为第三方密码时使用。ADD代表新增,UPDATE代表修改,DELETE代表删除。 |
custom_definition | 否 | String | 自定义接口配置。 |
oauth_configs | 否 | String | oauth2配置。 |
ldap_configs | 否 | Array of LdapConfig objects | 单点登录配置信息列表。 |
third_password_name | 否 | String | 更新认证配置对象,认证类型为第三方密码时使用。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
apply_platform | 否 | String | 应用平台。 |
id | 否 | String | ID。 |
name | 否 | String | 名称。 |
type | 否 | String | 类型。 |
results | 否 | Map<String,String> | 结果。 |
pagination | 否 | Map<String,Object> | 分页信息。 |
request | 否 | InterfacesRequest object | 接口请求。 |
response | 否 | String | 响应。 |
result_check | 否 | String | 检查结果。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
method | 否 | String | 方法。 |
params | 否 | Map<String,String> | 请求参数。 |
headers | 否 | Map<String,String> | 请求头信息。 |
body | 否 | String | 请求体。 |
url | 否 | String | URL。 |
configs | 否 | Map<String,Object> | 配置。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
host | 否 | String | host。 |
port | 否 | Integer | 端口,取值范围1-65535,默认389。 |
base_dn | 否 | String | base_dn。 |
administrator_dn | 否 | String | 管理员dn。 |
administrator_password | 否 | String | 管理员密码。 |
user_dn | 否 | String | 用户dn。 |
use_ssl | 否 | Boolean | 是否启用ssl。 |
cert_content | 否 | String | 证书。 |
username_attribute | 否 | String | 用户名属性。 |
object_class | 否 | String | 用户ObjectClass。 |
security_type | 否 | String | 安全类型。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
identity_provider | 否 | String | 身份提供者名称。 |
access_server_address | 否 | String | 接入服务器地址。 |
unique_user_identifier | 否 | String | 唯一用户标识符。 |
idp_metadata_info | 否 | IdpMetadataInfo object | IDP元数据信息。 |
响应参数
状态码:200
ok。
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
请求示例
{
"id" : "c6e9d5eef0c7xxxxxxxxxx0303397d1e",
"is_multi_domain_authenticate_enabled" : true,
"auth_type" : "RADIUS_GATEWAY",
"radius_gateway_config" : {
"enable" : false
},
"third_party_auth_config" : {
"enable" : false
},
"emergency_login_mode" : "string",
"saml2_auth_config" : {
"identity_provider" : "aa",
"access_server_address" : "https://xxx.xxx.xxx.xxx",
"unique_user_identifier" : "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
"idp_metadata_info" : {
"id" : "000a7711f04xxxxxxxxxxb0733d87421",
"file_name" : "idp-metadata.xml",
"content" : "MIIDcjCCAlq...",
"content_length" : 1024,
"create_time" : 1741330304,
"update_time" : 1741256229
}
}
} 响应示例
无
状态码
状态码 | 描述 |
|---|---|
200 | ok。 |
400 | 由于包含语法错误,当前请求无法被服务器理解。 |
401 | 鉴权失败。 |
403 | 没有操作权限。 |
404 | 找不到资源。 |
500 | 服务内部错误,具体返回错误码请参见错误码说明。 |
错误码
请参见错误码。

