os-brick/os_brick
Lee Yarwood 8c401a68bb encryptors: Workaround mangled passphrases
Prior to Ib563b0ea the passphrase used by CryptsetupEncryptor and
LuksEncryptor had any leading zeros per hexadecimal digit removed, for
example 0x04 or 04 would turn into 0x4 or 4. As a result any volume
encrypted prior to the release of Newton used a modified passphrase that
was different to that stored by the key manager being used in the
environment.

To correct this for LuksEncryptor volumes permission denied errors are
now caught when attempting to open a volume. A second attempt to open
the volume is then made using a mangled passphrase. If successful the
correct passphrase is then added to the volume before the mangled
passphrase is finally removed. This workaround can be removed in a
future release once it is safe to assume that all LuksEncryptor volumes
have had any mangled passphrases replaced in this way.

This isn't possible for CryptsetupEncryptor volumes as the plain mode
used by cryptsetup does not provide a way for adding and removing keys.
As such on a permission denied error a second attempt is made to open
the volume using a mangled passphrase. Unlike the above workaround this
cannot be removed in a future release.

Change-Id: I7096463c5eba951dd6322ee6965435e877ca0371
Partial-bug: #1633518
(cherry picked from commit 7e33521a39)
2016-12-23 15:09:29 +00:00
..
encryptors encryptors: Workaround mangled passphrases 2016-12-23 15:09:29 +00:00
initiator RBD: enclose ipv6 addresses in square brackets 2016-11-14 11:21:40 -05:00
local_dev Remove race condition from lvextend 2016-08-01 20:08:07 +00:00
privileged Trivial rootwrap -> privsep replacement 2016-04-15 15:29:25 +00:00
remotefs RemoteFsClient extend Executor 2016-08-08 07:28:07 -07:00
tests encryptors: Workaround mangled passphrases 2016-12-23 15:09:29 +00:00
__init__.py Update os-brick requirements 2015-04-17 17:11:34 +00:00
exception.py Remove race condition from lvextend 2016-08-01 20:08:07 +00:00
executor.py Fix cmd execution stderr, stdout unicode errors 2016-12-23 15:09:11 +00:00
i18n.py Drop use of 'oslo' namespace package 2015-04-28 22:25:57 +00:00
utils.py Mask out passwords when tracing 2016-08-24 16:09:19 -07:00
version.py Add reno for release notes management 2016-01-20 19:19:36 -06:00