From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
qemu-devel@nongnu.org, libvir-list@redhat.com,
Alexander Graf <agraf@suse.de>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
David Gibson <dgibson@redhat.com>, Eric Blake <eblake@redhat.com>,
Gary Ching-Pang Lin <glin@suse.com>,
Kashyap Chamarthy <kchamart@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
Michal Privoznik <mprivozn@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Peter Krempa <pkrempa@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [Qemu-devel] [qemu RFC v2] qapi: add "firmware.json"
Date: Wed, 18 Apr 2018 15:06:09 +0100 [thread overview]
Message-ID: <20180418140609.GT27579@redhat.com> (raw)
In-Reply-To: <9b760289-a92e-4ec0-ce3b-f13665b5799b@redhat.com>
On Wed, Apr 18, 2018 at 04:03:03PM +0200, Laszlo Ersek wrote:
> On 04/18/18 15:53, Daniel P. Berrangé wrote:
> > On Wed, Apr 18, 2018 at 03:30:36PM +0200, Laszlo Ersek wrote:
> >> On 04/18/18 15:06, Gerd Hoffmann wrote:
> >>>>> Other question: Do we want allow to specify which certs/keys are
> >>>>> enrolled? Which would probably mean to drop "enrolled-keys" from
> >>>>> features and make it an optional string instead,
> >>>>
> >>>> Not an enum? "Microsoft" below should be an enum constant, shouldn't it?
> >>>
> >>> I don't think so. If we want allow other certificate providers (not
> >>> sure it makes sense as all physical hardware actually runs with the
> >>> microsoft certificates), then we don't want a fixed list here. So any
> >>> CA can be listed, be it microsoft, redhat, canonical, verisign or
> >>> kraxel.org ;)
> >>
> >> I agree (obviously), but then, at what detail do we stop?
> >>
> >> Because, if we go for full flexibility, then we should formalize:
> >> - the certificate that goes into PK,
> >> - the list of certificates that go into KEK,
> >> - the list of certificates that go into db,
> >>
> >> and we should likely formalize "certificate" itself as the following pair:
> >> - human-readable description (possibly the Common Name of the Subject),
> >> - SHA256 digest (fingerprint) of the certificate.
> >>
> >> I do think this would totally be overkill, but I don't know where to
> >> draw the line
> >> - between the currently proposed @enrolled-keys (or similar enums that
> >> stand for well-defined "constellations")
> >> - and the full details as described above.
> >>
> >> A simple string like "Microsoft" doesn't seem to me helpful for either
> >> the user or management software -- the former won't know what
> >> "Microsoft" stands for, and the latter won't want to look for free-form
> >> strings. (Same issue as with @tags vs. @features.)
> >
> > Ignoring secboot cert name for a minute, ultimately no matter what we do
> > in terms of metadata there is always going to be the possibility that
> > many firmware images all match the criteria libvirt is searching on.
> >
> > Apps thus need rules to pick one of the many matches, and users need the
> > ability to override distro defaults. We can achieve that as follows:
> >
> > Recommend that firmware files are created with a double-digit prefix
> > eg 50-ovmf.json 50-seabios-256k.json, etc, etc, so they can be
> > sorted in predictable order
> >
> > Second, we should define three well known directory locations
> >
> > - /usr/share/qemu/firmware (used by distros packages)
> > - /etc/qemu/firmware (exclusively for sysadmin local additions)
> > - $HOME/.config/qemu/firmware (exclusively for per-user local additions)
> >
> > Apps like libvirt should build list of files from all three locations,
> > then sort by filename. If a local directory has a file with same
> > name as the distro directory, then it should replace the distro provided
> > file. A zero length file should be simply hide the distro provided file
> >
> > So for example, distro ships
> >
> > /usr/share/qemu/firmware/50-ovmf.json
> > /usr/share/qemu/firmware/50-seabios-256k.json
> >
> > The sysadmin can now prevent the default ovmf being used at all with
> >
> > $ touch /etc/qemu/firmware/50-ovmf.json
> >
> > The sysadmin can replace/alter the distro default ovmf with
> >
> > $ vim /etc/qemu/firmware/50-ovmf.json
> >
> > Or they can provide a parallel ovmf with higher priority
> >
> > $ vim /etc/qemu/firmware/10-ovmf.json
> >
> > Or they can provide a parallel ovmf with lower priority
> >
> > $ vim /etc/qemu/firmware/99-ovmf.json
> >
> > $HOME/.config/qemu/firmware would take prior over /etc/qemu and
> > /usr/share/qemu.
> >
> >
> > Getting back to the question of many ovmf images with various different
> > secboot keys. The distro can now provide many ovmf images each with
> > different keys, if desired and determine which one is picked by default.
> >
> > The end user can provide their over ovmf with personal keys that replaces
> > the distro microsoft enrolled one entirely, etc.
> >
> > IOW, don't think we need to record which certs are use for secboot in
> > the JSON metadata. Just lets overrides & ordering take care of it.
>
> OK, thank you. Three more questions:
>
> - Would you like me to capture the directory paths in the firmware.json
> file, or in the commit message for the patch?
Should be in whatever file ends up in the docs/specs directory eventually.
>
> - Should we keep @secure-boot-enrolled-keys (or, as Gerd suggests,
> @enrolled-keys) in the schema, as a feature enum constant, but remove
> the documentation of the actual certificates? (I.e., say "an
> unspecified set of certificates has been enrolled and SB mode has been
> enabled".)
I think it is worth keeping the feature flag - we simply don't need
to say /what/ keys.
>
> - Or else, should we drop the feature flag that stands for enrollment
> completely?
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-04-18 14:06 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-17 22:40 [Qemu-devel] [qemu RFC v2] qapi: add "firmware.json" Laszlo Ersek
2018-04-18 6:02 ` Gerd Hoffmann
2018-04-18 8:32 ` Laszlo Ersek
2018-04-18 9:04 ` Gerd Hoffmann
2018-04-18 11:48 ` Laszlo Ersek
2018-04-18 11:57 ` Daniel P. Berrangé
2018-04-18 12:30 ` Gerd Hoffmann
2018-04-18 12:32 ` Daniel P. Berrangé
2018-04-18 12:57 ` Laszlo Ersek
2018-04-18 12:23 ` Gerd Hoffmann
2018-04-18 12:56 ` Laszlo Ersek
2018-04-18 13:06 ` Gerd Hoffmann
2018-04-18 13:30 ` Laszlo Ersek
2018-04-18 13:53 ` Daniel P. Berrangé
2018-04-18 14:03 ` Laszlo Ersek
2018-04-18 14:06 ` Daniel P. Berrangé [this message]
2018-04-18 14:45 ` Laszlo Ersek
2018-04-19 0:09 ` David Gibson
2018-04-19 8:09 ` Laszlo Ersek
2018-04-20 1:03 ` David Gibson
2018-04-20 8:47 ` Paolo Bonzini
2018-04-20 9:01 ` Laszlo Ersek
2018-04-19 8:45 ` Thomas Huth
2018-04-18 8:47 ` Markus Armbruster
2018-04-18 11:35 ` Laszlo Ersek
2018-04-19 7:48 ` Markus Armbruster
2018-04-19 7:56 ` [Qemu-devel] [libvirt] " Daniel P. Berrangé
2018-04-19 8:39 ` Laszlo Ersek
2018-04-19 9:12 ` Daniel P. Berrangé
2018-04-20 8:11 ` Laszlo Ersek
2018-04-20 9:34 ` Daniel P. Berrangé
2018-04-20 9:46 ` Gerd Hoffmann
2018-04-20 9:50 ` Daniel P. Berrangé
2018-04-20 10:41 ` Gerd Hoffmann
2018-04-20 15:45 ` Laszlo Ersek
2018-04-20 15:39 ` Laszlo Ersek
2018-04-23 0:10 ` David Gibson
2018-04-23 9:39 ` Daniel P. Berrangé
2018-04-20 12:53 ` Markus Armbruster
2018-04-20 16:04 ` Laszlo Ersek
2018-04-20 16:37 ` Markus Armbruster
2018-04-20 23:25 ` Laszlo Ersek
2018-04-18 9:43 ` [Qemu-devel] " Paolo Bonzini
2018-04-18 11:52 ` Laszlo Ersek
2018-04-18 12:03 ` Daniel P. Berrangé
2018-04-18 12:36 ` Gerd Hoffmann
2018-04-18 12:40 ` Laszlo Ersek
2018-04-18 15:17 ` Eric Blake
2018-04-18 15:27 ` Laszlo Ersek
2018-04-18 15:28 ` Daniel P. Berrangé
2018-04-18 15:30 ` Laszlo Ersek
2018-04-19 8:57 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180418140609.GT27579@redhat.com \
--to=berrange@redhat.com \
--cc=agraf@suse.de \
--cc=ard.biesheuvel@linaro.org \
--cc=armbru@redhat.com \
--cc=dgibson@redhat.com \
--cc=eblake@redhat.com \
--cc=glin@suse.com \
--cc=kchamart@redhat.com \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=libvir-list@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mprivozn@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).