Skip to main content


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.

Basic example

In the basic case an application uses the same object identifiers as the identifiers it uses internally, for example:

  • UUIDv4: 61e75133-efff-4281-8148-a1806919f568
  • SHA-1: 5c6f593a4e12970d647843f97846fd5ed18179eb

See this in a real-life example.

Advanced 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:

  1. A single source of truth and easy data updates
  2. Free choice of encoding (Ory Permissions doesn't allow the : # @ characters)
  3. 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:

greater_than: 5

greater_than: 2
smaller_equal: 5

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.