Skip to content
  • Daniel P. Berrangé's avatar
    2a7e6857
    ui: fix reporting of VNC auth in query-vnc-servers · 2a7e6857
    Daniel P. Berrangé authored
    
    
    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",
                "vencrypt": "x509-vnc",
                "server": [
                    {
                        "host": "127.0.0.1"
                        "service": "5901",
                        "websocket": false,
                        "family": "ipv4",
                        "auth": "vencrypt",
                        "vencrypt": "x509-vnc"
                    },
                    {
                        "host": "127.0.0.1",
                        "service": "5902",
                        "websocket": true,
                        "family": "ipv4",
                        "auth": "vnc"
                    }
                ]
            }
        ]
    }
    
    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.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-id: 20170203120649.15637-3-berrange@redhat.com
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    2a7e6857
    ui: fix reporting of VNC auth in query-vnc-servers
    Daniel P. Berrangé authored
    
    
    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",
                "vencrypt": "x509-vnc",
                "server": [
                    {
                        "host": "127.0.0.1"
                        "service": "5901",
                        "websocket": false,
                        "family": "ipv4",
                        "auth": "vencrypt",
                        "vencrypt": "x509-vnc"
                    },
                    {
                        "host": "127.0.0.1",
                        "service": "5902",
                        "websocket": true,
                        "family": "ipv4",
                        "auth": "vnc"
                    }
                ]
            }
        ]
    }
    
    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.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    Message-id: 20170203120649.15637-3-berrange@redhat.com
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Loading