-
-
Notifications
You must be signed in to change notification settings - Fork 13
Initial enterprise RBAC backend implementation #1
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
Conversation
git-subtree-dir: lint-configs git-subtree-split: 418d2eb45bca36aa81294653bd19305eb685613b
StackStorm/st2) repo.
git-subtree-dir: lint-configs git-subtree-split: 418d2eb45bca36aa81294653bd19305eb685613b
integration tests targets.
|
WIP StackStorm/st2 change is located here - https://github.com/StackStorm/st2-private/pull/1. |
| @@ -1 +1,60 @@ | |||
| # StackStorm Enterprise RBAC Backend for StackStorm Enterprise Edition | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For God's sake, please add the CircleCI build badge !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one ^^ is from recent #community pearls 😈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reminder, was on my TODO but forgot to do it :)
Yeah, I agree that this makes more sense now that we have this package. Only "problem" is upgrade, although I assume this should be handled automatically on |
|
Added steps to automatically add / remove config entries on install / removal. Per discussion with @armab with slack, we won't automatically restart services on install / upgrade / removal. We will document this in st2docs - user needs to restart services for RBAC to start working. |
m4dcoder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hard to review. I assume most of this is just moving code from the main st2 repo. If there are any changes, it would be addition for CircleCI, make, and packaging. I defer review to build and packaging to @armab. Otherwise, this LGTM.
| # Proprietary and confidential. | ||
| # See the LICENSE file included with this work for details. | ||
|
|
||
| __version__ = '3.0dev' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder here to add steps in st2 release process to update this version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reminder. Here we go - StackStorm/st2cd@2f643d4
On a related note - those release workflows have a lot of duplication and copy and paste. Once with-items stuff in Orquesta is working correctly without performance penalties we should look at refactoring some of those workflows to use with-items instead.
tests (e.g. stream API controllers).
73fe88f Fix merge conflict. 72d3b7c Merge pull request #1 from StackStorm/update_lint_configs 2709c47 Update lint config with changes from StackStorm/st2#4657. git-subtree-dir: lint-configs git-subtree-split: 73fe88f2da7403d69bc5ebd7c6d22d12860c3744
This pull request contains initial implementation of our proprietary and private RBAC backend code.
The goal is to move our proprietary RBAC code from open-source repo to a private one. To be able to do that I introduced new "RBAC" backends concept which follow a similar adapter / driver concept we already use for runners, auth backends and metrics backends.
There are multiple reasons for that:
Due to the nature of the code in StackStorm/st2 repo, I can't move 100% of the RBAC related code here. We simply don't have plugin / adapter paradigm for a lot of code parts (API endpoints, API and DB models, services, etc.).
And, TBH, it doesn't even make sense - making all of those code parts pluggable would mean a lot of work, vastly increase the code complexity and maintenance costs. In theory, having "everything pluggable" sounds kinda nice, but in practice it's a mess and not something I would ever want to do.
The "good" news is that RBAC already follows quite a nice abstraction, so it was relatively easy to move the most important parts to this repo:
st2-apply-rbac-definitionsscriptThings which are left as part of the open source repo:
NOTE 1: StackStorm/st2 PR will be separate.
To avoid drawing too much attention to that PR, I propose temporarily forking StackStorm/st2 to a private repo so we can review code there in private. Once we are happy with it we can merge it and push it directly to StackStorm/st2 master branch. Smart people can of course still figure out this change, but that's not the point.
NOTE 2: To be able to run the tests, we will need to clone StackStorm/st2 repo since a lot of tests rely on code from there (that's a similar pattern we already use in a lot of other repos and packs).
NOTE 3: Once this is ready for review, please only focus on new code which was added as part of the backend concept. 90% of the code and tests is the existing code just moved from StackStorm/st2 repo and adapted to use backend concept.
TODO
bwc-enterprisepackage