StackStorm / StackStorm/st2

RBAC Not working properly for pack installations

Open
#4,990 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation RBAC stale
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

SUMMARY

I have a role defined for the pack and have pack_all permission but when i try to install it errors stating that the access to action_execute for packs.install is missing.
If i add that, that opens up pack install/uninstall access for all packs even those not assigned to the role.

role.yaml: |

name: “role”
description: “”
enabled: true
permission_grants:
-
resource_uid: “pack:automation”
permission_types:
- “pack_all”
- “sensor_type_all”
- “action_all”
- “action_alias_all”
- “rule_all”

STACKSTORM VERSION

3.2.0

OS, environment, install method

Kubernetes, Stackstorm HA

Expected Results

pack_all role should allow the user to install/uninstall and register the pack for which the role is assigned.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the role.yaml example and the pack installation path involving packs.install, action_execute, and pack_all. Reproduce the behavior on StackStorm 3.2.0 in Kubernetes and trace how permissions are checked for the assigned pack; done means pack_all permits installation, uninstallation, and registration only for that pack.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authorization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.