
Secrets Management for Rust Services in Production
Keep credentials out of images, repositories and logs. Compare environment variables, mounted files, systemd credentials and a secret manager, and plan for rotation.
Auditing dependencies, handling hostile input and closing the gaps attackers actually use.

Keep credentials out of images, repositories and logs. Compare environment variables, mounted files, systemd credentials and a secret manager, and plan for rotation.

Hash passwords with Argon2id using the argon2 crate: choose parameters, store the PHC string, verify in constant time and rehash when settings change.

Limit requests per client in Axum with a small middleware, then see when to switch to tower_governor or a Redis counter. Includes fixed windows, token buckets and 429 responses.

Handle HTML forms and multipart file uploads in Axum 0.8: Form, Multipart, size limits, content type checks, safe filenames and streaming to disk.

cargo-deny checks advisories, licenses, banned crates and registry sources from one deny.toml. See a working configuration, how to read failures and how to add exceptions with a reason.

Every crate you add runs with your privileges, and build scripts and proc macros run at compile time. Learn how advisories work, how to read a RustSec entry and how to limit the surface.

A practical threat model for Rust code: what the compiler prevents, what it does not, and the checklist of supply chain, input handling, secrets, cryptography and deployment risks.
We send one email when a new post is published. No spam.