Scim规范是否定义了如何指定嵌套对象的筛选器?

huangapple go评论108阅读模式
英文:

Does the scim spec define how to specify a filter for nested objects?

问题

Sure, here's the translated content:

如果我有这样的数据:

{
  "source": {
    "id": "someStr",
    "type": "someTypeStr",
    "someObj": {
      "objId": "someStr",
      "numField": 2
    }
  },
  "destination": {
    "id": "someStr",
    "type": "someTypeStr",
    "someObj": {
      "objId": "someStr",
      "numField": 2
    }
  }
}

在想要筛选像 source.id PRdestination.type co "something" 这样的筛选条件时是有效的。然而,我不确定在“someObj”字段内如何进行正确的 SCIM(System for Cross-domain Identity Management) 筛选。我似乎找不到规范中有关此内容的信息,是否有一种被接受的方式来表示类似 source.someObj.numField eq 2 这样的筛选条件?

英文:

If I have data that looks like this:

{
  "source": {
    "id": "someStr",
    "type": "someTypeStr",
    "someObj": {
      "objId": "someStr",
      "numField": 2
    }
  },

  "destination": {
    "id": "someStr",
    "type": "someTypeStr",
    "someObj": {
      "objId": "someStr",
      "numField": 2
    }
  }
}

Filtering works fine when we want to filter someting like source.id PR or destination.type co "something". However, I'm not sure what the proper scim way is to filter on the "someObj" field within? I can't seem to find anything in the spec about this, is there a accepted way to represent a filter like source.someObj.numField eq 2?

答案1

得分: 1

这部分内容的中文翻译如下:

这在规范中没有定义,因为不允许这样做。复杂属性不能包含自身是复杂属性的子属性。参见:https://datatracker.ietf.org/doc/html/rfc7643#section-2.3.8

复杂属性不得包含具有子属性(即复杂属性)的子属性。

筛选规则/语法不考虑这一点,因为在SCIM中不可能实现。

英文:

This is not defined in the spec because it is not allowed. Complex attributes cannot have sub-attributes that are themselves complex attributes. See: https://datatracker.ietf.org/doc/html/rfc7643#section-2.3.8

>> A complex attribute MUST NOT contain sub-attributes
that have sub-attributes (i.e., that are complex).

The filter rules/syntax do not account for this because it is not possible in SCIM.

huangapple
  • 本文由 发表于 2023年4月6日 22:09:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/75950498.html
  • scim
  • scim2
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定