mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
encryption: Add luks parsing for storageencryption
Add parse and format of the luks/passphrase secret including tests for volume XML parsing. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
@@ -56,8 +56,20 @@
|
||||
the <code>secret</code> element is not present during volume creation,
|
||||
a secret is automatically generated and attached to the volume.
|
||||
</p>
|
||||
<h3><a name="StorageEncryptionLuks">"luks" format</a></h3>
|
||||
<p>
|
||||
The <code>luks</code> format is specific to a luks encrypted volume
|
||||
and the secret used in order to either encrypt or decrypt the volume.
|
||||
A single <code><secret type='passphrase'...></code> element is
|
||||
expected. The secret may be referenced via either a <code>uuid</code> or
|
||||
<code>usage</code> attribute. One of the two must be present. When
|
||||
present for volume creation, the secret will be used in order for
|
||||
volume encryption. When present for domain usage, the secret will
|
||||
be used as the passphrase to decrypt the volume.
|
||||
<span class="since">Since 2.1.0</span>.
|
||||
</p>
|
||||
|
||||
<h2><a name="example">Example</a></h2>
|
||||
<h2><a name="example">Examples</a></h2>
|
||||
|
||||
<p>
|
||||
Here is a simple example, specifying use of the <code>qcow</code> format:
|
||||
@@ -67,5 +79,17 @@
|
||||
<encryption format='qcow'>
|
||||
<secret type='passphrase' uuid='c1f11a6d-8c5d-4a3e-ac7a-4e171c5e0d4a' />
|
||||
</encryption></pre>
|
||||
|
||||
<p>
|
||||
Here is a simple example, specifying use of the <code>luks</code> format
|
||||
where it's assumed that a <code>secret</code> has been defined using a
|
||||
<code>usage</code> element with a <code>id</code> of "luks_example":
|
||||
</p>
|
||||
<pre>
|
||||
<encryption format='luks'>
|
||||
<secret type='passphrase' usage='luks_example'/>
|
||||
</encryption>
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user