2011-10-28 21:19:34 +00:00
|
|
|
<?xml version="1.0"?>
|
2009-07-28 00:39:48 +00:00
|
|
|
<!-- A Relax NG schema for the libvirt secret properties XML format -->
|
|
|
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
|
|
|
<start>
|
2020-09-30 11:54:58 +00:00
|
|
|
<ref name="secret"/>
|
2009-07-28 00:39:48 +00:00
|
|
|
</start>
|
|
|
|
|
2020-09-30 11:54:58 +00:00
|
|
|
<include href="basictypes.rng"/>
|
2011-10-28 21:19:34 +00:00
|
|
|
|
2020-09-30 11:54:58 +00:00
|
|
|
<define name="secret">
|
|
|
|
<element name="secret">
|
2009-07-28 00:39:48 +00:00
|
|
|
<optional>
|
2020-09-30 11:54:58 +00:00
|
|
|
<attribute name="ephemeral">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2009-09-11 13:04:41 +00:00
|
|
|
</attribute>
|
2009-07-28 00:39:48 +00:00
|
|
|
</optional>
|
|
|
|
<optional>
|
2020-09-30 11:54:58 +00:00
|
|
|
<attribute name="private">
|
2014-09-08 06:06:35 +00:00
|
|
|
<ref name="virYesNo"/>
|
2009-09-11 13:04:41 +00:00
|
|
|
</attribute>
|
2009-07-28 00:39:48 +00:00
|
|
|
</optional>
|
|
|
|
<interleave>
|
2009-09-11 13:04:41 +00:00
|
|
|
<optional>
|
2020-09-30 11:54:58 +00:00
|
|
|
<element name="uuid">
|
|
|
|
<ref name="UUID"/>
|
2009-09-11 13:04:41 +00:00
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
2020-09-30 11:54:58 +00:00
|
|
|
<element name="description">
|
2009-09-11 13:04:41 +00:00
|
|
|
<text/>
|
|
|
|
</element>
|
|
|
|
</optional>
|
|
|
|
<optional>
|
2020-09-30 11:54:58 +00:00
|
|
|
<element name="usage">
|
2009-09-11 13:04:41 +00:00
|
|
|
<choice>
|
2020-09-30 11:54:58 +00:00
|
|
|
<ref name="usagevolume"/>
|
|
|
|
<ref name="usageceph"/>
|
|
|
|
<ref name="usageiscsi"/>
|
|
|
|
<ref name="usagetls"/>
|
|
|
|
<ref name="usagevtpm"/>
|
2009-09-11 13:04:41 +00:00
|
|
|
<!-- More choices later -->
|
|
|
|
</choice>
|
|
|
|
</element>
|
|
|
|
</optional>
|
2009-07-28 00:39:48 +00:00
|
|
|
</interleave>
|
|
|
|
</element>
|
|
|
|
</define>
|
2009-09-01 17:25:11 +00:00
|
|
|
|
2020-09-30 11:54:58 +00:00
|
|
|
<define name="usagevolume">
|
|
|
|
<attribute name="type">
|
2009-09-01 17:25:11 +00:00
|
|
|
<value>volume</value>
|
|
|
|
</attribute>
|
2020-09-30 11:54:58 +00:00
|
|
|
<element name="volume">
|
|
|
|
<ref name="absFilePath"/>
|
2009-09-01 17:25:11 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
Fix UUID handling in secrets/storage encryption APIs
Convert all the secret/storage encryption APIs / wire format to
handle UUIDs in raw format instead of non-canonical printable
format. Guarentees data format correctness.
* docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
and validate fully
* docs/schemas/secret.rng: Fully validate UUID
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
virSecretLookupByUUID and virSecretGetUUID. Make
virSecretGetUUIDString follow normal API design pattern
* python/generator.py: Skip generation of virSecretGetUUID,
virSecretGetUUIDString and virSecretLookupByUUID
* python/libvir.c, python/libvirt-python-api.xml: Manual impl
of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
* qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
* qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
remote_uuid instead of remote_nonnull_string for UUID field.
Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
remote_uuid value
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
of printable. Change virGetSecret to use raw format UUID
* src/driver.h: Rename virDrvSecretLookupByUUIDString to
virDrvSecretLookupByUUID and use raw format UUID
* src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
and re-implement virSecretLookupByUUIDString and
virSecretGetUUIDString in terms of those
* src/libvirt_public.syms: Add virSecretLookupByUUID and
virSecretGetUUID
* src/remote_internal.c: Rename remoteSecretLookupByUUIDString
to remoteSecretLookupByUUID. Fix typo in args for
remoteSecretDefineXML impl. Use raw UUID format for
get_nonnull_secret and make_nonnull_secret
* src/storage_encryption_conf.c, src/storage_encryption_conf.h:
Storage UUID in raw format, and require it to be present in
XML. Use UUID parser to validate.
* secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
Storage UUID in raw format.
* src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
in a filed with printable UUID, instead of base64 UUID.
* src/virsh.c: Adjust for changed public API contract of
virSecretGetUUIDString.
* src/storage_Backend.c: DOn't undefine secret we just generated
upon successful volume creation. Fix to handle raw UUIDs. Generate
a non-clashing UUID
* src/qemu_driver.c: Change to use lookupByUUID instead of
lookupByUUIDString
2009-09-10 16:44:12 +00:00
|
|
|
|
2020-09-30 11:54:58 +00:00
|
|
|
<define name="usageceph">
|
|
|
|
<attribute name="type">
|
2011-10-28 17:30:45 +00:00
|
|
|
<value>ceph</value>
|
|
|
|
</attribute>
|
2020-09-30 11:54:58 +00:00
|
|
|
<element name="name">
|
|
|
|
<ref name="genericName"/>
|
2011-10-28 17:30:45 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2020-09-30 11:54:58 +00:00
|
|
|
<define name="usageiscsi">
|
|
|
|
<attribute name="type">
|
2013-03-21 11:53:52 +00:00
|
|
|
<value>iscsi</value>
|
|
|
|
</attribute>
|
2020-09-30 11:54:58 +00:00
|
|
|
<element name="target">
|
|
|
|
<ref name="genericName"/>
|
2013-03-21 11:53:52 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2020-09-30 11:54:58 +00:00
|
|
|
<define name="usagetls">
|
|
|
|
<attribute name="type">
|
2016-07-14 19:09:08 +00:00
|
|
|
<value>tls</value>
|
|
|
|
</attribute>
|
2020-09-30 11:54:58 +00:00
|
|
|
<element name="name">
|
|
|
|
<ref name="genericName"/>
|
2016-07-14 19:09:08 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2020-09-30 11:54:58 +00:00
|
|
|
<define name="usagevtpm">
|
|
|
|
<attribute name="type">
|
2019-07-25 18:21:57 +00:00
|
|
|
<value>vtpm</value>
|
|
|
|
</attribute>
|
2020-09-30 11:54:58 +00:00
|
|
|
<element name="name">
|
|
|
|
<ref name="genericName"/>
|
2019-07-25 18:21:57 +00:00
|
|
|
</element>
|
|
|
|
</define>
|
|
|
|
|
2009-07-28 00:39:48 +00:00
|
|
|
</grammar>
|