More work on deprecation/removal of clear text passwords
v2 cover More work on deprecation/removal of clear text passwords
This deprecates the -iscsi clear text 'password' option and deletes the previously deprecated -spice 'password' option.
Changed in v2:
* Fixed section placement for iscsi deprecation docs
* Fixed missing brackets in -iscsi help
* Write in past tense for -spice password removal docs
Daniel P. Berrangé (3):
block: mention 'password-secret' option for -iscsi
block: deprecate iSCSI 'password' in favour of 'password-secret'
ui: remove deprecated 'password' option for SPICE
block/iscsi.c | 3 +++ docs/about/deprecated.rst | 16 ++++++++-------- docs/about/removed-features.rst | 7 +++++++ qemu-options.hx | 13 +++---------- ui/spice-core.c | 15 --------------- 5 files changed, 21 insertions(+), 33 deletions(-)
Signature · 1 line
2.38.1
PATCH v2 1/3 block: mention 'password-secret' option for -iscsi
The 'password-secret' option was added
commit b189346eb1784df95ed6fed610411dbf23d19e1f
Author: Daniel P. Berrangé <[email protected]>
Date: Thu Jan 21 14:19:21 2016 +0000
iscsi: add support for getting CHAP password via QCryptoSecret API
but was not mentioned in the command line docs
--- qemu-options.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
qemu-options.hx +2 -2
@@ -1889,8 +1889,8 @@ SRST ERST DEF("iscsi", HAS_ARG, QEMU_OPTION_iscsi, - "-iscsi [user=user][,password=password]\n" - " [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE\n" + "-iscsi [user=user][,password=password][,password-secret=secret-id]\n" + " [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE]\n" " [,initiator-name=initiator-iqn][,id=target-iqn]\n" " [,timeout=timeout]\n" " iSCSI session parameters\n", QEMU_ARCH_ALL)
Signature · 1 line
2.38.1
Re: [PATCH v2 1/3] block: mention 'password-secret' option for -iscsi
Quoted 6 lines · Daniel P. Berrangé
The 'password-secret' option was added
commit
b189346eb1784df95ed6fed610411dbf23d19e1f
Author: Daniel P. Berrangé <[email protected]>
Date: Thu Jan 21 14:19:21 2016 +0000
Quoted 6 lines
iscsi: add support for getting CHAP password via QCryptoSecret API
but was not mentioned in the command line docs
Reviewed-by Markus Armbruster <[email protected]>Signed-off-by Daniel P. Berrangé <[email protected]>
PATCH v2 2/3 block: deprecate iSCSI 'password' in favour of 'password-secret'
In reply to Daniel P. BerrangéSupport for referencing secret objects was added in
commit b189346eb1784df95ed6fed610411dbf23d19e1f
Author: Daniel P. Berrangé <[email protected]>
Date: Thu Jan 21 14:19:21 2016 +0000
iscsi: add support for getting CHAP password via QCryptoSecret API
The existing 'password' option is overdue for deprecation and subsequent removal.
--- block/iscsi.c | 3 +++ docs/about/deprecated.rst | 8 ++++++++ 2 files changed, 11 insertions(+)
block/iscsi.c +3 -0
@@ -1352,6 +1352,9 @@ static void apply_chap(struct iscsi_context *iscsi, QemuOpts *opts, }else if (!password) {error_setg (errp,"CHAP username specified but no password was given" );return ; + }else { +warn_report ("iSCSI block driver 'password' option is deprecated, " +"use 'password-secret' instead" ); }if (iscsi_set_initiator_username_pwd (iscsi, user, password)) {
docs/about/deprecated.rst +8 -0
@@ -333,6 +333,14 @@ The above, converted to the current supported format:: json:{"file.driver":"rbd", "file.pool":"rbd", "file.image":"name"} +``iscsi,password=xxx`` (since 8.0) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Specifying the iSCSI password in plain text on the command line using the +``password`` option is insecure. The ``password-secret`` option should be +used instead, to refer to a ``--object secret...`` instance that provides +a password via a file, or encrypted. + Backwards compatibility -----------------------
Signature · 1 line
2.38.1
Re: [PATCH v2 2/3] block: deprecate iSCSI 'password' in favour of 'password-secret'
Quoted 6 lines · Daniel P. Berrangé
Support for referencing secret objects was added in
commit
b189346eb1784df95ed6fed610411dbf23d19e1f
Author: Daniel P. Berrangé <[email protected]>
Date: Thu Jan 21 14:19:21 2016 +0000
Quoted 6 lines
iscsi: add support for getting CHAP password via QCryptoSecret API
The existing 'password' option is overdue for deprecation and subsequent removal.
Signed-off-by Daniel P. Berrangé <[email protected]>
PATCH v2 3/3 ui: remove deprecated 'password' option for SPICE
In reply to Daniel P. BerrangéThis has been replaced by the 'password-secret' option, which references a 'secret' object instance.
--- docs/about/deprecated.rst | 8 -------- docs/about/removed-features.rst | 7 +++++++ qemu-options.hx | 9 +-------- ui/spice-core.c | 15 --------------- 4 files changed, 8 insertions(+), 31 deletions(-)
docs/about/deprecated.rst +0 -8
@@ -73,14 +73,6 @@ Input parameters that take a size value should only use a size suffix the value is hexadecimal. That is, '0x20M' is deprecated, and should be written either as '32M' or as '0x2000000'. -``-spice password=string`` (since 6.0) -'''''''''''''''''''''''''''''''''''''' - -This option is insecure because the SPICE password remains visible in -the process listing. This is replaced by the new ``password-secret`` -option which lets the password be securely provided on the command -line using a ``secret`` object instance. - ``-smp`` ("parameter=0" SMP configurations) (since 6.2) '''''''''''''''''''''''''''''''''''''''''''''''''''''''
docs/about/removed-features.rst +7 -0
@@ -408,6 +408,13 @@ pcspk-audiodev=<name>``. Use ``-device`` instead. +``-spice password=string`` (removed in 8.0) +''''''''''''''''''''''''''''''''''''''''''' + +This optionwas insecure because the SPICE password remained visible in +the process listing. This was replaced by the new ``password-secret`` +option which lets the password be securely provided on the command +line using a ``secret`` object instance. QEMU Machine Protocol (QMP) commands ------------------------------------
qemu-options.hx +1 -8
@@ -2132,7 +2132,7 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice, " [,tls-channel=[main|display|cursor|inputs|record|playback]]\n" " [,plaintext-channel=[main|display|cursor|inputs|record|playback]]\n" " [,sasl=on|off][,disable-ticketing=on|off]\n" - " [,password=<string>][,password-secret=<secret-id>]\n" + " [,password-secret=<secret-id>]\n" " [,image-compression=[auto_glz|auto_lz|quic|glz|lz|off]]\n" " [,jpeg-wan-compression=[auto|never|always]]\n" " [,zlib-glz-wan-compression=[auto|never|always]]\n"
@@ -2158,13 +2158,6 @@ SRST ``ipv4=on|off``; \ ``ipv6=on|off``; \ ``unix=on|off`` Force using the specified IP version. - ``password=<string>`` - Set the password you need to authenticate. - - This option is deprecated and insecure because it leaves the - password visible in the process listing. Use ``password-secret`` - instead. - ``password-secret=<secret-id>`` Set the ID of the ``secret`` object containing the password you need to authenticate.
ui/spice-core.c +0 -15
@@ -412,9 +412,6 @@ static QemuOptsList qemu_spice_opts = { .name = "unix", .type = QEMU_OPT_BOOL,#endif - },{ - .name = "password", - .type = QEMU_OPT_STRING, },{ .name = "password-secret", .type = QEMU_OPT_STRING,
@@ -666,20 +663,8 @@ static void qemu_spice_init(void) } passwordSecret =qemu_opt_get (opts,"password-secret" );if (passwordSecret) { -if (qemu_opt_get (opts,"password" )) { -error_report ("'password' option is mutually exclusive with " -"'password-secret'" ); -exit (1 ); - } password =qcrypto_secret_lookup_as_utf8 (passwordSecret, &error_fatal); - }else { - str =qemu_opt_get (opts,"password" ); -if (str) { -warn_report ("'password' option is deprecated and insecure, " -"use 'password-secret' instead" ); - password =g_strdup (str); - } }if (tls_port) {
Signature · 1 line
2.38.1
Re: [PATCH v2 3/3] ui: remove deprecated 'password' option for SPICE
Quoted 5 lines · Daniel P. Berrangé
This has been replaced by the 'password-secret' option, which references a 'secret' object instance.
Reviewed-by Markus Armbruster <[email protected]>Signed-off-by Daniel P. Berrangé <[email protected]>
Just a small detail below.
Quoted 31 lines
--- docs/about/deprecated.rst | 8 -------- docs/about/removed-features.rst | 7 +++++++ qemu-options.hx | 9 +-------- ui/spice-core.c | 15 --------------- 4 files changed, 8 insertions(+), 31 deletions(-)docs/about/deprecated.rst +0
-8@@ -73,14 +73,6 @@ Input parameters that take a size value should only use a size suffix the value is hexadecimal. That is, '0x20M' is deprecated, and should be written either as '32M' or as '0x2000000'. -``-spice password=string`` (since 6.0) -'''''''''''''''''''''''''''''''''''''' - -This option is insecure because the SPICE password remains visible in -the process listing. This is replaced by the new ``password-secret`` -option which lets the password be securely provided on the command -line using a ``secret`` object instance. - ``-smp`` ("parameter=0" SMP configurations) (since 6.2) '''''''''''''''''''''''''''''''''''''''''''''''''''''''docs/about/removed-features.rst +0
-0
docs/about/removed-features.rst pcspk-audiodev=<name>``. · line 414
Quoted 7 lines
docs/about/removed-features.rst +4
-0@@ -408,6 +408,13 @@ pcspk-audiodev=<name>``. Use ``-device`` instead. +``-spice password=string`` (removed in 8.0) +''''''''''''''''''''''''''''''''''''''''''' + +This optionwas insecure because the SPICE password remained visible in
Missing a space here.
Quoted 68 lines
docs/about/removed-features.rst +3
-0+the process listing. This was replaced by the new ``password-secret`` +option which lets the password be securely provided on the command +line using a ``secret`` object instance. QEMU Machine Protocol (QMP) commands ------------------------------------qemu-options.hx +1
-8@@ -2132,7 +2132,7 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice, " [,tls-channel=[main|display|cursor|inputs|record|playback]]\n" " [,plaintext-channel=[main|display|cursor|inputs|record|playback]]\n" " [,sasl=on|off][,disable-ticketing=on|off]\n" - " [,password=<string>][,password-secret=<secret-id>]\n" + " [,password-secret=<secret-id>]\n" " [,image-compression=[auto_glz|auto_lz|quic|glz|lz|off]]\n" " [,jpeg-wan-compression=[auto|never|always]]\n" " [,zlib-glz-wan-compression=[auto|never|always]]\n"@@ -2158,13 +2158,6 @@ SRST ``ipv4=on|off``; \ ``ipv6=on|off``; \ ``unix=on|off`` Force using the specified IP version. - ``password=<string>`` - Set the password you need to authenticate. - - This option is deprecated and insecure because it leaves the - password visible in the process listing. Use ``password-secret`` - instead. - ``password-secret=<secret-id>`` Set the ID of the ``secret`` object containing the password you need to authenticate.ui/spice-core.c +0
-15@@ -412,9 +412,6 @@ static QemuOptsList qemu_spice_opts = { .name = "unix", .type = QEMU_OPT_BOOL,#endif - },{ - .name = "password", - .type = QEMU_OPT_STRING, },{ .name = "password-secret", .type = QEMU_OPT_STRING,@@ -666,20 +663,8 @@ static void qemu_spice_init(void) } passwordSecret =qemu_opt_get (opts,"password-secret" );if (passwordSecret) { -if (qemu_opt_get (opts,"password" )) { -error_report ("'password' option is mutually exclusive with " -"'password-secret'" ); -exit (1 ); - } password =qcrypto_secret_lookup_as_utf8 (passwordSecret, &error_fatal); - }else { - str =qemu_opt_get (opts,"password" ); -if (str) { -warn_report ("'password' option is deprecated and insecure, " -"use 'password-secret' instead" ); - password =g_strdup (str); - } }if (tls_port) {