Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Secrets Management?

Secrets management is how applications obtain the credentials they need—API keys, database passwords, certificates—without those credentials being stored in code or configuration.

Illustration for the cybersecurity term Secrets Management
Home / Blog / Cybersecurity Terms / What Is Secrets Management?
17 November 2026

What Is Secrets Management?

What Is Secrets Management?

Every application needs credentials it did not choose: a database password, an API key for a payment provider, a signing certificate, a token for the message queue. Secrets management is the discipline of supplying those credentials at runtime without ever writing them into source code, container images, configuration files, or a deployment pipeline’s environment variables.

It is distinct from a password vault, which serves people. Here the consumer is a process, the retrieval is programmatic, and the rotation frequency can be hours rather than months.

How Secrets Leak

The dominant route is source control. GitGuardian’s annual research has reported millions of new secrets detected in public GitHub commits each year, and the figure has risen every year it has been measured. Private repositories are not safer in any meaningful sense—they are simply less studied, and every developer with read access holds the credential.

Other routes recur with depressing regularity: credentials baked into container image layers that remain readable even after a later layer deletes the file; secrets printed by verbose logging or captured in an error report sent to a third-party service; CI/CD variables visible to every job in a shared project; infrastructure-as-code state files containing generated passwords in plain text; and secrets pasted into a ticket, a chat channel, or a wiki page because that was the fastest way to unblock someone.

Each of these produces the same outcome, and it is worth being blunt about it: a secret that has been committed to a repository is compromised. Removing the commit does not help, because forks, clones, caches, and automated scrapers already have it. The only response is rotation.

What a Secrets Manager Does

The common implementations are HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, Google Secret Manager, and the various Kubernetes-native options. Kubernetes Secrets deserve a specific warning: by default they are base64-encoded in etcd, not encrypted, and readable by anyone with the right API permissions. Enable encryption at rest, restrict RBAC, and prefer an external manager with a CSI driver for anything sensitive.

Detection and the Bootstrapping Question

Scanning is non-negotiable because prevention is never complete. Run pre-commit hooks so developers are stopped before a secret leaves their machine, scan the full repository history rather than only new commits, and scan container images and infrastructure-as-code artefacts in the pipeline. Tools such as gitleaks, TruffleHog, and the native secret scanning in GitHub and GitLab all serve this purpose. Pair detection with an automated response that revokes the credential, because a detection that generates a ticket nobody actions is theatre.

The recurring design question is bootstrapping: how does an application authenticate to the secrets manager without a secret? The answer is platform-issued identity. A virtual machine, container, or function proves what it is using an attested identity the platform vouches for, and exchanges that for a short-lived token. Where no such mechanism exists—on bare metal, or with legacy software—a single bootstrap credential with a very short life, delivered at provisioning time and immediately exchanged, is the usual compromise.

Making It Stick

Start by finding what exists. Scan repository history across the estate; the first run always produces more than anyone expects, and it tells you which teams need help rather than instruction. Rotate everything it finds, starting with production database credentials and anything granting cloud administrative access.

Then remove the need for long-lived secrets rather than managing them better. Replace static cloud keys in pipelines with OpenID Connect federation. Replace database passwords with IAM authentication or dynamic credentials. Replace service account passwords in Windows estates with Group Managed Service Accounts. What remains should be in the manager, owned by a named team, rotated on a schedule, and included in machine identity inventory and review.

For UK organisations, this is also where several compliance threads converge: PCI DSS requirement 8.6 addresses credentials used by applications and systems, ISO 27001 Annex A 8.24 covers key management, and any ICO assessment following a breach will ask how the credential that was used got where the attacker found it.

At Privia Security, we hunt for exposed credentials and review secret handling in our cloud security services.

FAQ – Frequently Asked Questions

Is It Safe to Delete a Secret From Git History?

Rewriting history removes it from your repository but not from the world. Forks, local clones, caching proxies, and automated scrapers may already hold it, and public repositories are scanned within seconds of a push. Treat any committed secret as compromised and rotate it. Cleaning the history afterwards is good hygiene but it is not the remediation.

Are Kubernetes Secrets Encrypted?

Not by default. A Kubernetes Secret is base64-encoded in etcd, which is encoding rather than encryption, and anyone with sufficient API permissions or access to etcd can read it. Enable encryption at rest for Secret resources, restrict access through RBAC, and for sensitive credentials use an external secrets manager through a CSI driver instead.

What Are Dynamic Secrets?

Credentials created on demand with a short lease and revoked automatically at expiry, rather than stored and reused. A service requests database access, the manager creates a user valid for fifteen minutes, and it is removed afterwards. Theft becomes far less valuable, and the audit trail attributes each credential to a specific request rather than to a shared account.

How Does an Application Authenticate to the Secrets Manager?

Through an identity the platform issues rather than another stored secret. Azure managed identities, AWS and Google Cloud IAM roles for service accounts, Kubernetes service account tokens, and SPIFFE identities all let a workload prove what it is based on attested properties of where it runs. That removes the bootstrapping problem that otherwise defeats the whole design.

Related Terms

You May Be Interested In These

What Is Service Account Security?

Cybersecurity Terms

17 November 2026

What Is Service Account Security?

Read More
What Is a Model Card?

Cybersecurity Terms

17 November 2026

What Is a Model Card?

Read More
What Is Process Doppelganging?

Cybersecurity Terms

17 November 2026

What Is Process Doppelganging?

Read More