1

I am struggling to find documentation or a recommendation on how to name the schema id for a custom SCIM resource.

{
  "id": "urn:ietf:params:scim:schemas:mycompany:2.0:MyResource",
  "name": "MyResource",
  "description": "MyResource description",
  "attributes": [
    {
      "name": "name",
      "type": "string",
      "multiValued": false,
      "description": "A human-readable name for MyResource. REQUIRED.",
      "required": true,
      "caseExact": true ,
      "mutability": "readWrite",
      "returned": "default",
      "uniqueness": "none"
    }
  ],
  "meta": {
    "resourceType": "Schema",
    "location": "/v2/Schemas/urn:ietf:params:scim:schemas:mycompany:2.0:MyResource"
  }
}

Should it use the same prefix as the builtin schemas? urn:ietf:params:scim:schemas:

Or rather just my custom stuff? urn:mycompany:scim:schemas:MyResource

I am using SCIM2.

stefanfoulis
  • 649
  • 4
  • 16

3 Answers3

3

Also, although there are no definitive guidelines for the naming convention of proprietary resources, I would recommend making the schema naming a per-provider configuration within your Service Provider or client. The reason being that some implementations literally don't care, and you can do what you want. However, Azure AD's SCIM client will not allow you to create a mapping to a custom attribute that does not follow one of these formats:

urn:ietf:params:scim:schemas:extension:2.0:CustomExtensionName:CustomAttribute

or

urn:ietf:params:scim:schemas:extension:CustomExtensionName:2.0:User.CustomAttributeName:value

Where CustomExtensionName, CustomAttribute, and CustomAttributeName:value can be changed to suit your model.

You don't want to implement someone's made-up idea of a standard to find that is in conflict with another implementation. So make it as dynamic as possible, within reason.

Neil
  • 66
  • 6
1

Like you, I did not find any resource that clearly indicates the best practices. But the way Oracle does it seems clean:

For a new resource: urn:ietf:params:scim:schemas:mycompany:core:2.0:NewResource

For an attribute extension, ie on User: urn:ietf:params:scim:schemas:extension:mycompany:2.0:User

Max Xapi
  • 750
  • 8
  • 22
1

The SCIM 2.0 RFC 7643 Section 10 contains a section regarding the IANA registration of the "scim" namespace ID, along with an optional registration process for adding schema URIs.

Although I haven't found any complete best practices around this topic either, I would propose using the "urn:ietf:params:scim:schemas" if you intend for your schemas to be standardized and utilized more broadly, and you are able to follow the registration process and requirements outlined in the RFC.

Otherwise, utilizing a company-based / proprietary namespace seems appropriate, e.g. urn:mycompany:scim:schemas:core:MyResource:1.0 or urn:mycompany:scim:schemas:extension:MyResource:myExtension:1.0.

Community
  • 1
  • 1
shelley
  • 7,206
  • 4
  • 36
  • 63