Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Developer's Guide to Secrets Management

A Developer's Guide to Secrets Management

How do you as a developer use a secrets manager to protect application API tokens, keys, passwords, certificates, and more? In this session, I'll walk through some patterns of storing and using secrets that never change to secrets that change all the time. By learning how to use a secrets manager as a developer, you can keep your secrets a secret and limit the blast radius for a potential attack. You'll get hands on with HashiCorp Vault and .NET Core and figure out the best way to inject your secrets into your application.

Rosemary Wang

December 04, 2020
Tweet

More Decks by Rosemary Wang

Other Decks in Programming

Transcript

  1. Secrets Passwords, API tokens, SSL Certificates, or any other sensitive

    information your application needs to access something else. @joatmon08
  2. ▪ Storage (retrieve via GET request) ▪ Revocation (expire using

    leases) ▪ Rotation (change sensitive information) @joatmon08
  3. Terms You Need to Know Your administrator likely configured these

    for you. Auth Methods. Use these to authenticate to Vault. ▪ AppRole ▪ GitHub ▪ JWT/OIDC Secrets Engines. Use these to rotate and retrieve secrets. ▪ Key-value store ▪ Database usernames and passwords ▪ API Token @joatmon08
  4. Summary Benefits ▪ Good for static secrets ▪ Can be

    unit tested ▪ Secure because in memory Problems ▪ Need application reload or separate thread for new secrets ▪ Connection failure for secrets manager ▪ Doesn’t scale for dynamic secrets @joatmon08
  5. @joatmon08 GET SECRETS AUTHENTICATE TO SECRETS MANAGER SECRETS INJECTION VAULT

    AGENT RUN APPLICATION Read Secrets Async in Separate Process FILE OF SECRETS
  6. Summary Benefits ▪ Separation of concerns ▪ Handles changing secrets

    ▪ No additional code ▪ File caches secrets Problems ▪ Requires separate process ▪ Application must reload if file changes ▪ Secrets in file (less secure?) @joatmon08
  7. @joatmon08 GET SECRETS AUTHENTICATE TO SECRETS MANAGER SECRETS INJECTION RUN

    APPLICATION Read Secrets & Reload Application FILE OF SECRETS VAULT AGENT CONSUL TEMPLATE