← All articles

Puppet Secrets Management: Every Option Compared

A closed teal document box and ivory folder with a separate amber reference card.
A conceptual view of choosing how credentials are stored and retrieved.

Key takeaways

  • Hiera-eyaml encrypts secrets in your Hiera repo with a public key and needs no vault, which suits teams of one to five engineers holding the private key in CI/CD.
  • Lookup-time resolution from AWS Secrets Manager, HashiCorp Vault, or Infisical keeps secret values out of your repo and propagates rotations on the next Puppet run.
  • Terraform writes sensitive values into state files where they persist across versions, while Puppet re-resolves secrets at catalog compile time, so the two tools need different rotation handling.
  • Vaults store secret values but track nothing about ownership, expiry, or rotation deadlines, which is where credential sprawl starts as teams and key counts grow.
  • A metadata-only lifecycle layer over your vault answers who owns each credential and when it expires without ever holding the secret values themselves.

Puppet secrets management comes down to three choices: Hiera-eyaml with a private key per team, lookup-time pulls from a vault like HashiCorp Vault or AWS Secrets Manager, or a hybrid that keeps high-value credentials in the vault and everything else in eyaml. This guide maps each option against team size and your existing tooling, then shows the equivalent Terraform workflow side by side so you run one pattern across both.

What are your options for puppet secrets management?

You have four paths: encrypt secrets in Hiera with Hiera-eyaml, keep secrets in your vault and resolve them with a Hiera lookup backend, use a native vault integration on the agent or via Puppet functions, or bolt on a third-party coordination layer. Most teams combine two.

The short answer by team size

Team sizeSetup
1–5 engineersHiera-eyaml with the key in your CI/CD system
5–20 engineersHiera lookup into AWS Secrets Manager, Vault, or Infisical
20+ or Puppet + TerraformVault as the backend, plus a lifecycle layer for ownership and expiry

Hiera-eyaml is Puppet's built-in encryption layer for YAML data; the Puppet docs cover the eyaml CLI and hierarchy setup.

What the ranking pages cover and what they miss

Comparison posts rank vaults on storage and encryption. They rarely cover who owns each key, when it expires, or what happens when a Stripe token outlives the engineer who created it. That gap is the same one behind API key lifecycle management: the vault holds the value, but nothing tracks the deadline.

How does Hiera-eyaml work, and when is it enough?

Hiera-eyaml encrypts each secret with a public key, so your Puppet repo can hold ciphertext in plain sight. Any node with the matching private key can decrypt the values meant for it at catalog compile time. No vault is required, which is why it is often the first stop for puppet secrets management.

Key distribution and the trust problem

The private key is the whole game. Every Puppet server that compiles catalogs needs it, which means every admin with access to that host can decrypt every secret it protects. With one owner and three nodes, that trust is easy to reason about. Add a second team or a second environment and "who holds the key" becomes an unanswered question.

Rotation is manual by default

Eyaml stores static ciphertext. Rotating a Stripe or GitHub credential means re-issuing it at the provider, re-encrypting, and committing. Nothing tracks expiry or ownership, so a 30/60/90 day rotation policy lives in a spreadsheet or someone's head. Our guide to API key management best practices covers why that metadata layer matters as credential counts grow. Past roughly a few dozen secrets, most teams move lookups to a vault instead.

Should Puppet pull secrets from a vault at lookup time?

Instead of encrypting secrets into the repo with Hiera-eyaml, you can have Hiera resolve a lookup against an external backend like HashiCorp Vault or AWS Secrets Manager at catalog time. The secret value never touches your repo or your Puppet masters' data directory. Puppet's data and lookup documentation covers how lookup order works and how to extend it beyond static YAML.

How the lookup flow works

You install a lookup handler or use an HTTP-based backend, then your Hiera hierarchy entries become queries: a node asks for payments::stripe_key, Hiera calls Secrets Manager, and the value is injected during compilation. The repo holds only a path or key reference, so rotating a credential in the vault updates every catalog on the next run.

The bootstrap credential problem

Your Puppet servers and every compile node now need vault credentials to authenticate. That moves the problem rather than solving it: you must distribute and rotate a credential that unlocks all the others, ideally using short-lived creds tied to instance identity. For handling the keys those nodes need across AWS, Stripe, and GitHub, see managing API keys across multiple cloud providers.

How do the main vault options compare for Puppet?

HashiCorp Vault fits if you already run it: the Vault lookup plugin pulls secrets at catalog time, and you get strong policy control, but it is the most operationally heavy option on this list. AWS Secrets Manager fits AWS-native teams; Puppet pulls via the AWS SDK or a helper, and it is cheap to start but weaker outside AWS. Infisical and Doppler are lighter-weight, developer-facing vaults that integrate through their own lookup mechanisms, which suits small teams that want less infrastructure to babysit. Akeyless targets teams that want vaulting without self-hosting.

Whichever you pick, the vault answers a different question than Puppet does. Puppet resolves a secret at lookup time; it does not track who owns the Stripe or GitHub key, when it expires, or whether the 30/60/90 day rotation policy is actually being met. That gap is where secrets sprawl starts, and it is why teams layer lifecycle coordination on top of the vault rather than expecting the vault to solve it. We cover that gap in alternatives to manual credential rotation tracking.

How does terraform secrets management differ from the Puppet flow?

Terraform: sensitive values and state

Terraform handles secrets as input variables marked sensitive = true, or via backend lookups into AWS Secrets Manager, Vault, or Infisical at apply time. The catch is state: sensitive values that land in resources are stored in the state file, so your S3 backend needs encryption and tight access control regardless of where the secret originated. Terraform's own docs cover this in their sensitive values guidance.

Puppet: catalog-time resolution

Puppet resolves secrets during catalog compilation. Hiera-eyaml decrypts per-node, or a lookup plugin pulls from a vault at that moment. The value never appears in source control, but it does appear in the catalog and in Puppet's reports if you pass it through a resource attribute carelessly. HashiCorp documents the Vault-based lookup flow for Puppet in their Vault integration documentation.

The difference that matters operationally is timing and blast radius. Terraform secrets live in state forever unless you scrub or redact them, so rotation means a re-apply to propagate a new value, and old values persist in every historical state version. Puppet secrets are re-resolved on every Puppet run, so a rotated credential propagates on the agent's next run interval, but nothing records who owns the key, when it expires, or whether the rotation deadline slipped. Both tools trust that the human who stored the secret got the metadata right, which is exactly where sprawl starts. A lifecycle layer like KeyGuardRail tracks ownership, expiry, and rotation deadlines as metadata only, without holding secret values, so you can see at a glance which credentials are overdue and who is responsible for each one, and it covers why that split matters at credential monitoring security.

Choosing one pattern for both

Pick vault lookups over checked-in encrypted files if you run both tools, so a rotated credential in Secrets Manager or Vault is picked up by the next terraform apply and the next Puppet run from one source of truth. Keep Hiera-eyaml only for bootstrap secrets like the vault agent's own token.

What breaks when humans are the transport layer?

Your vault stores secrets safely. It does nothing about what happens around them. A dev pulls a Stripe key out of AWS Secrets Manager to test something, pastes it into a Postman collection, and now that credential lives outside your audit trail indefinitely. The vault did its job; the human handoff is the leak.

Sprawl outside the vault

Secrets sprawl starts with the best intentions. Someone needs a key for a local script or a shared collection, and copying it is faster than wiring up a lookup. Once a credential exists in three places, nobody knows which copy is live, so nobody rotates it. The problem is not the vault. It is that humans are the transport layer between it and everything else.

Why rotation policies stall without owners and deadlines

A 30/60/90 day rotation policy is a calendar entry with no owner attached. When a key nears expiry, who gets the reminder, and who verifies the old value is dead? Without per-credential ownership metadata and rotation deadlines, the policy decays into whatever each team remembers to do. Short-lived creds help, but SaaS keys like GitHub tokens often cannot be short-lived, so they need a named owner and a tracked deadline instead.

How do you add lifecycle coordination on top of Puppet and Terraform?

Your vault stores secret values. It does not tell you who owns the Stripe key, when the GitHub token expires, or whether the 90-day rotation deadline for that AWS IAM credential slipped while the engineer who created it left the company. That gap is what lifecycle coordination covers: a registry of credentials with owner, expiry date, and rotation deadline, checked against the actual providers.

What metadata-only monitoring does and doesn't do

KeyGuardRail tracks metadata only: name, owner, provider, expiry, rotation schedule. It never holds secret values, so your vault (AWS Secrets Manager, Vault, Infisical) stays the system of record for the secrets themselves. You keep using Secrets Manager's own rotation features per the AWS Secrets Manager documentation; KeyGuardRail tells you which credentials are covered, which are overdue, and who to ping.

What it doesn't do: it won't move a secret into Postman or out of a dev's laptop, and it won't rotate anything for you. It makes the human transport layer visible instead of invisible.

Running KeyGuardRail through the same criteria

Same criteria as the vaults above, honestly applied. Metadata-only means no custody risk and no changes to your Hiera or Terraform lookup flows. It works across AWS plus SaaS providers like Stripe and GitHub, which single-vault tooling often misses. The trade-off: it adds one more tool and one more bill, and it depends on owners keeping the registry current. If your team is one person with ten keys, a spreadsheet is fine. Past that, "who owns this key" needs an answer in a system, not in someone's memory.

Which setup should your team pick?

Solo or a two-person team: Hiera-eyaml with keys in your repo's access controls, plus a simple tracker for expiry dates. You already know who owns each key because you are that person.

One team with an existing vault (AWS Secrets Manager, Vault, or Infisical): point Puppet at lookup-time resolution and add a lifecycle monitoring layer for ownership and rotation deadlines. The vault holds values; the lifecycle layer answers who owns this key and when it expires.

Cross-team or multi-account: a vault plus a governance layer over it. Your rotation policy only works if someone tracks the 30/60/90-day deadlines for Stripe, GitHub, and AWS keys in one place, with an audit trail.

FAQ

Is Hiera-eyaml still safe to use, or should we move everything to a vault?

Hiera-eyaml is safe if you control the private keys, which is realistic for one to five engineers with keys held in CI/CD. The risk grows with team count: every compile host needs the key, and nothing tracks expiry or ownership. Past a few dozen secrets or a second team, move lookups to a vault and keep eyaml for bootstrap credentials.

Can Puppet rotate secrets automatically, or do I need a separate tool?

Puppet resolves secrets at catalog time but rotates nothing. Eyaml stores static ciphertext, so rotation means re-issuing at the provider, re-encrypting, and committing by hand. Vault lookups make a rotated value propagate on the next run, but the rotation itself happens in the vault or provider, not Puppet. Lifecycle tooling tracks the deadlines.

How do I stop developers from pasting API keys into Postman collections and Slack?

You cannot fully stop it, because copying is faster than wiring a lookup. Make the sanctioned path cheaper: point them at lookup-time resolution so they never need the raw value. Then make the handoffs visible with a metadata registry showing each credential's owner and expiry, so a leaked copy has a named person responsible for killing it.

What's the difference between storing secrets in Hiera versus Terraform variables?

Timing and persistence. Terraform marks variables sensitive but writes them into state, where they persist across every historical state version until scrubbed, and rotation requires a re-apply. Hiera resolves at catalog compile time, so rotated values propagate on the next agent run. Neither records ownership or expiry, which is where sprawl starts.

How do I track who owns a credential and when it expires if the vault doesn't do that?

Add a lifecycle layer that holds metadata only: name, owner, provider, expiry, and rotation schedule. The vault stays the system of record for values, and the registry answers who owns a key, when it expires, and who to ping when a 30/60/90-day deadline slips. A spreadsheet works for one person with ten keys, not past that.