Entity Schemas#
Introduction#
An Entity Schema defines the structure of a set of entities and relations. Each Entity Schema is composed of the following.
A set of entity types, such as group, organization, or role.
Each entity type is defined by:
- A unique name.
- The entity context, for entities that always exist in the context of another entity.
A set of entity relation types, such as member, or owner.
Each entity relation type is defined by:
- A unique name.
- The entity type for the relation source entities.
- The entity type for the relation target entities.
- The relation cardinality.
A set of resource relation types, such as member containing:
- The entity type for the relation source entities.
- The resource type for the relation target, which can be Accounts or Database OAuth Clients.
Global groups#
An Entity Schema can support the storage of global account groups.
In order for that to be possible, the entity schema must enable the global-groups section,
which requires the schema to define:
- The
sys:global-account-groupentity type that represents Account Groups. - The
sys:global-account-group:memberresource relation type that represents the membership relation between an Account and an Account Group. - The Account Group property used as the entities unique value, which can be:
- The Account Group display name.
- The Account Group external identifier.
Database Scopes#
An Entity Schema can also support the storage of Database Scopes .
In order for that to be possible, the entity schema must enable the profile-scopes section,
which requires the schema to define a fixed set of entity types and relation types,
namely the sys:oauth-profile and sys:oauth-profile-scope entity types.
Configuration#
Entity Schemas can be created and edited via the Administration UI . However, the only currently available operations on them are the enable/disable of Global Groups or Database Scopes. It is not yet possible to create, edit, or view custom entity or relation types.
Alternatively, it is possible to use Config Specs to create or update Entity Schemas:
- The Config Spec “Creates or updates an entity schema to support groups” will create or update an Entity Schema with Global Group support.
- The Config Spec “Creates or updates an entity schema to support database scopes” will create or update an Entity Schema with Database Scopes support.