SCIM core
By: Anjana Samindra Perera
Tags: Information Technology, Computer Science, Provisioning, Scim, Programming

SCIM in depth

In this article, the main objective is to get in-depth knowledge of SCIM. The article is mainly based on RFC 7643. If you do not have much idea on what’s SCIM and where we should use it refer to those 2 articles.

1.Resource

SCIM 2.0 is basically based on an object model. Resource plays a major role in it. All other objects are derived from this. This resource is a JSON object which comprises 1 or more attributes. Attributes belong to one or more schemas.

The following diagram illustrates the object model in SCIM 2.0.

The object model of SCIM 2.0

Resource mainly comprise of the above ones. Here User contains common attributes like name, tel number where EnterpriseUser is an extension of it which has specific attributes specific to that application.

2.Schema

Schema is a collection of attributes and it’s also represented as a JSON object. It may be an entire or a partial resource. As an example, User resources contain the attributes defined in both of the following schemas.

urn:ietf:params:scim:schemas:core:2.0:User

urn:ietf:params:scim:schemas:extension:enterprise:2.0:User

3.Attributes

SCIM resource contains attributes and 1 attribute has the following characteristics.

Attributes characteristics

name-Unique name for the attribute

type- The data type of attribute

multiValued -Whether more than one value can be stored as attribute values.

description -A detailed explanation of the particular attribute

required-Mention whether this attribute is mandatory for the resource

caseExact-Whether the stored value in the attribute is case-sensitive

mutability -Whether the attribute values are modifiable

returned -Whether the attribute should be returned to the requested party in the SCIM response. It contains always(return every time),default(return if non empty),request(return only if specified in the attributes parameter),never(never return)

uniqueness-Whether there can be more than one resource consisting of the same value for this attribute.

Attributes can be categorized into below 3 categories considering the JSON representation.

Common Attributes - A resource's common attributes are those attributes that are part of every SCIM resource, regardless of the value of the "schemas" attribute present in a JSON body. These attributes are not defined in any particular schema but SHALL be assumed to be present in every resource, regardless of the value of the "schemas" attribute. Core Attributes - A resource's core attributes are those attributes that sit at the top level of the JSON object together with the common attributes (such as the resource "id"). The list of valid attributes is specified by the resource's resource type "schema" attribute (see Section 6 ). This same value is also present in the resource's "schemas" attribute. Extended Attributes - Attributes are specified by the resource’s resource type “schemaExtensions” attribute. extended attributes are kept in their own sub-attribute namespace identified by the schema extension URI.

And we can also categorize the attributes into the following 4 categories

Singular-simple attributes- Singular means it contains 1 most value and simple means data type is primitive. (ex- username)

Singular-complex attributes-Contains 1 value with the composition of simple attributes. (ex- 1 name consist of first name and last name)

Multivalued-simple attributes-More than 1 value and has a primitive data type

Multivalued-complex attributes-More than1 value and composition of more than simple attributes. (ex-email )

That’s all for this article where we understood the SCIM core. Let’s see you in a new article.