wso2 - 未添加帐户锁定属性以响应 wso2 中的 scim2 GET 用户 API
问题描述
我正在尝试检索在 WSO2 IS 5.9 版本中已锁定帐户的用户列表。在将帐户锁定属性添加到以下声明后,我尝试了:
瓮:ietf:参数:scim:架构:核心:2.0
urn:ietf:params:scim:schemas:core:2.0:User
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
我也按照以下 URL 添加了自定义声明: https ://is.docs.wso2.com/en/5.9.0/develop/extending-scim2-user-schemas/
{ "attributeURI":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:accountLock",
"attributeName":"accountLock",
"dataType":"boolean",
"multiValued":"false",
"description":"Account lock",
"required":"false",
"caseExact":"false",
"mutability":"readwrite",
"returned":"default",
"uniqueness":"none",
"subAttributes":"null",
"multiValuedAttributeChildName":"null",
"canonicalValues":[],
"referenceTypes":[]
}
但是我仍然无法获取 accountLock 属性以响应 scim2 的 GET Users API。
回复
“总结果”:10, “开始索引”:1, “itemsPerPage”:10, “模式”:[ “urn:ietf:params:scim:api:messages:2.0:ListResponse” ], “资源”: [ { “电子邮件”:[ “divya@abc.com” ], “元”:{ “创建”:“2020-06-25T07:49:35.465Z”, "lastModified": "2020-06-25T11:20:13.482Z", “资源类型”:“用户” }, “姓名”: { "givenName": "客人", “familyName”:“客人” }, “组”:[ { “显示”:“应用程序/sp1” }, { “显示”:“应用程序/sp2” }, { “显示”:“应用/读取” } ], “id”:“9ffbed2e-3703-470c-a2c8-e738f4c09709”, “用户名”:“guest12” } ]}```
解决方案
以下原因可能会导致 accoutLock 属性未出现在 SCIM2 GET 用户响应中。
您可能错过了添加新属性 ("urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:accountLock")作为urn:ietf:params:scim:schemas:extension:enterprise 的子属性: 2.0:用户对象。(https://is.docs.wso2.com/en/5.9.0/develop/extending-scim2-user-schemas/#extending-the-scim-20-api中的第 3 点。“subAttributes”:“ accoutLock verifyEmail问密码员工人数成本中心组织部部门经理")
"attributeURI":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User", "attributeName":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User", “数据类型”:“复杂”, “多值”:“假”, "description":"企业用户", “必需”:“假”, "caseExact":"假", “可变性”:“读写”, “返回”:“默认”, “唯一性”:“无”, "subAttributes":"acoutLock verifyEmail askPasswordemployeeNumbercostCenter组织部部门经理", “规范值”:[], “referenceTypes”:[“外部”] }```
添加的自定义声明(https://is.docs.wso2.com/en/5.9.0/develop/extending-scim2-user-schemas/#add-the-custom-claim)的映射属性应该是现有的如果您使用默认 LDAP 用户存储,则 LDAP 模式中的属性。(但是,如果您犯了这个错误,您将无法更新/添加索赔价值。它会给出
One or more attributes you are trying to add/update are not supported by underlying LDAP for user:
错误)SCIM2 GET 用户的响应不包含没有值的属性。因此,将 true/false 设置为声明值。
此外,将新属性添加到 urn:ietf:params:scim:schemas:extension:enterprise:2.0:User claim dialect 就足够了。按照https://is.docs.wso2.com/en/5.9.0/develop/extending-scim2-user-schemas/中的步骤操作
推荐阅读
- powershell - 打印 Active Directory 中的实际员工列表
- asp.net - ASP.NET 内存缓存和线程阻塞
- ruby - Ruby 正则表达式 - 从 html 字符串中删除空换行符
- amazon-web-services - 如何解决 AWS SAM 模板中的循环依赖
- reactjs - Azure IIS Rewrite 中的 React Router
- qt - 修改 Qt Widgets Application 模板
- node.js - 使用 MongoDb 将 Nuxt.js 通用应用程序和 Node.js 服务器部署到 Digital Ocean
- python - Python - 在扫描导入语句的字符串文字时 EOL
- html - 使父级的DIV 100%滚动高度
- listview - 在自定义 ViewCell 中显示 Microcharts.Chart