qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/8] ui: fix reporting of VNC auth in query-vnc-servers
Date: Fri, 6 Jan 2017 09:06:08 -0600	[thread overview]
Message-ID: <f4a593e8-5d2a-062b-398c-1223a9ec4efc@redhat.com> (raw)
In-Reply-To: <20170105160701.22118-3-berrange@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3129 bytes --]

On 01/05/2017 10:06 AM, Daniel P. Berrange wrote:
> Currently the VNC authentication info is emitted at the
> top level of the query-vnc-servers data. This is wrong
> because the authentication scheme differs between plain
> and websockets when TLS is enabled. We should instead
> report auth against the individual servers. e.g.
> 
> (QEMU) query-vnc-servers
> {
>     "return": [
>         {
>             "clients": [],
>             "id": "default",
>             "auth": "vencrypt",

So we have to keep the old location for back-compat,...

>             "vencrypt": "x509-vnc",
>             "server": [
>                 {
>                     "host": "127.0.0.1"
>                     "service": "5901",
>                     "websocket": false,
>                     "family": "ipv4",
>                     "auth": "vencrypt",
>                     "vencrypt": "x509-vnc",

No trailing comma (JSON is too picky)

>                 }
>                 {
>                     "host": "127.0.0.1",
>                     "service": "5902",
>                     "websocket": true,
>                     "family": "ipv4",
>                     "auth": "vnc"

...but add the new location to fix the problem.
>                 },

No trailing comma

>             ]
>         }
>     ]
> }
> 
> This also future proofs the QMP schema so that we can
> cope with multiple VNC server instances, listening on
> different interfaces or ports, with different auth
> setup.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  qapi-schema.json | 26 +++++++++++++++--
>  ui/vnc.c         | 85 +++++++++++++++++++++++++++++++++-----------------------
>  2 files changed, 73 insertions(+), 38 deletions(-)
> 

>  
> +
> +##
> +# @VncServerInfo2
> +#
> +# The network connection information for server
> +#
> +# @auth: The current authentication type used by the server
> +#
> +# @vencrypt: #optional The vencrypt sub authentication type used by the server,
> +#            only specified in case auth == vencrypt.
> +#
> +# Since: 2.8

2.9, actually

> @@ -1210,7 +1230,7 @@
>  # @clients: A list of @VncClientInfo of all currently connected clients.
>  #           The list can be empty, for obvious reasons.
>  #
> -# @auth: The current authentication type used by the server
> +# @auth: The current authentication type used by the non-websockets server

Since server is an array, should this read 'servers' or even 'server(s)'?

>  #
>  # @vencrypt: #optional The vencrypt sub authentication type used by the server,
>  #            only specified in case auth == vencrypt.
> @@ -1221,7 +1241,7 @@
>  ##
>  { 'struct': 'VncInfo2',
>    'data': { 'id'        : 'str',
> -            'server'    : ['VncBasicInfo'],
> +            'server'    : ['VncServerInfo2'],

Backwards-compatible, so you're fine making the change.

Once the nits are resolved, you can add:
Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-01-06 15:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05 16:06 [Qemu-devel] [PATCH 0/8] Support multiple listening sockets per VNC server Daniel P. Berrange
2017-01-05 16:06 ` [Qemu-devel] [PATCH 1/8] ui: fix regression handling bare 'websocket' option to -vnc Daniel P. Berrange
2017-01-06 13:39   ` Eric Blake
2017-01-05 16:06 ` [Qemu-devel] [PATCH 2/8] ui: fix reporting of VNC auth in query-vnc-servers Daniel P. Berrange
2017-01-06 15:06   ` Eric Blake [this message]
2017-01-05 16:06 ` [Qemu-devel] [PATCH 3/8] ui: refactor VncDisplay to allow multiple listening sockets Daniel P. Berrange
2017-01-06 15:23   ` Eric Blake
2017-01-06 15:28     ` Daniel P. Berrange
2017-01-05 16:06 ` [Qemu-devel] [PATCH 4/8] ui: refactor code for populating SocketAddress from vnc_display_open Daniel P. Berrange
2017-01-06 15:47   ` Eric Blake
2017-01-05 16:06 ` [Qemu-devel] [PATCH 5/8] ui: extract code to connect/listen " Daniel P. Berrange
2017-01-06 16:00   ` Eric Blake
2017-01-05 16:06 ` [Qemu-devel] [PATCH 6/8] ui: let VNC server listen on all resolved IP addresses Daniel P. Berrange
2017-01-06 16:14   ` Eric Blake
2017-01-05 16:07 ` [Qemu-devel] [PATCH 7/8] util: add qemu_opt_get_all() to get repeated opts Daniel P. Berrange
2017-01-06 16:22   ` Eric Blake
2017-01-05 16:07 ` [Qemu-devel] [PATCH 8/8] ui: add ability to specify multiple VNC listen addresses Daniel P. Berrange
2017-01-06 16:34   ` Eric Blake
2017-01-05 17:26 ` [Qemu-devel] [PATCH 0/8] Support multiple listening sockets per VNC server no-reply

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=f4a593e8-5d2a-062b-398c-1223a9ec4efc@redhat.com \
    --to=eblake@redhat.com \
    --cc=berrange@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).