-
-
Notifications
You must be signed in to change notification settings - Fork 117
Description
By default, we include st2admin and stanley users. However, those are optional and can be changed with custom images and modified values. If using an external auth source (I use ldap), those user accounts might not be allowed, or might be for something/someone else (thinking of stanley). So, some environments might not want to assign stanley to be a system_user.
For something like st2.packs.images it is easy to override the list with an empty list []. That doesn't work for st2.rbac.* because st2.rbac.roles and st2.rbac.assignments are dicts/hashes which get merged together--st2.rbac.mappings is also a dict/hash, but it doesn't have any samples in it, so that needs no changes. So, there is not a clean way to remove st2.rbac.roles["sample.yaml"], st2.rbac.assignments["st2admin.yaml"], or st2.rbac.assignments["stanley.yaml"].
It's fairly simple to drop those entries but leave them commented as examples in the values. That way there is no inadvertent granting of privileges to the wrong stanley user, or to a non-existent st2admin user.
I have a branch with this fix prepared: https://github.com/cognifloyd/stackstorm-ha/tree/no-default-rbac-files
I will submit a PR later.