Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 49DB1200D21 for ; Mon, 16 Oct 2017 13:53:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 488A31609EF; Mon, 16 Oct 2017 11:53:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6E8DB1609EC for ; Mon, 16 Oct 2017 13:53:05 +0200 (CEST) Received: (qmail 59606 invoked by uid 500); 16 Oct 2017 11:53:04 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 59597 invoked by uid 500); 16 Oct 2017 11:53:04 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 59594 invoked by uid 99); 16 Oct 2017 11:53:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2017 11:53:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C0F341A2815 for ; Mon, 16 Oct 2017 11:53:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.452 X-Spam-Level: X-Spam-Status: No, score=-98.452 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_EU=0.5, KAM_LOTSOFHASH=0.25, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id w4saLGh87AJL for ; Mon, 16 Oct 2017 11:53:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3AF495F3CE for ; Mon, 16 Oct 2017 11:53:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6CD75E0443 for ; Mon, 16 Oct 2017 11:53:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 26F282430F for ; Mon, 16 Oct 2017 11:53:00 +0000 (UTC) Date: Mon, 16 Oct 2017 11:53:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-10046) checksum is not verified during registerTemplate MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 16 Oct 2017 11:53:06 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-10046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16205787#comment-16205787 ] 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)