Expand description
The keys this machine issued to paired devices, on disk.
Deliberately not in settings_kv beside proxy_api_key. That store is
printed in full by gglib config settings show — unmasked on purpose, so a
rotated key can be recovered — and that output is what people paste into
bug reports. One shared key there is a known cost; a device key each would
quietly undo what per-device revocation is for. The roster’s readable half
(ids, labels, last-seen) stays in settings; only the secrets are here.
Same directory and same posture as the endpoint identity: 0600, under
data/, which a debug build resolves to the repository checkout where
.gitignore covers it.
Statics§
- NEXT_
TMP 🔒 - Distinguishes one writer’s temporary file from another’s within a process; the pid does it across processes in one pid namespace.
Functions§
- create_
private 🔒 - Open the temporary file for writing: new, and
0600from the moment it exists. - device_
keys_ path - Where the keys live: beside the endpoint identity.
- load
- Read the roster’s keys, or an empty map when nothing has been issued.
- open_
new 🔒 create_new, with the mode asked ofopenitself.- restrict 🔒
0600exactly where the platform has a notion of it: the umask can take bits from the modeopen_newasked for, the owner’s own among them. Set on the descriptor, so what changes is the file this writer created and not whatever is under its name by now.- store
- Replace the stored keys,
0600, atomically.
Type Aliases§
- Device
Keys - Every device key this machine holds, by the id the tunnel edge knows it as.