cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-10046) checksum is not verified during registerTemplate
Date Mon, 16 Oct 2017 12:00:02 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-10046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16205796#comment-16205796
] 

ASF subversion and git services commented on CLOUDSTACK-10046:
--------------------------------------------------------------

Commit ed7811a9a2589395fcfe8341b870ef14215e008f in cloudstack's branch refs/heads/CLOUDSTACK-10012
from [~dahn]
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=ed7811a ]

CLOUDSTACK-10046 checksum validation for any java supported Digests-type (#2246)

* CLOUDSTACK-10046 digest helper for calculating checksums

* CLOUDSTACK-10046 cleanup unused checksum code

* CLOUDSTACK-10046 padding method proof of concept

* CLOUDSTACK-10046 only compare checksums if old value is valid

* Adding positive and negative tests for md5, sha-1 and sha-256, for xen, vmware and kvm hypervisors.
KVM Results:

 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent
call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 189, in test_02_1_create_template_with_checksum_sha1_negative\n    self.download(self.apiclient,
template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status
- Failed post download script: checksum "{sha-1}bf580a13f791d86acf3449a7b457a91a14389264"
didn\'t match the given value, "{sha-1}someInvalidValue"\n']
=== TestName: test_02_1_create_template_with_checksum_sha1_negative | Status : SUCCESS ===
=== TestName: test_02_create_template_with_checksum_sha1 | Status : SUCCESS ===.
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent
call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 203, in test_03_1_create_template_with_checksum_sha256_negative\n    self.download(self.apiclient,
template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status
- Failed post download script: checksum "{SHA-256}efc03633f2b8f5db08acbcc5dc1be9028572dfd8f1c6c8ea663f0ef94b458c5"
didn\'t match the given value, "{SHA-256}someInvalidValue"\n']
=== TestName: test_03_1_create_template_with_checksum_sha256_negative | Status : SUCCESS ===
=== TestName: test_03_create_template_with_checksum_sha256 | Status : SUCCESS ===
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent
call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 217, in test_04_1_create_template_with_checksum_md5_negative\n    self.download(self.apiclient,
template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status
- Failed post download script: checksum "{md5}ada77653dcf1e59495a9e1ac670ad95f" didn\'t match
the given value, "{md5}someInvalidValue"\n']
=== TestName: test_04_1_create_template_with_checksum_md5_negative | Status : SUCCESS ===
=== TestName: test_04_create_template_with_checksum_md5 | Status : SUCCESS ===

* CLOUDSTACK-10046 digest helper for calculating checksums

* CLOUDSTACK-10046 cleanup unused checksum code

* CLOUDSTACK-10046 padding method proof of concept

* CLOUDSTACK-10046 only compare checksums if old value is valid

* Adding positive and negative tests for md5, sha-1 and sha-256, for xen, vmware and kvm hypervisors.
KVM Results:

 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent
call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 189, in test_02_1_create_template_with_checksum_sha1_negative\n    self.download(self.apiclient,
template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status
- Failed post download script: checksum "{sha-1}bf580a13f791d86acf3449a7b457a91a14389264"
didn\'t match the given value, "{sha-1}someInvalidValue"\n']
=== TestName: test_02_1_create_template_with_checksum_sha1_negative | Status : SUCCESS ===
=== TestName: test_02_create_template_with_checksum_sha1 | Status : SUCCESS ===.
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent
call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 203, in test_03_1_create_template_with_checksum_sha256_negative\n    self.download(self.apiclient,
template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status
- Failed post download script: checksum "{SHA-256}efc03633f2b8f5db08acbcc5dc1be9028572dfd8f1c6c8ea663f0ef94b458c5"
didn\'t match the given value, "{SHA-256}someInvalidValue"\n']
=== TestName: test_03_1_create_template_with_checksum_sha256_negative | Status : SUCCESS ===
=== TestName: test_03_create_template_with_checksum_sha256 | Status : SUCCESS ===
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent
call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 217, in test_04_1_create_template_with_checksum_md5_negative\n    self.download(self.apiclient,
template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py",
line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status
- Failed post download script: checksum "{md5}ada77653dcf1e59495a9e1ac670ad95f" didn\'t match
the given value, "{md5}someInvalidValue"\n']
=== TestName: test_04_1_create_template_with_checksum_md5_negative | Status : SUCCESS ===
=== TestName: test_04_create_template_with_checksum_md5 | Status : SUCCESS ===

* Adding additional test with no checksum added when registering template
Result:
test_05_create_template_with_no_checksum (integration.smoke.test_templates.TestCreateTemplateWithChecksum)
... === TestName: test_05_create_template_with_no_checksum | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 42.320s

OK

* Fixing negative tests exception handling

* Adding tests for ISO checksum validation and fixing a zero prefix failure test in templates

* CLOUDSTACK-10046 padding

* CLOUDSTACK-10046 usability additions

* yet another IDE artifact hindering checkstyle


> checksum is not verified during registerTemplate
> ------------------------------------------------
>
>                 Key: CLOUDSTACK-10046
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10046
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Daan Hoogland
>            Assignee: Daan Hoogland
>
> to verify twice registered:
> > register template url=http://dl.openvm.eu/cloudstack/centos/x86_64/centos-7-kvm.qcow2.bz2
checksum=0ef7e74bfd14317302bf65701f573c72d3112912 displaytext=try-again hypervisor=KVM name=try2
zoneid=5b98901a-8a30-4f55-97de-2d09e20d6d23 ostypeid=39c3e2cb-7da7-11e7-844c-06dd94010714
format=QCOW2
> and
> > register template url=http://dl.openvm.eu/cloudstack/centos/x86_64/centos-7-kvm.qcow2.bz2
checksum=0ef7e74bfd14317302bf65701f573c72d3112913 displaytext=try-once-more hypervisor=KVM
name=try3 zoneid=5b98901a-8a30-4f55-97de-2d09e20d6d23 ostypeid=39c3e2cb-7da7-11e7-844c-06dd94010714
format=QCOW2
> NOTE: the last digit of the checksum was changed from '2' to '3' but after download both
are marked as ready in the zone.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message