Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: should meta attribute object be returned in the response from the /ResourceTypes discovery endpoint? #177

Open
seikenberry9 opened this issue Sep 17, 2024 · 1 comment

Comments

@seikenberry9
Copy link

We are building a SCIM server using this library. When compliance testing it with scim2-compliance-test-utility, the following error is returned from the /ResourcesTypes endpoint: error: object has missing required properties (["meta"]).

Should the meta attribute object be included in the response? For reference, the response from our /ResourcesTypes endpoint:

{
  "Resources": [
    {
      "description": "User Account",
      "endpoint": "/Users",
      "id": "User",
      "name": "User",
      "schema": "urn:ietf:params:scim:schemas:core:2.0:User",
      "schemaExtensions": [
        {
          "required": true,
          "schema": "urn:ietf:params:scim:schemas:extension:companyname:2.0:User"
        }
      ],
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:ResourceType"
      ]
    },
    {
      "description": "Group",
      "endpoint": "/Groups",
      "id": "Group",
      "name": "Group",
      "schema": "urn:ietf:params:scim:schemas:core:2.0:Group",
      "schemaExtensions": [],
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:ResourceType"
      ]
    }
  ],
  "itemsPerPage": 100,
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "startIndex": 1,
  "totalResults": 2
}
@ivixvi
Copy link

ivixvi commented Dec 30, 2024

No, the meta attribute object does not need to be included in the response.

Based on what I found, the following specifications seem to be related to the meta attribute of ResourceType.

Each SCIM resource (Users, Groups, etc.) includes the following
common attributes. With the exception of the "ServiceProviderConfig"
and "ResourceType" server discovery endpoints and their associated
resources, these attributes MUST be defined for all resources,
including any extended resource types.
https://datatracker.ietf.org/doc/html/rfc7643#section-3.1

As described above, it seems that the resource in question is not required to have the meta attribute.

Additionally, in the ResourceType section, there is no mention of whether the meta attribute should or should not be included.
cf. https://datatracker.ietf.org/doc/html/rfc7643#section-6

However, in the examples, the meta attribute is included.
cf. https://datatracker.ietf.org/doc/html/rfc7643#section-8.6

Based on the above, a possible interpretation could be that for ResourceType, the inclusion of meta is optional.
I'm happy to be corrected if I've overlooked anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants