Objects are identifiers of entities in an application. For example, objects can represent files, network ports, or physical items. It's up to the application to map its objects to unambiguous identifiers. The name length limit for object identifiers is 64 characters.
We recommend using UUIDs as they provide a high entropy and therefore are unique identifiers. However, you can also use URLs or opaque tokens as identifiers. Objects are considered equal when their string representation is equal.
In the basic case an application uses the same object identifiers as the identifiers it uses internally, for example:
See this in a real-life example.
Since Ory Permissions can use arbitrary strings as objects, you can encode application data within the object. We strongly discourage this practice. Instead, use a UUID to map application data to Ory Permissions objects.
This is required to ensure:
- A single source of truth and easy data updates
- Free choice of encoding (Ory Permissions doesn't allow the
: # @characters)
- Unlimited data size
For example, this could be used to implement checks on value ranges. The application knows the following mapping of comparison conditions and UUIDs:
Ory Permissions has the following relationships:
// Members of the "admins" group are allowed to set a value v > 5
// Members of the "devs" group are allowed to set a value v: 2 < v <= 5
// Anyone who can set a value v > 5 can also set 2 < v <= 5
The application must translate an incoming "set value" request to the corresponding condition the value fulfills. It's important to understand that Ory Permissions doesn't know how to interpret this information. The application must pre-process and map the value to the corresponding UUID.