Role escalation prevention#5879
Conversation
|
Thanks @DaanHoogland, I'll review and get back in a few days. Meanwhile, do add/ask other devs. |
api/src/test/java/org/apache/cloudstack/api/command/admin/account/CreateAccountCmdTest.java
Show resolved
Hide resolved
...ect-role-based/src/main/java/org/apache/cloudstack/acl/ProjectRoleBasedApiAccessChecker.java
Show resolved
Hide resolved
|
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Most / all test failures report the following error: |
ok, that is not good: I removed the restriction to RoleTupe.User, which should do the trick. If not I'll add all role types. |
|
ping @rohityadavcloud can you test this changes. |
|
@sureshanaparti I'll review the code changes but not able to test it. Pl ask @borisstoyanov @vladimirpetrov or one of the 4.16.1 team. |
sure @rohityadavcloud , please review the changes. thanks. |
|
@blueorangutan package |
|
@rohityadavcloud a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2532 |
|
@blueorangutan test |
|
@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3252) |
borisstoyanov
left a comment
There was a problem hiding this comment.
LGTM, manually tested, restricted domain admin cannot create a role with higher privileges
|
@blueorangutan test |
|
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Do we need this re-test
I think the one before showed no errors and we didn't re-build in between. |
couldn't see the results here, let's wait for test results. |
|
Trillian test result (tid-3264)
|
Pearl1594
left a comment
There was a problem hiding this comment.
LGTM - verified behavior.
yadvr
left a comment
There was a problem hiding this comment.
FWIW - LGTM, read the critical code in checkRoleEscalation, will leave some remarks
|
@DaanHoogland one remark this doesn't fix/address if the issue already exists, we should update the doc (if not already done) to explain how roles work and precautions for non-admin roles that can create accounts. |
I don't agree, there is a doc PR out. Please comment there if there is anything missing. |
@rohityadavcloud Doc PR here, apache/cloudstack-documentation#260, please take a look and provide your feedback. @DaanHoogland can create a separate doc PR to include if any more details has to be added to the documentation. |
|
Cool thanks for the link @sureshanaparti @DaanHoogland - as I said my remark was only if you've not already done the doc PR - which you've. |
* prevent role access escallation * hierarchy issue fixed * create api list in account manager for checking new account access * full api list check * strange role restriction removed for BareMetal * add role check on upfdate account as well * more selective use of api checkers * error msg and var name Co-authored-by: Daan Hoogland <dahn@onecht.net>
Role escalation prevention (apache#5879) See merge request scclouds/scclouds!216
Description
This PR...
Fixes: #5781
Doc PR: apache/cloudstack-documentation#260
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?