Documentation
¶
Overview ¶
Package securefile creates and checks files that hold secrets: the CLI config, which holds the private key and passphrase in cleartext, and the KeePass export.
Create writes them at 0600 and RepairMode fixes the default config (a --config path is only reported, through Exposure). On Windows a protected ACL granting only the caller, SYSTEM and Administrators replaces 0600. A mode or ACL still loose after tightening, or a file someone else owns, is written anyway and the caller warns through Exposure; only a target that is not a regular file is refused. Where the file is stored is the user's choice; SECURITY.md says which places permissions cannot protect.
securefile_unix.go and securefile_windows.go implement the same platform functions, listed in securefile.go; their helpers live in posixmode and winacl.
The package writes nothing to the terminal, so it can sit below util.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create creates or truncates path as a regular file owned by the caller, mode 0600 or its Windows ACL equivalent.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package posixmode holds the permission-bit helpers behind securefile on Unix.
|
Package posixmode holds the permission-bit helpers behind securefile on Unix. |
|
Package winacl holds the Windows ACL helpers behind securefile: the caller's SIDs, the private descriptor that stands in for 0600, and the check that a DACL exposes nobody else, which reads the DACL through the SDDL parser in sddl.go.
|
Package winacl holds the Windows ACL helpers behind securefile: the caller's SIDs, the private descriptor that stands in for 0600, and the check that a DACL exposes nobody else, which reads the DACL through the SDDL parser in sddl.go. |