From nobody Wed May 14 10:51:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524669819585704.1137825862711; Wed, 25 Apr 2018 08:23:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 053D0C04BD2B; Wed, 25 Apr 2018 15:23:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD1C110018F8; Wed, 25 Apr 2018 15:23:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 10C9A180BAD3; Wed, 25 Apr 2018 15:23:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3PFGLn1020634 for ; Wed, 25 Apr 2018 11:16:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7AEDD202698A; Wed, 25 Apr 2018 15:16:21 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id D718B2022F11; Wed, 25 Apr 2018 15:16:20 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 25 Apr 2018 17:15:40 +0200 Message-Id: <008bb1af0d1b4f89ac500cd4a5c253c2b8126760.1524668969.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Kevin Wolf , Peter Krempa Subject: [libvirt] [PATCH 32/35] tests: qemublock: Add test combining authentication and encryption X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 25 Apr 2018 15:23:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" iscsi and rbd support authentication of the connection. Combine it with encryption of qcow2. The top level disk image would generate the following '-drive' cmdline: -drive file=3Drbd:rbdpool/rbdimg:id=3Dtestuser-rbd:auth_supported=3Dcephx\;= none: mon_host=3Dhost1.example.com\;host2.example.com, file.password-secret=3Dnode-a-s-secalias,encrypt.format=3Dluks, encrypt.key-secret=3Dnode-b-f-encalias,format=3Dqcow2, if=3Dnone,id=3Ddrive-dummy -device virtio-blk-pci,scsi=3Doff,drive=3Ddrive-dummy,id=3Ddummy Signed-off-by: Peter Krempa Reviewed-by: John Ferlan --- tests/qemublocktest.c | 1 + ...etwork-qcow2-backing-chain-encryption_auth.json | 51 ++++++++++++++++++= ++++ ...network-qcow2-backing-chain-encryption_auth.xml | 40 +++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-= chain-encryption_auth.json create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-= chain-encryption_auth.xml diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 44d76bebbb..34509be543 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -463,6 +463,7 @@ mymain(void) TEST_DISK_TO_JSON("file-qcow2-backing-chain-noopts"); TEST_DISK_TO_JSON("file-qcow2-backing-chain-unterminated"); TEST_DISK_TO_JSON("file-qcow2-backing-chain-encryption"); + TEST_DISK_TO_JSON("network-qcow2-backing-chain-encryption_auth"); cleanup: virHashFree(diskxmljsondata.schema); diff --git a/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-e= ncryption_auth.json b/tests/qemublocktestdata/xml2json/network-qcow2-backin= g-chain-encryption_auth.json new file mode 100644 index 0000000000..f307ba8805 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encrypti= on_auth.json @@ -0,0 +1,51 @@ +{ + "node-name": "node-b-f", + "read-only": false, + "driver": "qcow2", + "encrypt": { + "format": "luks", + "key-secret": "node-b-f-encalias" + }, + "file": { + "driver": "rbd", + "pool": "rbdpool", + "image": "rbdimg", + "server": [ + { + "host": "host1.example.com", + "port": "0" + }, + { + "host": "host2.example.com", + "port": "0" + } + ], + "user": "testuser-rbd", + "node-name": "node-a-s", + "read-only": false, + "discard": "unmap" + }, + "backing": "node-b-f" +} +{ + "node-name": "node-b-f", + "read-only": true, + "driver": "qcow2", + "encrypt": { + "format": "aes", + "key-secret": "node-b-f-encalias" + }, + "file": { + "driver": "iscsi", + "portal": "example.org:3260", + "target": "iscsitarget", + "lun": 1, + "transport": "tcp", + "user": "testuser-iscsi", + "password-secret": "node-b-s-secalias", + "node-name": "node-b-s", + "read-only": true, + "discard": "unmap" + }, + "backing": null +} diff --git a/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-e= ncryption_auth.xml b/tests/qemublocktestdata/xml2json/network-qcow2-backing= -chain-encryption_auth.xml new file mode 100644 index 0000000000..775886801b --- /dev/null +++ b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encrypti= on_auth.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list