Concepts
Roles and permissions
Read, Write and Manage on each perspective, and how a caller's roles are decided.
OmniCore separates who you are from what you may do. Who you are comes from a token issued by an identity provider; what you may do comes from OmniCore's own roles, kept in the database and checked on every call.
Roles
A role grants permissions per perspective:
| Permission | Allows |
|---|---|
| Read | Seeing entities that have the perspective, and the fields it declares. |
| Write | Creating entities with the perspective, changing the fields it declares, and adding or removing it on an entity. |
| Manage | Changing the perspective's definition, its views and forms, and fields used only by perspectives the caller manages. |
All grants all three. A caller's permissions combine across all their roles.
{
"description": "Sales team",
"permissions": { "Contact": ["Read"], "Customer": ["Read", "Write"] }
}System Admin
System Admin is built in and can't be changed or deleted. It has full control, and is the only role that can create perspectives, manage indexes, compact storage, manage roles and assignments, install plugins, and design workflows and dashboards.
How a caller's roles are decided
A caller's roles are the union of:
- the roles in their assignment, matched on their token's subject claim;
- any role claims in their token, when the server is set to read them (for example Entra ID app roles);
- System Admin, if their subject is one of the server's bootstrap admins, so the first administrator can never be locked out.
Role claim values match role names ignoring case, spaces and punctuation, because identity providers don't allow spaces:
the app role SystemAdmin grants System Admin, and FieldSales grants Field Sales.
What Read hides
- Fields and perspectives the caller can't read are removed from responses.
- Filtering, sorting or selecting on a field they can't read is a 403, so hidden values can't be probed.
- An entity they can't see is a 404: its existence isn't revealed.
- The schema, and the generated .NET connector, contain only what they can read.
- Aggregates count only entities they can see, and every field used must be readable.
What Write keeps
Saves keep the fields and perspectives the caller can't see: a PUT replaces only what they can see. Creating an entity needs Write on every perspective it will have, and deleting one needs Write on every perspective it has.
What Manage can't do
A manager can't add a field to their perspective if another perspective, which they don't manage, already uses it: that would show its values to their perspective's readers.
Managing roles
- In OmniCore Admin: the Roles and Assignments tabs.
- With the API, as a System Admin:
PUT /api/security/roles/{name}andPUT /api/security/assignments/{subject}.
Removing a role revokes access on the next request, but a token already issued stays valid until it expires.