@@ -1732,37 +1732,45 @@ SASL service config /etc/sasl2/qemu.conf. If running QEMU as an
1732
1732
unprivileged user, an environment variable SASL_CONF_PATH can be used
1733
1733
to make it search alternate locations for the service config.
1734
1734
1735
- The default configuration might contain
1735
+ If the TLS option is enabled for VNC, then it will provide session encryption,
1736
+ otherwise the SASL mechanism will have to provide encryption. In the latter
1737
+ case the list of possible plugins that can be used is drastically reduced. In
1738
+ fact only the GSSAPI SASL mechanism provides an acceptable level of security
1739
+ by modern standards. Previous versions of QEMU referred to the DIGEST-MD5
1740
+ mechanism, however, it has multiple serious flaws described in detail in
1741
+ RFC 6331 and thus should never be used any more. The SCRAM-SHA-1 mechanism
1742
+ provides a simple username/password auth facility similar to DIGEST-MD5, but
1743
+ does not support session encryption, so can only be used in combination with
1744
+ TLS.
1745
+
1746
+ When not using TLS the recommended configuration is
1736
1747
1737
1748
@example
1738
- mech_list: digest-md5
1739
- sasldb_path : /etc/qemu/passwd.db
1749
+ mech_list: gssapi
1750
+ keytab : /etc/qemu/krb5.tab
1740
1751
@end example
1741
1752
1742
- This says to use the 'Digest MD5 ' mechanism, which is similar to the HTTP
1743
- Digest-MD5 mechanism. The list of valid usernames & passwords is maintained
1744
- in the /etc/qemu/passwd.db file, and can be updated using the saslpasswd2
1745
- command. While this mechanism is easy to configure and use, it is not
1746
- considered secure by modern standards, so only suitable for developers /
1747
- ad-hoc testing .
1753
+ This says to use the 'GSSAPI ' mechanism with the Kerberos v5 protocol, with
1754
+ the server principal stored in /etc/qemu/krb5.tab. For this to work the
1755
+ administrator of your KDC must generate a Kerberos principal for the server,
1756
+ with a name of 'qemu/somehost.example.com @@ EXAMPLE.COM' replacing
1757
+ 'somehost.example.com' with the fully qualified host name of the machine
1758
+ running QEMU, and 'EXAMPLE.COM' with the Kerberos Realm .
1748
1759
1749
- A more serious deployment might use Kerberos, which is done with the 'gssapi'
1750
- mechanism
1760
+ When using TLS, if username+password authentication is desired, then a
1761
+ reasonable configuration is
1751
1762
1752
1763
@example
1753
- mech_list: gssapi
1754
- keytab : /etc/qemu/krb5.tab
1764
+ mech_list: scram-sha-1
1765
+ sasldb_path : /etc/qemu/passwd.db
1755
1766
@end example
1756
1767
1757
- For this to work the administrator of your KDC must generate a Kerberos
1758
- principal for the server, with a name of 'qemu/somehost.example.com@@ EXAMPLE.COM'
1759
- replacing 'somehost.example.com' with the fully qualified host name of the
1760
- machine running QEMU, and 'EXAMPLE.COM' with the Kerberos Realm.
1768
+ The saslpasswd2 program can be used to populate the passwd.db file with
1769
+ accounts.
1761
1770
1762
- Other configurations will be left as an exercise for the reader. It should
1763
- be noted that only Digest-MD5 and GSSAPI provides a SSF layer for data
1764
- encryption. For all other mechanisms, VNC should always be configured to
1765
- use TLS and x509 certificates to protect security credentials from snooping.
1771
+ Other SASL configurations will be left as an exercise for the reader. Note that
1772
+ all mechanisms except GSSAPI, should be combined with use of TLS to ensure a
1773
+ secure data channel.
1766
1774
1767
1775
@node gdb_usage
1768
1776
@section GDB usage
0 commit comments