]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Mark private keys as secrets
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 15 Dec 2023 09:54:42 +0000 (10:54 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 16 Dec 2023 17:59:15 +0000 (18:59 +0100)
Let's ensure that these have a strict access mode.

mkosi/config.py

index 320f770b55a1bb7c779318d66424d05042fce3eb..073aa74a1113ffae6a7e8f53165597965fe0dde4 100644 (file)
@@ -1923,7 +1923,7 @@ SETTINGS = (
         dest="secure_boot_key",
         metavar="PATH",
         section="Validation",
-        parse=config_make_path_parser(),
+        parse=config_make_path_parser(secret=True),
         paths=("mkosi.key",),
         help="UEFI SecureBoot private key in PEM format",
     ),
@@ -1948,7 +1948,7 @@ SETTINGS = (
         dest="verity_key",
         metavar="PATH",
         section="Validation",
-        parse=config_make_path_parser(),
+        parse=config_make_path_parser(secret=True),
         paths=("mkosi.key",),
         help="Private key for signing verity signature in PEM format",
     ),
@@ -1971,7 +1971,7 @@ SETTINGS = (
         dest="passphrase",
         metavar="PATH",
         section="Validation",
-        parse=config_make_path_parser(required=False),
+        parse=config_make_path_parser(required=False, secret=True),
         paths=("mkosi.passphrase",),
         help="Path to a file containing the passphrase to use when LUKS encryption is selected",
     ),