Re: [PATCH 7/7] schema: secret: Relax requirements for usage name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Wednesday in 2021, Peter Krempa wrote:
There's plenty of existing documentation [1] which shows as example a
name which contains a space and a dot ('client.admin secret') as ceph
usage name.

Use a more relaxed type in the RNG schema since the usage name is
actually just a string used to look up the secret.

[1]:
https://docs.ceph.com/en/latest/rbd/libvirt/#configuring-the-vm
https://documentation.suse.com/ses/6/html/ses-all/cha-ceph-libvirt.html#ceph-libvirt-cfg-vm
Libvirt docs were correct though:
https://libvirt.org/formatsecret.html#CephUsageType

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689168

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
docs/schemas/domaincommon.rng                 |  2 +-
docs/schemas/secret.rng                       |  8 ++---
.../disk-network-source-auth.args             |  8 ++++-
...isk-network-source-auth.x86_64-2.12.0.args |  9 ++++++
...isk-network-source-auth.x86_64-latest.args | 29 ++++++++++++++-----
.../disk-network-source-auth.xml              | 12 ++++++++
tests/qemuxml2argvtest.c                      |  3 +-
.../disk-network-source-auth.xml              | 13 +++++++++
tests/secretxml2xmlin/usage-ceph-space.xml    |  7 +++++
tests/secretxml2xmltest.c                     |  1 +
10 files changed, 77 insertions(+), 15 deletions(-)
create mode 100644 tests/secretxml2xmlin/usage-ceph-space.xml

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 4fc6a7ee7a..701db7e7d2 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -6261,7 +6261,7 @@
          <ref name="UUID"/>
        </attribute>
        <attribute name="usage">
-          <ref name="genericName"/>
+          <ref name="objectName"/>
        </attribute>
      </choice>
    </element>

The auth info in storagepool.rng is not as restrictive:

  <define name="sourceinfoauthsecret">
    <element name="secret">
      <choice>
        <attribute name="uuid">
          <text/>
        </attribute>
        <attribute name="usage">
          <text/>
        </attribute>
      </choice>
    </element>
  </define>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux