Skip to content

Describe format of an object/user and object/user id #883

Open

Description

@YarrikV

The docs note the restrictions on the relations:

From here

In OpenFGA, relations can only have alphanumeric characters, underscores and hyphens. We recommend using underscore (_) to separate words and removing prepositions. E.g.: "can create a document" can become "can_create_document" or "create_document" if you are into brevity.

It would be helpful if the same kind of restrictions would be clarified on the other elements, such as the object type and identifier.

For example, you cannot use a ':' or '#' in the identifier, but I figured this out by trial-and-error. What other restrictions/limitations are there?

Activity

  1. Mario-Eis commented on Jun 17, 2026

    @Mario-Eis

    That is a very important issue! We use OpenFGA in our new project. The worst experince was, when we figured out (by trial and error) that the only way to use the API is by string concatenation. That is not only a major inconvenience, but also a huge attack vector from security perspective that leaves the door wide open for string injection.
    Also there is no guideance or real world examples on how to handle real input data that is more than hard coded example strings. Like: Can they be sanitized? What are the restrictions in characters, length, etc? Or whats the idea behind that?

  2. Mario-Eis commented on Jun 17, 2026

    @Mario-Eis

    Update: We figured out by trial and error, that *, : and # seem to be illegal characters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions