Skip to content

Allow age.keyFile to be in Nix store #840

@dotdoom

Description

@dotdoom

Fragment in question:

age = {
keyFile = lib.mkOption {
type = lib.types.nullOr pathNotInStore;
default = null;
example = "/var/lib/sops-nix/key.txt";
description = ''
Path to age key file used for sops decryption.
'';
};

I understand the reason for pathNotInStore is to prevent people from accidentally leaking a private key key into the (world-readable) Nix store.

However with some age plugins like age-plugin-tpm for example, the contained blob is mostly useless to attacker today, as the data is sealed with a target host TPM key.

Would it make sense to add an extra option, e.g. "allowKeyInPublicReadableNixStore" which would lift the requirement for age.keyFile to be "pathNotInStore"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions