Rbac integration#5086
Conversation
arm4b
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
I left a comment below that'll help to integrate the rbac py package into st2.
…has been moved to st2common
|
As we're still waiting for TravisCI, wondering that there is also a need to test for @hnanchahal Can you please open a PR against the st2-packages to include something along the lines there: This will ensure that st2-apply-rbac-defintions binary is shipped with the |
|
CI reports some real issues. Please check the https://travis-ci.org/github/StackStorm/st2/jobs/744939156#L1775-L1787 with the instructions. Similar to previous PR, this needs another make requirements to update it all properly. |
|
|
arm4b
left a comment
There was a problem hiding this comment.
To recap the blockers for this PR:
- st2-packages need a change for enabling apply-rbac-defintions, described here in details: #5086 (comment)
- Some Unit Tests related to RBAC should be fixed, according to CI failure: https://travis-ci.org/github/StackStorm/st2/jobs/745513542#L2227
|
@armab I think the Unit test is failing because its not getting "default" from available_rbac_backends. Any pointers? def validate_rbac_is_correctly_configured(): |
|
@hnanchahal Right, the new state is that For instance, instructions like: recommends installing the |
Understood that part. But since the rbac-backend package is being included in the requirements for st2common, why the driver_loader is failing to pick up rbac backend. is not returning the default rbac backend. |
|
Are you referring to this https://travis-ci.org/github/StackStorm/st2/jobs/745513542#L2230-L2236 unit test failure case? From what I understand, the test enables rbac, auth and expects that it'll raise an error because previously RBAC wasn't available in the default installation. st2/st2api/tests/unit/test_validation_utils.py Lines 54 to 61 in 24ad843 Because RBAC package is now part of the core, I think the unit test case there should not expect error message (ValueError) anymore. Let's start from the point you mentioned, like more explicitly check that |
… validation pass.
…into rbac_integration
arm4b
left a comment
There was a problem hiding this comment.
The Unit tests are passing now, - that's some good progress 👍
However linting is unhappy due to minor formatting issues. Check the instructions here: https://travis-ci.org/github/StackStorm/st2/jobs/745963664#L1642-L1646 about how to fix it.
I also provided other minor comments we'll need to fix before merging this PR.
arm4b
left a comment
There was a problem hiding this comment.
Looks good now.
I've tested the produced packages myself and can confirm that RBAC worked.
|
@hnanchahal Thanks for working on this integration! We'll need st2docs update for the RBAC feature as a next step, see more details here: StackStorm/st2docs#1038 |
Integrate RBAC backend https://github.com/StackStorm/st2-rbac-backend into st2 core natively.