StackStorm / st2-rbac-backend

RBAC backend for StackStorm (previously part of EWC aka StackStorm Enteprise)
https://docs.stackstorm.com/latest/rbac.html
Apache License 2.0
5 stars 12 forks source link

RBAC implementation for key value pair #55

Closed shivani-orch closed 2 years ago

shivani-orch commented 2 years ago

Implemented RBAC functionality and unit tests for key-value pairs for existing and new permission types. Previously, RBAC feature for key value pairs are not yet implemented.

RBAC is enabled in the st2.conf file. Access to a key value pair is checked in the KeyValuePair API controller.

This change requires KeyValuePair API changes at https://github.com/StackStorm/st2/pull/5354.

shivani-orch commented 2 years ago

We couldn't resolve why circleci checks have failed. Following is the error - . virtualenv/bin/activate; flake8 --config=lint-configs/python/.flake8 st2rbac_backend/ tests/ /bin/sh: 85: virtualenv/bin/activate: /tmp/st2/st2api: Permission denied

m4dcoder commented 2 years ago

Please make sure CIs are green before asking for reviews.

m4dcoder commented 2 years ago

@ashwini-orchestral The CIs are failing with the following. If you click on "Details" above next to the failed job, do you see the details?

. virtualenv/bin/activate; pylint -j 1 -E --rcfile=./lint-configs/python/.pylintrc --load-plugins=pylint_plugins.api_models --load-plugins=pylint_plugins.db_models st2rbac_backend/
************* Module st2rbac_backend.resolvers
st2rbac_backend/resolvers.py:726:35: E1101: Class 'PermissionType' has no 'KEY_VALUE_LIST' member (no-member)
make: *** [Makefile:115: .pylint] Error 2
ankita-orchestral commented 2 years ago

@m4dcoder - We have refactored the unit test cases as per your comment. Please review and let us know your feedback.

amanda11 commented 2 years ago

LGTM - with an imminent release of 3.6 do we need to make sure that this only goes in with the paired ST2 pair?