Skip to main content

Module secret

Module secret 

Source
Expand description

Permission checking for the files this project’s secrets live in.

The shape a secret takes here: it is named, on disk, and read once at startup, so process arguments never carry it. That is only as good as the file’s own permissions — a secret file the whole host can read has the same problem a process argument would leak, one layer down. This does not refuse a loose file; it complains, loudly enough that an operator notices before someone else reads it.

Structs§

PermissionWarning
A secret file whose permissions are wider than its owner.

Constants§

LOOSE_MASK 🔒
Bits that must not be set on a file holding a secret: group and other, every permission. 0600 is the only mode that passes.

Functions§

check_secret_permissions
Checks a secret file’s permissions, on Unix.