Skip to main content

Roles

Roles represents a collection of table groups. It is used to define and manage groups of tables in the configuration. The structure supports JSON, TOML, and YAML serialization formats. By default, the role system is disabled. To enable it, you have to specify enable_role_system: true and roles_file settings in both your router’s and coordinator’s config. Refer to the pkg/config/roles.go file for the most up-to-date configuration options.

Table Group

TableGroup represents a group of tables with associated roles and permissions.

Example

For example, let’s assume we have the following roles configuration:
When we try to connect to (any) database as user user1 and run a modify query, we get something like this: