liveBook · Manning

Secret management

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

A secrets manager is a system for securely storing, controlling access to, and rotating sensitive credentials such as passwords.

A secrets manager securely stores and manages credentials that infrastructure and delivery systems need, including passwords, certificates, private keys, SSH keys, and API tokens. section 2.3.6 section 8.1

Use a secrets manager to:

  • Keep secrets outside infrastructure-as-code and version control rather than hardcoding them in plaintext. section 2.3.6
  • Pass secrets into IaC as variables and use them in memory during configuration. section 2.3.6
  • Rotate credentials and certificates centrally, then rerun IaC to apply updated values. section 2.3.6 section 8.1
  • Limit pipeline credentials and prevent sensitive values from appearing in logs. section 8.1

Certificate renewal

Store a load balancer certificate in the secrets manager, pass it to IaC as an input variable, and update the stored value when the certificate changes. Separating certificate management from resource configuration avoids expired encrypted inputs. section 2.3.6

Figure 2.10 Retrieve sensitive information from a secrets manager to change resources with an infrastructure provider.

Shows how an infrastructure provider retrieves sensitive information from a secrets manager to change resources. section 2.3.6

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Explains storage, variable passing, rotation, and pipeline exposure, but stops short of naming a specific product implementation.
Examples
Uses expiring load-balancer certificates, database passwords, API credentials, private keys, and pipeline logs as operational examples.
What it assumes
Assumes familiarity with infrastructure as code, configuration variables, credentials, and delivery pipelines.
What you can do after
Operate/configure IaC and delivery pipelines without hardcoding, exposing, or manually embedding sensitive credentials.
How it connects
Connects infrastructure as code, certificate management, credential rotation, delivery pipelines, access control, and attack surface.

Also explained in

Compare how 6 books explain secret management →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.