-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documented instructions for RBAC role permissions are incorrect #1107
Comments
it's a bit difficult without the RBAC roles, and assignment files. Could you also add those? |
For sure @amanda11, /opt/stackstorm/rbac/roles/example_pack_owner.yaml
/opt/stackstorm/rbac/assignments/rbac_user1.yaml
|
So in your output it indicates the permissions that are missing:
So you have not granted the user rbac_user1 the action_execute permission on the action core.local. To create objects you need more than permissions on the pack. If you create the rule first with another user, then with your permissions they should then have permission to run the command. Or alternatively look at the error in detail to see which permission and objects it is reporting on. |
I understand it outputs what permission is missing but that goes against what is in the example docs which makes me believe it's not working as intended (i.e a bug). For example never in the doc example does it say it needs Either way something needs to be updated, correct?
|
So it looks like there are some problems in the documentation...
But that wasn't included in the example further down, so the documentation needs to add permission for the core.local action. And make that clearer. So in the case of the rule the example acts, as the rule calls core.local, you also need to have action_execute permission on the core.local action. This is by design, and required. For instance, otherwise you could be creating a timer rule that would run the action core.local, so it would be a way for you to be able to run an action you didn't have permission to - so this is incorrect in the example, and not documented clearly.
@satellite-no Could you update the description with the version of ST2 that you are using and the O/S? I think if you add the permission to be able to execute the action the rule is trying to run, then you should find that the rule can now be created by that user.
You don't need to give the whole core pack action_execute permission, just the action that the rule references. The example is also wrong, in suggesting the user has permissions to do a full global action list, as that permission hasn't been granted, so the user of "st2 action list" in the example is also wrong in the documentation. If you can re-test, and we can confirm that it is documentation that is wrong, then we can move this issue to the st2docs repo. But I want to first have it confirmed that its documentation for the version you are using as well. |
VersionUpdated the description and here OS is:
Config Updatesafter updating role to match yours posted it works for me as well. 👍
Followup on ListingIf I include the below it works and lists all actions. Though the way the docs read using I know this is more of a feature at this point but you know food for thought. :)
|
Thanks for the update. If your amenable I think we should split this into two issues:
There is the point you mentioned, as to whether action_list should allow you to see all, if you only have list permissions on certain packs. Alternatively, I think there is another interpreation whereby you might think that with your original permissions, that the following command would work: So I think as it currently stands you can only perform an action list if you have the global permission, and there isn't a way to just see the actions in a pack you are permitted to list. If that sounds ok with you, then I suggest we fork this out into two separate issues for the two areas. If that sounds ok, I can convert this one into st2docs for the documentation update, and a related one in this repo for the action list for a particular pack. |
@amanda11, |
This issue will now solely deal with the issue that the example in st2docs for RBAC is incorrect, and should be amended as per details above. |
Hi,
Maybe this is something I'm doing wrong but been playing with this for awhile and seems pretty straight forward but no matter what the permissions to an object are, none get applied only global level permissions work (action_list, execution_list, etc.)
The below is the commands I ran w/output and the st2.conf, nothing is special about this its basiclly copy and paste from RBAC documentations. https://docs.stackstorm.com/rbac.html#using-rbac-example
Command ran and output
st2.conf
The text was updated successfully, but these errors were encountered: