Creating Custom Roles in DataHub: Best Practices and Limitations

Original Slack Thread

<@U06TM7M40RK> How to add custom role ?

Currently, DataHub does not support the creation of custom roles directly through the UI or configuration files. According to the <https://github.com/datahub-project/datahub/blob/master/docs/authorization/roles.md|DataHub documentation on roles>, there are only three built-in roles: Admin, Editor, and Reader. However, you can achieve additional flexibility by using policies to define more granular permissions and access controls.

If you attempt to create custom roles by modifying the role.json file, be aware that this approach is not officially supported and may lead to compatibility issues in the future. The DataHub team has indicated plans to build support for defining custom roles through the UI at some point, but there are no guarantees on compatibility if you override the role.json file (<Slack conversation on custom roles>).

Would you like more details on how to use policies for more granular access control, or do you have any other questions?

Sources:

Hi <@U07V74DLC0K>, how did my answer work out for you? Need any more assistance? You can also tag <@U07FV3UHE4D> to let your fellow community members know you’re still looking for guidance.