Fixing listVirtualMachinesMetrics to extend ListVMsCmd instead of ListVMsCmdByAdmin#4145
Fixing listVirtualMachinesMetrics to extend ListVMsCmd instead of ListVMsCmdByAdmin#4145yadvr merged 3 commits intoapache:4.13from
Conversation
|
@blueorangutan package |
|
@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1377 |
|
@blueorangutan test |
|
@davidjumani a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
| ResponseView respView = ResponseView.Restricted; | ||
| if (cmd instanceof ListVMsCmdByAdmin) { | ||
| Account caller = CallContext.current().getCallingAccount(); | ||
| if (_accountMgr.isAdmin(caller.getId())) { |
There was a problem hiding this comment.
@davidjumani it should be isRootAdmin instead of isAdmin
There was a problem hiding this comment.
@weizhouapache Does it detect ListVMsCmd as ListVMsCmdByAdmin for a regular admin ?
There was a problem hiding this comment.
@davidjumani yes, root admin. Check if isAdmin checks for only root admin, or would it pass for domain admin. The fix needed here is to check if caller is a root admin.
There was a problem hiding this comment.
Nevermind, I checked and made that fix.
|
Trillian test result (tid-1727)
|
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1380 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1734)
|
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
shwstppr
left a comment
There was a problem hiding this comment.
Change works. LGTM if domain admins are not allowed see VM's internal name
|
Trillian test result (tid-1759)
|
Description
This fixes the issue of listVirtualMachinesMetrics to extend ListVMsCmd instead of ListVMsCmdByAdmin which is a potential security bug. It now only extends ListVMsCmd, so only admins can see additional details such as internal instance name, etc
No similar issue for listVolumeMetics, listStoragePoolMetrics, etc
Fixes: #4143
Types of changes