StackStorm / StackStorm/st2-rbac-backend

RBAC permissions to allow user to only list actions for certain packs

Open
#64 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
5
Forks
13
PR merge metrics
No merged PRs in 30d

Description

This issue arose from the discussions in https://github.com/StackStorm/st2docs/issues/1107 in regard to the behaviour in the example in the documentation.

In the current example the user had permissions

permission_grants:
    -
        resource_uid: "pack:example"
        permission_types:
           - "pack_all"
           - "sensor_type_all"
           - "rule_all"
           - "action_all"

With this permission the user was unable to run "st2 action list" or "st2 action list -p example".

The only way the user could list the actions in the pack was to add the global action_list permission, and then they were able to list the actions in that and all other packs.

See the comments in the existing issue from @satellite-no https://github.com/StackStorm/st2docs/issues/1107#issuecomment-1024523164, and @amanda11 https://github.com/StackStorm/st2docs/issues/1107#issuecomment-1025647544 about two different possibilities of how the permissions could be viewed/altered to support restricting the list to certain packs.

Contributor guide

No contributing guide indexed for this repository

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 permission_grants example and the st2 action list and st2 action list -p example behavior described here. Read the linked st2docs issue and its comments to resolve which permission model is intended; done means a user can list actions for permitted packs without listing actions from other packs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authorization, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.