user-security
user-security 策略可用于抽取用户凭证、对这些凭证进行认证以及获取来自用户的授权。
网关支持
| 网关 | 策略版本 |
|---|---|
| DataPower® API Gateway | 2.0.0 |
本主题描述如何在 OpenAPI 源中配置策略;有关如何在组合件用户界面中配置策略的详细信息,请参阅用户安全性。
关于
user-security 策略的格式如下:
- user-security:
version: version
title: title
description: description
factor-id: factor ID
extract-identity-method: method_used_to_extract_credentials
.
.
.
properties_specific_to_the specified_identity_extraction_method
.
.
.
user-auth-method: authentication_method
.
.
.
properties_specific_to_the specified_authentication_method
.
.
.
user-az-method: authorization_method
.
.
.
properties_specific_to_the specified_authorization_method
.
.
.
属性
| 属性 | 必需 | 描述 | 数据类型 |
|---|---|---|---|
| version | 否 | 策略版本号 | 字符串 |
| title | 否 | 策略的标题。 | 字符串 |
| description | 否 | 对策略的描述。 | 字符串 |
| factor-id | 否 | 用于识别 API 上下文中的因子认证结果的身份。 | 字符串 |
| extract-identity-method | 是 | 选择要用于抽取用户凭证的方法。可用选项如下:
|
字符串 |
| user-auth-method | 是 | 选择认证方法。可用选项如下:
|
字符串 |
| user-az-method | 是 | 选择授权方法。可用选项如下:
|
字符串 |
示例
# basic authentication with LDAP registry
- user-security:
version: 2.0.0
title: user-security
factor-id: default
extract-identity-method: basic
ei-stop-on-error: true
user-auth-method: ldap
ldap-registry: corporate-ldap
au-stop-on-error: true
user-az-method: authenticated
az-stop-on-error: true