Interview Prep/Linux/Firewalls, MAC & Compliance

How do you protect secrets on a Linux server?

IntermediateProductionFirewalls, MAC & Compliance
Answer
  • Do not bake secrets into images or commit them to repos; fetch at runtime from Vault, AWS Secrets Manager/SSM, or use systemd credentials (LoadCredential=).
  • File permissions 0600/0640 owned by the service user, never world-readable.
  • Avoid passing secrets as command-line arguments (visible in ps and /proc/<pid>/cmdline); environment variables are visible in /proc/<pid>/environ to root and the same user.
  • Use instance roles instead of long-lived cloud keys.
All Linux questions Roadmap: Linux

More on Firewalls, MAC & Compliance