From: David Vossel <dvossel@redhat.com>
To: Christian Schoenebeck <qemu_oss@crudebyte.com>
Cc: Michal Privoznik <mprivozn@redhat.com>,
Fabian Deutsch <fdeutsch@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: guest agent public ssh key add/remove support?
Date: Wed, 19 Aug 2020 09:49:50 -0400 [thread overview]
Message-ID: <CAPjOJFsr2_0Kdp03jbSUZ2vpde41uHrS6ki_Wax4pZ-d8RTDvQ@mail.gmail.com> (raw)
In-Reply-To: <2310267.m5nKHIMqSz@silver>
[-- Attachment #1: Type: text/plain, Size: 2348 bytes --]
On Tue, Aug 18, 2020 at 3:10 PM Christian Schoenebeck <
qemu_oss@crudebyte.com> wrote:
> On Dienstag, 18. August 2020 15:25:56 CEST David Vossel wrote:
> > - Guest Agent SSH add/remove Support?
> >
> > As a PoC, I cobbled together some guest agent exec and file write client
> > commands which can technically achieve the desired result of
> > adding/removing entries in a /home/<user>/.ssh/authorized_keys file.
> It's a
> > little unwieldy, but it works.
> >
> > This got me thinking, an officially supported guest agent api for this
> ssh
> > key management would be really nice. There's already a somewhat related
> > precedent with the "guest-set-user-password" guest agent command.
> >
> > So here's the question. What would you all think about the guest agent
> API
> > being expanded with new commands for adding/removing ssh public keys from
> > authorized_keys files?
>
> There are two pass-through file systems in QEMU: 9pfs and virtiofs. Don't
> you
> think they would be sufficient for the use case?
>
probably not entirely.
Understand this isn't an either/or scenario. Our api has been designed to
support multiple "propagation" methods for the ssh keys. We've converged on
the qemu guest agent for some other features and the agent appears to have
the potential to provide us the greatest flexibility when it comes to how
we want this pub ssh key use case to work. This isn't to say something
like virtiofs won't make sense either in certain scenarios, but for the
purposes of this discussion we're hoping to explore how the qemu guest
agent could be used.
I don't want to go too deep into the shared filesystem approach. I'll
provide some context on the challenges there though.
- virtiofs requires guest kernel >= 5.4. We aren't considering 9p due to
security/performance concerns.
- file ownership/permissions. requires prior knowledge of uid/gid on the
host.
- persistence. if we share authorised_keys via virtiofs, then we have to
put this on a separate persistent network volume (otherwise user
modifications within guest are lost)
- potentially clobbers existing authorization_keys file on disk, with agent
we can merge our additions/removals to whatever the user has set in
authorized_keys.
- lack of KubeVirt support for virtiofs. however, it will likely make it
soon
> Best regards,
> Christian Schoenebeck
>
>
>
[-- Attachment #2: Type: text/html, Size: 3154 bytes --]
next prev parent reply other threads:[~2020-08-19 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 13:25 guest agent public ssh key add/remove support? David Vossel
2020-08-18 18:35 ` Christian Schoenebeck
2020-08-19 13:49 ` David Vossel [this message]
2020-08-19 14:17 ` Christian Schoenebeck
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=CAPjOJFsr2_0Kdp03jbSUZ2vpde41uHrS6ki_Wax4pZ-d8RTDvQ@mail.gmail.com \
--to=dvossel@redhat.com \
--cc=fdeutsch@redhat.com \
--cc=mprivozn@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu_oss@crudebyte.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).