Skip to content

volume: fix volume metrics view from returning sensitive info to end user#3222

Merged
yadvr merged 2 commits intoapache:masterfrom
shapeblue:volume-metrics-views
Jun 19, 2019
Merged

volume: fix volume metrics view from returning sensitive info to end user#3222
yadvr merged 2 commits intoapache:masterfrom
shapeblue:volume-metrics-views

Conversation

@dhlaluku
Copy link
Contributor

@dhlaluku dhlaluku commented Mar 13, 2019

Description

Problem: The listVolumeMetrics API response does not honor the volume detail visibility restrictions set for normal users and returns sensitive information which should only be visible to the root admin.

Root Cause: The listVolumeMetrics API response extends the ListVolumesByAdmin API internally and this results in a full display view response that is only meant for the root admin.

Solution: This has been fixed by rectifying the API response to not show ‘physical size’, 'storage type', and ‘storage pool’ information. The UI has also been fixed to hide these columns for normal users.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):

User metrics view from the UI with physical size, storage type, and storage pool details hideen
image

Admin Response contains the full display view/results
image

How Has This Been Tested?

@dhlaluku
Copy link
Contributor Author

@rhtyd please add appropriate labels for this PR

@blueorangutan package

@blueorangutan
Copy link

@dhlaluku a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2630

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-3427)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 22768 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3222-t3427-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py
Smoke tests completed. 69 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_04_rvpc_network_garbage_collector_nics Failure 256.54 test_vpc_redundant.py

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yadvr yadvr requested a review from PaulAngus March 25, 2019 07:55
@yadvr yadvr changed the title volume: fix volume metrics view from returning sensitive info to end user [WIP DO NOT MERGE] volume: fix volume metrics view from returning sensitive info to end user Mar 29, 2019
@yadvr
Copy link
Member

yadvr commented May 23, 2019

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✖centos6 ✖centos7 ✔debian. JID-2763

@DaanHoogland
Copy link
Contributor

just in case someone needs to play with this:
@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@DaanHoogland
Copy link
Contributor

@rhtyd I saw more PRs on this subject. Is this still relevant? LGTM

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2786

@yadvr
Copy link
Member

yadvr commented May 24, 2019

Yes this is relevant @DaanHoogland thanks.
@blueorangutan test centos7 vmware-65u2

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-3583)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 20089 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3222-t3583-vmware-65u2.zip
Intermittent failure detected: /marvin/tests/smoke/test_public_ip_range.py
Intermittent failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py
Intermittent failure detected: /marvin/tests/smoke/test_resource_accounting.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dns.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dnsservice.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_routers.py
Intermittent failure detected: /marvin/tests/smoke/test_scale_vm.py
Intermittent failure detected: /marvin/tests/smoke/test_secondary_storage.py
Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
Intermittent failure detected: /marvin/tests/smoke/test_templates.py
Intermittent failure detected: /marvin/tests/smoke/test_usage.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py
Smoke tests completed. 48 look OK, 22 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestResetVmOnReboot>:setup Error 0.00 test_reset_vm_on_reboot.py
ContextSuite context=TestRAMCPUResourceAccounting>:setup Error 0.00 test_resource_accounting.py
ContextSuite context=TestRouterDHCPHosts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDHCPOpts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDns>:setup Error 0.00 test_router_dns.py
ContextSuite context=TestRouterDnsService>:setup Error 0.00 test_router_dnsservice.py
ContextSuite context=TestRouterIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
ContextSuite context=TestVPCIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
test_01_isolate_network_FW_PF_default_routes_egress_true Error 0.17 test_routers_network_ops.py
test_02_isolate_network_FW_PF_default_routes_egress_false Error 0.18 test_routers_network_ops.py
ContextSuite context=TestRedundantIsolateNetworks>:setup Error 1.38 test_routers_network_ops.py
ContextSuite context=TestRouterServices>:setup Error 0.00 test_routers.py
ContextSuite context=TestScaleVm>:setup Error 0.00 test_scale_vm.py
test_01_sys_vm_start Failure 0.14 test_secondary_storage.py
test_02_sys_template_ready Failure 0.10 test_secondary_storage.py
ContextSuite context=TestServiceOfferings>:setup Error 0.22 test_service_offerings.py
ContextSuite context=TestISOUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestLBRuleUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestNatRuleUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestPublicIPUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestSnapshotUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestVmUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestVolumeUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestVpnUsage>:setup Error 0.00 test_usage.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
test_01_list_sec_storage_vm Failure 0.04 test_ssvm.py
test_02_list_cpvm_vm Failure 0.04 test_ssvm.py
test_03_ssvm_internals Failure 0.04 test_ssvm.py
test_04_cpvm_internals Failure 0.04 test_ssvm.py
test_05_stop_ssvm Failure 0.04 test_ssvm.py
test_06_stop_cpvm Failure 0.04 test_ssvm.py
test_07_reboot_ssvm Failure 0.04 test_ssvm.py
test_08_reboot_cpvm Failure 0.04 test_ssvm.py
test_09_destroy_ssvm Failure 0.04 test_ssvm.py
test_10_destroy_cpvm Failure 0.04 test_ssvm.py
test_02_create_template_with_checksum_sha1 Error 65.49 test_templates.py
test_03_create_template_with_checksum_sha256 Error 65.49 test_templates.py
test_04_create_template_with_checksum_md5 Error 65.50 test_templates.py
test_05_create_template_with_no_checksum Error 65.50 test_templates.py
ContextSuite context=TestTemplates>:setup Error 0.12 test_templates.py
ContextSuite context=Test01DeployVM>:setup Error 0.00 test_vm_life_cycle.py
ContextSuite context=Test02VMLifeCycle>:setup Error 0.00 test_vm_life_cycle.py
ContextSuite context=TestChangeServiceOfferingForVmWithSnapshots>:setup Error 0.00 test_vm_snapshots.py
ContextSuite context=TestVmSnapshot>:setup Error 0.00 test_vm_snapshots.py
ContextSuite context=TestCreateVolume>:setup Error 0.00 test_volumes.py
ContextSuite context=TestVolumes>:setup Error 0.00 test_volumes.py
ContextSuite context=TestVPCRedundancy>:setup Error 0.00 test_vpc_redundant.py
ContextSuite context=TestVPCNics>:setup Error 0.00 test_vpc_router_nics.py
ContextSuite context=TestRVPCSite2SiteVpn>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestVPCSite2SiteVPNMultipleOptions>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestVpcRemoteAccessVpn>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestVpcSite2SiteVpn>:setup Error 0.00 test_vpc_vpn.py
test_02_cancel_host_maintenace_with_migration_jobs Failure 0.14 test_host_maintenance.py

@yadvr yadvr added this to the 4.13.0.0 milestone May 27, 2019
@shwstppr
Copy link
Contributor

@blueorangutan test centos7 vmware-65u2

@blueorangutan
Copy link

@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it. LGTM!

@apache apache deleted a comment from blueorangutan May 30, 2019
@yadvr
Copy link
Member

yadvr commented May 30, 2019

@blueorangutan test centos7 vmware-65u2

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests

Dingane Hlaluku added 2 commits June 4, 2019 13:42
@anuragaw anuragaw force-pushed the volume-metrics-views branch from 622b950 to 5dc7236 Compare June 4, 2019 08:13
@anuragaw
Copy link
Contributor

anuragaw commented Jun 4, 2019

@blueorangutan package

@anuragaw
Copy link
Contributor

anuragaw commented Jun 4, 2019

Rebased to remove merge conflicts @rhtyd , @shwstppr , @borisstoyanov

@borisstoyanov
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2862

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, test results attached
test_results.xlsx

@yadvr yadvr changed the title [WIP DO NOT MERGE] volume: fix volume metrics view from returning sensitive info to end user volume: fix volume metrics view from returning sensitive info to end user Jun 19, 2019
@yadvr yadvr merged commit 0d6cae6 into apache:master Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants