All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Josh Durgin <josh.durgin@dreamhost.com>,
	libvir-list@redhat.com, ceph-devel@vger.kernel.org
Subject: Re: [libvirt] [PATCH v5 4/4] qemu/rbd: improve rbd device specification
Date: Wed, 16 Nov 2011 10:25:46 +0000	[thread overview]
Message-ID: <20111116102546.GE25332@redhat.com> (raw)
In-Reply-To: <4EC2FE47.60501@redhat.com>

On Tue, Nov 15, 2011 at 05:05:27PM -0700, Eric Blake wrote:
> On 10/31/2011 07:29 PM, Josh Durgin wrote:
> > From: Sage Weil <sage@newdream.net>
> > +        if (sec) {
> > +            char *base64 = NULL;
> > +
> > +            secret = (char *)conn->secretDriver->getValue(sec, &secret_size, 0,
> > +                                                          VIR_SECRET_GET_VALUE_INTERNAL_CALL);
> > +            if (secret == NULL) {
> > +                qemuReportError(VIR_ERR_INTERNAL_ERROR,
> > +                                _("could not get the value of the secret for username %s"),
> > +                                disk->auth.username);
> > +                goto error;
> > +            }
> > +            /* qemu/librbd wants it base64 encoded */
> > +            base64_encode_alloc(secret, secret_size, &base64);
> > +            if (!base64) {
> > +                virReportOOMError();
> > +                goto error;
> > +            }
> > +            virBufferEscape(opt, ":", ":key=%s:auth_supported=cephx none",
> > +                            base64);
> > +            VIR_FREE(base64);
> 
> The command line that we pass to qemu gets logged.  But what happens if
> the secret was marked as ephemeral - could we be violating the premise
> of not exposing passwords to too broad an audience?  Or are we already
> safe in that the log entries created by virCommand can only be exposed
> to users that already can get at the secret information by other means?
> 
> Maybe this means we should we be adding capabilities into virCommand to
> prevent the logging of the actual secret (whether base64-encoded or
> otherwise), and instead log an alternate string?  That is, should
> virCommand be tracking parallel argv arrays; the real array passed to
> exec() but never logged, and the alternate array (normally matching the
> real one, but which can differ in this particular case of passing an
> argument that contains a password)?

The passing of secrets on the command line is just a temporary hack
we're doing to prove the overall handling of passwords for Ceph. The
real plan is to set them via  monitor command in QEMU, but we're just
waiting for some QEMU work before changing libvirt todo that.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  parent reply	other threads:[~2011-11-16 10:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20 18:01 [RFC PATCH v3 0/4] Improve Ceph Qemu+RBD support Josh Durgin
2011-10-20 18:01 ` [RFC PATCH v3 1/4] secret: add Ceph secret type Josh Durgin
2011-10-27  8:28   ` Daniel P. Berrange
2011-10-28 16:33     ` [libvirt] " Eric Blake
2011-10-28 16:42       ` Eric Blake
2011-10-28 17:41     ` Eric Blake
2011-10-28 18:47       ` Josh Durgin
2011-10-28 18:56         ` Eric Blake
2011-10-20 18:01 ` [RFC PATCH v3 2/4] storage: add auth to virDomainDiskDef Josh Durgin
2011-10-27  8:33   ` Daniel P. Berrange
2011-10-28 18:53     ` [libvirt] " Eric Blake
2011-10-28 19:15       ` Josh Durgin
2011-10-28 21:19         ` [PATCH 1/1] Use a common xml type for ceph secret usage Josh Durgin
2011-10-28 22:03           ` Eric Blake
2011-10-20 18:01 ` [RFC PATCH v3 3/4] qemu: pass virConnectPtr into Domain{Attach,Detach}* Josh Durgin
2011-10-27  8:33   ` Daniel P. Berrange
2011-10-31 19:14     ` [libvirt] [RFC PATCH v3 3/4] qemu: pass virConnectPtr into Domain{Attach, Detach}* Eric Blake
2011-10-20 18:01 ` [RFC PATCH v3 4/4] qemu/rbd: improve rbd device specification Josh Durgin
2011-10-27  8:38   ` Daniel P. Berrange
2011-10-28 21:19     ` [PATCH v4 " Josh Durgin
2011-10-31 20:02       ` Eric Blake
2011-11-01  1:29         ` [PATCH v5 " Josh Durgin
2011-11-16  0:05           ` Eric Blake
2011-11-16  1:37             ` Josh Durgin
2011-11-16 15:40               ` Eric Blake
2011-11-16 10:25             ` Daniel P. Berrange [this message]
2011-10-27  5:19 ` [RFC PATCH v3 0/4] Improve Ceph Qemu+RBD support Sage Weil

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=20111116102546.GE25332@redhat.com \
    --to=berrange@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=eblake@redhat.com \
    --cc=josh.durgin@dreamhost.com \
    --cc=libvir-list@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.