Restrict showing of DRBD secret using types
authorHrvoje Ribicic <riba@google.com>
Tue, 1 Dec 2015 16:11:38 +0000 (16:11 +0000)
committerHrvoje Ribicic <riba@google.com>
Tue, 1 Dec 2015 16:50:53 +0000 (16:50 +0000)
commit6f9ba80f8312d5607da70841f698c49000a31126
treed9eba6da4f4fe6ba7e165c229474d8cb2e30db15
parente1cf5672686e333eb80efd78eeb095a6bfafe09f
Restrict showing of DRBD secret using types

While the Python changes from 2.9 do prevent Ganeti from accidentally
revealing the Haskell secret, they may not do so forever. The queries
are planned to switch from Python to Haskell at some point, and should
someone want to use the DRBD secret, they can do so easily.

As a more elegant way of hiding the secret, wrap it in a Private
wrapper, preventing it from leaking out unless explicitly requested.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
lib/objects.py
lib/storage/drbd.py
src/Ganeti/Config.hs
src/Ganeti/Objects.hs
test/hs/Test/Ganeti/Objects.hs
test/py/ganeti.storage.drbd_unittest.py