0

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?

bieno002
  • 405
  • 1
  • 5
  • 12
  • I'm having trouble understanding your example - are source and destination complex attributes? – Zollnerd Apr 06 '23 at 14:57
  • Yes they are. I'm probably not explaining this great, but we have a dataset where each datapoint consists of something like above, where is has a "source" object that has several attributes including attributes like "someObj" which themselves are attribute, and another "destination" object with the same attributes. So we have an api that takes a scim filter string to return filtered results. One way we'd like to filter is to say `source.someObj.objId co "something"`. From what I know, it seems like a scim filter is generally in the form of `field.attribute [operation] [value]`. – bieno002 Apr 06 '23 at 15:16

1 Answers1

1

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.

Zollnerd
  • 725
  • 4
  • 5