Skip to content

podman container hardening #168

Description

@0xlua

NixOS

There is a great overview with guides and additional resources to harden the base OS in the Wiki.

Basic Hardening

Health checks

  • replace "is the process alive" with real HTTP check
  • each runtime needs its own approach:
    • Node: no curl, use Node's http module inline
    • Python slim: no curl, use urllib
    • Postgres: pg_isready just works

HTTP Headers

Secrets

  • use sops for secrets
  • when possible no plain-text env vars: prefer Files / Podman Secrets
  • API Keys: Use scoped tokens where possible

Fix once

  • use OIDC everywhere: 2FA/Passkeys
  • use volumes only for data, move config to this flake: caddy-etc, stalwart-etc, ...

Reverse Proxy

  • Use TLS 1.2 minimum, Restricted ciphers (already default in caddy).
  • (Optional) switch to nginx and lego / certbot

Sources

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions