【问题标题】:Wso2 Scim extentinon datatype errorWso2 Scim 扩展数据类型错误
【发布时间】:2017-08-18 14:37:29
【问题描述】:

所以我正在为 Wso2 扩展Scim Api。当我使用数据类型string 创建扩展时,所有扩展都可以正常工作。但是在我的 Ldap 中,我有很多其他自定义属性和属性,它们只使用 string 以外的其他数据类型,例如 operationalTelephone Number

我尝试更改扩展属性之一的数据类型值,但是当通过 Scim Api 请求该属性时,它只会导致 500 错误。

这是一个scim扩展配置的例子

[{
"attributeURI":"urn:scim:schemas:extension:enterprise:1.0:enterprise.homePhone",
"attributeName":"homePhone",
"dataType":"Telephone Number",
"multiValued":"false",
"multiValuedAttributeChildName":"null",
"description":"The User's phone",
"schemaURI":"urn:scim:schemas:extension:enterprise:1.0",
"readOnly":"false",
"required":"false",
"caseExact":"false",
"subAttributes":"null"
},

{
"attributeURI":"urn:scim:schemas:extension:enterprise:1.0:enterprise.shareDirectory",
"attributeName":"shareDirectory",
"dataType":"string",
"multiValued":"false",
"multiValuedAttributeChildName":"null",
"description":"The User's share dir",
"schemaURI":"urn:scim:schemas:extension:enterprise:1.0",
"readOnly":"false",
"required":"false",
"caseExact":"false",
"subAttributes":"null"
},

{
"attributeURI":"urn:scim:schemas:extension:enterprise:1.0",
"attributeName":"enterprise",
"dataType":"null",
"multiValued":"false",
"multiValuedAttributeChildName":"null",
"description":"SCIM wso2 User Schema Extension",
"schemaURI":"urn:scim:schemas:extension:enterprise:1.0",
"readOnly":"false",
"required":"false",
"caseExact":"false",
"subAttributes":"homePhone shareDirectory"
}]

如何在我的 Scim Api 中使用这些属性?我需要一些特殊的配置吗?

【问题讨论】:

  • 请显示导致 500 错误的代码。
  • 抱歉,我不确定 Wso2 的哪个内部部分会导致此问题

标签: ldap wso2 wso2is scim


【解决方案1】:

SCIM 支持一组数据类型。所以你必须在你的用户存储中为这些映射数据类型。

+-----------+-------------+-----------------------------------------+
| SCIM Data | SCIM Schema | JSON Type                               |
| Type      | "type"      |                                         |
+-----------+-------------+-----------------------------------------+
| String    | "string"    | String per Section 7 of [RFC7159]       |
|           |             |                                         |
| Boolean   | "boolean"   | Value per Section 3 of [RFC7159]        |
|           |             |                                         |
| Decimal   | "decimal"   | Number per Section 6 of [RFC7159]       |
|           |             |                                         |
| Integer   | "integer"   | Number per Section 6 of [RFC7159]       |
|           |             |                                         |
| DateTime  | "dateTime"  | String per Section 7 of [RFC7159]       |
|           |             |                                         |
| Binary    | "binary"    | Binary value base64 encoded per Section |
|           |             | 4 of [RFC4648], or with URL and         |
|           |             | filename safe alphabet URL per Section  |
|           |             | 5 of [RFC4648] that is passed as a JSON |
|           |             | string per Section 7 of [RFC7159]       |
|           |             |                                         |
| Reference | "reference" | String per Section 7 of [RFC7159]       |
|           |             |                                         |
| Complex   | "complex"   | Object per Section 4 of [RFC7159]       |
+-----------+-------------+-----------------------------------------+

参考:https://www.rfc-editor.org/rfc/rfc7643#section-2.3

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-09-25
    • 1970-01-01
    • 2012-09-06
    • 2021-08-10
    • 1970-01-01
    • 2023-03-11
    • 2013-12-28
    • 1970-01-01
    相关资源
    最近更新 更多