I don’t think I’ve every asked such a simple question 🙁
But how does one List Roles in Redshift ?
For groups you simply select from pg_groups.
Not so for roles, and surprisingly little documentation.
What am I missing ?
I don’t think I’ve every asked such a simple question 🙁
But how does one List Roles in Redshift ?
For groups you simply select from pg_groups.
Not so for roles, and surprisingly little documentation.
What am I missing ?
3
Answers
To list all roles defined in the Redshift cluster you can run
You can use the SVV_ROLES system view.
It does not contain a lot of information, but gives you:
I am a Redshift specialist.
This may be of interest;
https://www.redshiftresearchproject.org/white_papers/downloads/users_groups_roles_and_privileges.pdf
The official docs for roles are pretty much useless. That PDF will give you what the docs do not.
Note that roles can be granted to roles, so listing all roles isn’t completely helpful. You need to recurse, building up all the privs held by a role, either by itself, or by roles granted to it.
The Redshift Combobulator has a first page for roles, which does this, but it’s in closed beta.
https://www.redshiftresearchproject.org/combobulator/docs/cluster_roles_privs_v1.html