ia64/xen-unstable

annotate tools/examples/xend-config.sxp @ 16272:dc3fcd5dd4eb

qemu vnc auth 4/4: XenD config for VNC TLS protocol

This patch adds support to XenD for configuring the previously added
TLS encryption and x509 certificate validation. At this time I have
only enabled this config to be done system-wide via
/etc/xen/xend-config.sxp. Since it requires the admin to add
certificates on the local FS, there's not much point in making it per
VM. The x509 certificates are located in /etc/xen/vnc. Since this
requires a special VNC client program (GTK-VNC,
virt-viewer/virt-manager or VeNCrypt viewer) the use of TLS is
disabled by default. Admins can enable it if they are using a suitable
client.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
author Keir Fraser <keir@xensource.com>
date Tue Oct 30 09:32:10 2007 +0000 (2007-10-30)
parents 752d6e94a4c0
children dc6264577b59
rev   line source
emellor@7467 1 # -*- sh -*-
emellor@7467 2
emellor@7467 3 #
mjw@1723 4 # Xend configuration file.
emellor@7467 5 #
mjw@1723 6
nivedita@8404 7 # This example configuration is appropriate for an installation that
nivedita@8404 8 # utilizes a bridged network configuration. Access to xend via http
nivedita@8404 9 # is disabled.
emellor@7467 10
emellor@7467 11 # Commented out entries show the default for that entry, unless otherwise
emellor@7467 12 # specified.
emellor@7467 13
kaf24@11316 14 #(logfile /var/log/xen/xend.log)
emellor@7467 15 #(loglevel DEBUG)
mjw@1723 16
ewan@12606 17
ewan@12606 18 # The Xen-API server configuration. (Please note that this server is
ewan@12606 19 # available as an UNSUPPORTED PREVIEW in Xen 3.0.4, and should not be relied
ewan@12606 20 # upon).
ewan@12604 21 #
ewan@12604 22 # This value configures the ports, interfaces, and access controls for the
ewan@12604 23 # Xen-API server. Each entry in the list starts with either unix, a port
ewan@12604 24 # number, or an address:port pair. If this is "unix", then a UDP socket is
ewan@12604 25 # opened, and this entry applies to that. If it is a port, then Xend will
ewan@12606 26 # listen on all interfaces on that TCP port, and if it is an address:port
ewan@12606 27 # pair, then Xend will listen on the specified port, using the interface with
ewan@12606 28 # the specified address.
ewan@12606 29 #
ewan@12606 30 # The subsequent string configures the user-based access control for the
ewan@12606 31 # listener in question. This can be one of "none" or "pam", indicating either
ewan@12606 32 # that users should be allowed access unconditionally, or that the local
ewan@12606 33 # Pluggable Authentication Modules configuration should be used. If this
ewan@12606 34 # string is missing or empty, then "pam" is used.
ewan@12604 35 #
ewan@12606 36 # The final string gives the host-based access control for that listener. If
ewan@12606 37 # this is missing or empty, then all connections are accepted. Otherwise,
ewan@12606 38 # this should be a space-separated sequence of regular expressions; any host
ewan@12606 39 # with a fully-qualified domain name or an IP address that matches one of
ewan@12606 40 # these regular expressions will be accepted.
ewan@12604 41 #
ewan@12606 42 # Example: listen on TCP port 9363 on all interfaces, accepting connections
ewan@12606 43 # only from machines in example.com or localhost, and allow access through
ewan@12606 44 # the unix domain socket unconditionally:
ewan@12604 45 #
ewan@12606 46 # (xen-api-server ((9363 pam '^localhost$ example\\.com$')
ewan@12606 47 # (unix none)))
ewan@12604 48 #
ewan@14609 49 # Optionally, the TCP Xen-API server can use SSL by specifying the private
ewan@14609 50 # key and certificate location:
ewan@14609 51 #
ewan@14609 52 # (9367 pam '' /etc/xen/xen-api.key /etc/xen/xen-api.crt)
ewan@14609 53 #
ewan@12604 54 # Default:
ewan@12604 55 # (xen-api-server ((unix)))
ewan@12604 56
ewan@12606 57
emellor@7467 58 #(xend-http-server no)
emellor@9425 59 #(xend-unix-server no)
emellor@9425 60 #(xend-tcp-xmlrpc-server no)
emellor@9425 61 #(xend-unix-xmlrpc-server yes)
emellor@7467 62 #(xend-relocation-server no)
emellor@7467 63 (xend-relocation-server yes)
emellor@7467 64
emellor@7467 65 #(xend-unix-path /var/lib/xend/xend-socket)
mjw@4095 66
ewan@14609 67
ewan@14609 68 # Address and port xend should use for the legacy TCP XMLRPC interface,
atse@13616 69 # if xen-tcp-xmlrpc-server is set.
atse@13616 70 #(xen-tcp-xmlrpc-server-address 'localhost')
atse@13616 71 #(xen-tcp-xmlrpc-server-port 8006)
atse@13616 72
ewan@14609 73 # SSL key and certificate to use for the legacy TCP XMLRPC interface.
ewan@14609 74 # Setting these will mean that this port serves only SSL connections as
ewan@14609 75 # opposed to plaintext ones.
ewan@14609 76 #(xend-tcp-xmlrpc-server-ssl-key-file /etc/xen/xmlrpc.key)
ewan@14609 77 #(xend-tcp-xmlrpc-server-ssl-cert-file /etc/xen/xmlrpc.crt)
ewan@14609 78
atse@13616 79
emellor@7467 80 # Port xend should use for the HTTP interface, if xend-http-server is set.
emellor@7467 81 #(xend-port 8000)
emellor@7467 82
emellor@7467 83 # Port xend should use for the relocation interface, if xend-relocation-server
emellor@7467 84 # is set.
emellor@7467 85 #(xend-relocation-port 8002)
emellor@7467 86
emellor@7467 87 # Address xend should listen on for HTTP connections, if xend-http-server is
emellor@7467 88 # set.
mjw@1723 89 # Specifying 'localhost' prevents remote connections.
emellor@7467 90 # Specifying the empty string '' (the default) allows all connections.
emellor@7467 91 #(xend-address '')
nivedita@8404 92 #(xend-address localhost)
mjw@1723 93
emellor@7467 94 # Address xend should listen on for relocation-socket connections, if
emellor@7467 95 # xend-relocation-server is set.
emellor@7467 96 # Meaning and default as for xend-address above.
emellor@7467 97 #(xend-relocation-address '')
emellor@8326 98
emellor@8326 99 # The hosts allowed to talk to the relocation port. If this is empty (the
emellor@8326 100 # default), then all connections are allowed (assuming that the connection
emellor@8326 101 # arrives on a port and interface on which we are listening; see
emellor@8326 102 # xend-relocation-port and xend-relocation-address above). Otherwise, this
emellor@8326 103 # should be a space-separated sequence of regular expressions. Any host with
emellor@8326 104 # a fully-qualified domain name or an IP address that matches one of these
emellor@8326 105 # regular expressions will be accepted.
emellor@8326 106 #
emellor@8326 107 # For example:
ewan@12208 108 # (xend-relocation-hosts-allow '^localhost$ ^.*\\.example\\.org$')
emellor@8326 109 #
emellor@8326 110 #(xend-relocation-hosts-allow '')
kfraser@11071 111 (xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$')
mjw@4095 112
emellor@7441 113 # The limit (in kilobytes) on the size of the console buffer
emellor@7467 114 #(console-limit 1024)
emellor@7441 115
emellor@7557 116 ##
emellor@7557 117 # To bridge network traffic, like this:
emellor@7557 118 #
kfraser@15258 119 # dom0: ----------------- bridge -> real eth0 -> the network
emellor@7557 120 # |
emellor@7557 121 # domU: fake eth0 -> vifN.0 -+
emellor@7557 122 #
emellor@7557 123 # use
emellor@7557 124 #
emellor@7557 125 # (network-script network-bridge)
emellor@7557 126 #
emellor@8821 127 # Your default ethernet device is used as the outgoing interface, by default.
emellor@8821 128 # To use a different one (e.g. eth1) use
emellor@7557 129 #
emellor@7557 130 # (network-script 'network-bridge netdev=eth1')
emellor@7557 131 #
emellor@7557 132 # The bridge is named xenbr0, by default. To rename the bridge, use
emellor@7557 133 #
emellor@7557 134 # (network-script 'network-bridge bridge=<name>')
emellor@7557 135 #
emellor@7557 136 # It is possible to use the network-bridge script in more complicated
emellor@7557 137 # scenarios, such as having two outgoing interfaces, with two bridges, and
emellor@7557 138 # two fake interfaces per guest domain. To do things like this, write
emellor@7557 139 # yourself a wrapper script, and call network-bridge from it, as appropriate.
emellor@7557 140 #
emellor@7557 141 (network-script network-bridge)
kaf24@3431 142
emellor@7557 143 # The script used to control virtual interfaces. This can be overridden on a
emellor@7557 144 # per-vif basis when creating a domain or a configuring a new vif. The
emellor@7557 145 # vif-bridge script is designed for use with the network-bridge script, or
emellor@7557 146 # similar configurations.
emellor@7557 147 #
emellor@7557 148 # If you have overridden the bridge name using
emellor@7557 149 # (network-script 'network-bridge bridge=<name>') then you may wish to do the
emellor@7557 150 # same here. The bridge name can also be set when creating a domain or
emellor@7557 151 # configuring a new vif, but a value specified here would act as a default.
emellor@7557 152 #
emellor@7557 153 # If you are using only one bridge, the vif-bridge script will discover that,
emellor@7557 154 # so there is no need to specify it explicitly.
emellor@7557 155 #
emellor@7557 156 (vif-script vif-bridge)
emellor@7557 157
emellor@7557 158
emellor@7557 159 ## Use the following if network traffic is routed, as an alternative to the
emellor@7557 160 # settings for bridged networking given above.
emellor@7557 161 #(network-script network-route)
emellor@7557 162 #(vif-script vif-route)
emellor@7557 163
emellor@7557 164
emellor@7557 165 ## Use the following if network traffic is routed with NAT, as an alternative
emellor@7557 166 # to the settings for bridged networking given above.
emellor@7557 167 #(network-script network-nat)
emellor@7557 168 #(vif-script vif-nat)
emellor@7557 169
mjw@1723 170
kaf24@5932 171 # Dom0 will balloon out when needed to free memory for domU.
kaf24@5932 172 # dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.
kaf24@5932 173 # If dom0-min-mem=0, dom0 will never balloon out.
iap10@8218 174 (dom0-min-mem 196)
kaf24@5932 175
cl349@6916 176 # In SMP system, dom0 will use dom0-cpus # of CPUS
kaf24@5932 177 # If dom0-cpus = 0, dom0 will take all cpus available
kaf24@5932 178 (dom0-cpus 0)
emellor@7467 179
emellor@7467 180 # Whether to enable core-dumps when domains crash.
emellor@7467 181 #(enable-dump no)
emellor@9727 182
emellor@9727 183 # The tool used for initiating virtual TPM migration
emellor@9727 184 #(external-migration-tool '')
ewan@12191 185
ewan@12191 186 # The interface for VNC servers to listen on. Defaults
ewan@12191 187 # to 127.0.0.1 To restore old 'listen everywhere' behaviour
ewan@12191 188 # set this to 0.0.0.0
ewan@12191 189 #(vnc-listen '127.0.0.1')
ewan@12191 190
ewan@12191 191 # The default password for VNC console on HVM domain.
ewan@12191 192 # Empty string is no authentication.
ewan@12191 193 (vncpasswd '')
kfraser@15519 194
keir@16272 195 # The VNC server can be told to negotiate a TLS session
keir@16272 196 # to encryption all traffic, and provide x509 cert to
keir@16272 197 # clients enalbing them to verify server identity. The
keir@16272 198 # GTK-VNC widget, virt-viewer, virt-manager and VeNCrypt
keir@16272 199 # all support the VNC extension for TLS used in QEMU. The
keir@16272 200 # TightVNC/RealVNC/UltraVNC clients do not.
keir@16272 201 #
keir@16272 202 # To enable this create x509 certificates / keys in the
keir@16272 203 # directory /etc/xen/vnc
keir@16272 204 #
keir@16272 205 # ca-cert.pem - The CA certificate
keir@16272 206 # server-cert.pem - The Server certificate signed by the CA
keir@16272 207 # server-key.pem - The server private key
keir@16272 208 #
keir@16272 209 # and then uncomment this next line
keir@16272 210 # (vnc-tls 1)
keir@16272 211
keir@16272 212 # The certificate dir can be pointed elsewhere..
keir@16272 213 #
keir@16272 214 # (vnc-x509-cert-dir /etc/xen/vnc)
keir@16272 215
keir@16272 216 # The server can be told to request & validate an x509
keir@16272 217 # certificate from the client. Only clients with a cert
keir@16272 218 # signed by the trusted CA will be able to connect. This
keir@16272 219 # is more secure the password auth alone. Passwd auth can
keir@16272 220 # used at the same time if desired. To enable client cert
keir@16272 221 # checking uncomment this:
keir@16272 222 #
keir@16272 223 # (vnc-x509-verify 1)
keir@16272 224
kfraser@15519 225 # The default keymap to use for the VM's virtual keyboard
kfraser@15519 226 # when not specififed in VM's configuration
kfraser@15519 227 #(keymap 'en-us')
kfraser@15519 228
keir@16260 229 # Script to run when the label of a resource has changed.
keir@16260 230 #(resource-label-change-script '')