A secrets manager holds the credentials for your databases, cloud accounts, APIs and pipelines, so whoever controls the secrets manager controls everything those credentials open. This guide covers hardening the platform itself rather than the secrets inside it: who can administer it, how machines and people authenticate to it, how its root of trust (unseal keys, master keys and recovery material) is held, what it must log, and how it is deployed, upgraded, backed up and retired. It is vendor-neutral and applies to self-hosted secrets servers, cloud provider secrets services and SaaS secrets platforms, with notes where the shared responsibility split differs. It is written for platform and security engineers who run a secrets manager and for architects who approve it as a tier 0 system.
For the discipline of secrets management read the Secrets Management Guide. For machine access tokens on specific SaaS platforms see the Akeyless, Doppler and 1Password Machine Access Guide, and to measure the hardened platform each quarter use the Secrets manager health check.
Key takeaways
- Treat the secrets manager as tier 0. It deserves the same separation, monitoring and change control as your identity provider and PAM vault, because compromise of any of them is compromise of the estate.
- Split administration from secret access. The people who operate the platform should not be able to read production secrets, and no single role should be able to change policy, disable audit and read secrets together.
- Remove static bootstrap credentials. Clients should authenticate with platform identity (cloud workload identity, orchestrator service account tokens, certificates) so the secrets manager is not guarded by another long-lived secret.
- Hold the root of trust outside the platform. Unseal or master key shares, root credentials and recovery keys belong with named custodians or in a hardware security module or separate key management service, never in the secrets manager they unlock.
- Log every read, every policy change and every authentication failure, somewhere the administrators cannot erase. Without that, you cannot scope a compromise.
What makes up a secrets manager's attack surface
Each component below gives an attacker something different. Harden them separately; a strong client authentication design does not help if the storage backend snapshot is readable by a backup operator.
| Component | What an attacker gains | Primary control |
|---|---|---|
| Administrative interface (console, CLI, API) | Policy changes, new auth methods, audit disabled | Separate admin roles, phishing-resistant MFA, private network access |
| Client authentication methods | Impersonation of any workload bound to a role | Identity-based methods with tight bound claims |
| Access policies and namespaces | Read access to secrets outside the client's scope | Path-scoped policies, no wildcards in production |
| Root of trust (unseal or master keys, root token, recovery keys) | Decryption of all stored secrets, full control | Split custody, external key management, revoke root after use |
| Storage backend and snapshots | Offline copy of the encrypted store | Encryption at rest with keys held elsewhere, restricted backup access |
| Audit devices and log pipeline | Concealment of reads and changes | At least two audit destinations, forwarded off the platform |
| Integrations (dynamic secret engines, rotation functions) | The high-privilege accounts the manager uses to create and rotate credentials | Least-privilege engine accounts, rotated by the manager itself |
| Hosts, containers or tenant settings | Memory access, process tampering, tenant takeover | Dedicated hosts or clusters, patching, tenant SSO and admin MFA |
Administrative roles and separation of duties
The OWASP Secrets Management Cheat Sheet asks for least privilege with fine-grained controls on each object, so that engineers do not have access to every secret. Apply the same idea to the platform's own administration by defining roles that cannot combine into one person's hands. NIST SP 800-53 AC-5 Separation of Duties and AC-6(5) Privileged Accounts are the controls behind it.
| Role | Can do | Should not be able to do |
|---|---|---|
| Platform operator | Upgrade, scale, monitor health, manage storage and replication | Read production secrets, change access policies, disable audit |
| Policy administrator | Create and change access policies and auth method roles through reviewed changes | Read secrets, disable audit, hold unseal or recovery shares alone |
| Security auditor | Read audit logs and configuration | Change anything |
| Key custodian (several people) | Hold one share of unseal or recovery keys, take part in quorum ceremonies | Administer the platform day to day |
| Break-glass account | Restore service when normal administration fails | Be used routinely; every use is an incident |
- Authentication for administrators: federate admin sign-in to the central identity provider with phishing-resistant MFA, as the OWASP cheat sheet recommends for human login. Remove local admin users other than one break-glass account.
- Standing access: grant policy administrator rights just in time through the PAM or access request process, and log each grant.
- Change control: manage policies, roles and auth method configuration as code in a reviewed repository, applied by a pipeline whose own credentials are scoped to configuration paths only. Direct console changes in production then stand out as anomalies.
- Cloud and SaaS: in a cloud provider's secrets service, the IAM roles that can change resource policies, delete secrets or alter encryption key policies are the admin roles. The OWASP cheat sheet warns specifically about IAM paths that allow privilege escalation, such as unrestricted rights to pass roles or create identities.
Client authentication methods
The secret zero problem is the reason this section exists: if a workload needs a static token to reach the secrets manager, that token becomes the most valuable secret you own. OWASP recommends avoiding static bootstrap credentials in favour of short-lived OIDC tokens and workload identity federation, keeping federation separate from secret access so that exchanging a token does not automatically grant secrets, and preserving caller attribution so every access traces to a specific user, job or workload. See the Secrets Zero Problem Guide.
| Method | Strength | Main risk | Use when |
|---|---|---|---|
| Cloud workload identity | No stored secret; identity issued by the cloud platform | Roles bound too broadly (whole account or project) | Workloads run in a cloud that supports it |
| Orchestrator service account tokens | Short-lived, audience-bound tokens per workload | Binding to all namespaces or all service accounts | Kubernetes and similar platforms |
| CI/CD OIDC tokens | Per-job identity with repository and branch claims | Claims not checked (any branch, any repository in an organisation) | Pipelines that support OIDC federation |
| Mutual TLS client certificates | Strong cryptographic identity | Long certificate lifetimes, weak issuance control | On-premises services with a managed internal CA |
| Static tokens or role ID and secret pairs | Works anywhere | Becomes a long-lived secret stored somewhere else | Only where no identity-based method exists, with short TTLs, wrapping and IP binding |
| Username and password for humans | Simple | Phishing and reuse | Never for production; use IdP federation |
For each identity-based method, bind roles to the narrowest claims available: a specific cloud role rather than an account, a specific service account and namespace rather than a cluster, a specific repository and protected branch rather than an organisation. Disable auth methods that no client uses; every enabled method is an entry point. The Cloud Workload Identity Guide covers the cloud side.
Root of trust: unseal keys, master keys and recovery material
Most secrets managers encrypt stored secrets with a data key, which is itself protected by a root or master key. Self-hosted platforms commonly protect that root key either with key shares split across custodians, so that a quorum must combine them to start or unseal the service (a threshold scheme in the style of Shamir's secret sharing), or with an external key management service or hardware security module that unwraps it automatically (often called auto-unseal). SaaS and cloud services hold the root key for you, sometimes with a customer-managed key option. NIST SP 800-57 Part 1 Rev. 5 is the general reference for protecting each key type through its lifecycle.
- Key shares: give each share to a different named custodian, store shares in separate locations (sealed envelopes in different safes, or individual hardware tokens), and never keep enough shares in one place, one password manager or one ticket to reach the quorum. Record custodians and replace a share when a custodian leaves.
- External key management: if an external KMS or HSM unseals the platform, the principals that can use that key can, in effect, start the secrets manager with its data. Restrict key use to the secrets manager's own identity, deny key deletion and disable to everyone except a separate key administrator, and alert on any key policy change. See the HSM Deployment and Operations Guide and Cryptographic Key Management Guide.
- Root tokens and initial admin credentials: generate them for initial setup only, then revoke them. Regenerate through a quorum ceremony when needed and revoke again afterwards. OWASP recommends storing the solution's own primary credentials in a secondary secrets management system rather than in the platform itself.
- Recovery keys: where auto-unseal is used, recovery keys still authorise sensitive operations. Hold them with the same split custody as unseal shares.
- Customer-managed keys in SaaS and cloud: OWASP notes that bring-your-own-key adds control but also complexity, and that dedicated HSMs are warranted mainly where regulation, contracts or policy require single-tenant custody. Choose it for a reason, then protect the key policy as tier 0.
- Rekey and rotation: rotate the data encryption key on a schedule and rekey the root or share set after any custodian change or suspected exposure. Test both in a non-production cluster first.
Policies, namespaces and environment separation
- Path-scoped policies: grant each role the exact paths and operations it needs (read only for most workloads). Wildcards across a mount or namespace in production are a finding.
- Separate production: OWASP suggests considering separate solutions for production and development secrets, with tighter access to production. At minimum, use separate namespaces, mounts or accounts with different admin groups.
- Limit who can write: restrict how many identities can read or write each secret and keep policies simple enough to review. A secret that dozens of roles can update cannot be trusted after an incident.
- Policy for the manager's own integrations: engines that create dynamic database or cloud credentials need a privileged account on the target. Scope that account to credential creation, have the manager rotate it, and restrict custom rotation functions so only the rotation function can assume their privileged role, as OWASP recommends.
Audit logging and monitoring
OWASP lists what to log: who requested which secret, whether the request was approved or rejected, when secrets were used, updated or expired, authentication and authorisation errors, attempts to reuse expired secrets, and administrative actions on the underlying infrastructure. It also asks for logs protected against tampering, accurate time with monitoring for clock skew, and a single location the incident response team can reach. NIST SP 800-53 AU-9(2) asks for audit records on a separate system, and AC-6(9) for logging the use of privileged functions.
| Event | Why it matters | Response |
|---|---|---|
| Audit device disabled or changed | Classic step before bulk reads | Page the on-call security engineer; treat as incident until explained |
| New auth method enabled or role binding widened | Creates a new way in (ATT&CK T1556 Modify Authentication Process, T1098 Account Manipulation) | Check against an approved change within one hour |
| Root token generated or used | Should be rare and ceremonial | Confirm a quorum ceremony was scheduled |
| Bulk list or read across many paths by one identity | Harvesting (T1555 Credentials from Password Stores) | Compare with the identity's baseline; contain if abnormal |
| Authentication failures spike or come from new networks | Stolen client credentials being tried (T1528, T1550.001) | Investigate source; revoke the credential if confirmed |
| Secret deletion, version destruction or key disable | Destructive attack or extortion (T1485 Data Destruction) | Verify backups; block the actor |
Send audit output to at least two destinations, one of which is your central log platform, so a failure or tampering at one is visible. Some platforms stop serving requests if no audit destination can be written; know your platform's behaviour and monitor audit destination health accordingly. The CIS Control 8 Audit Log Management Guide covers retention and review.
Network placement and platform hardening
- Private by default: expose the client API only to the networks where clients run, put the admin interface behind private access or a management network, and require TLS for every client and peer connection (NIST SP 800-53 SC-8).
- Dedicated hosts: run self-hosted clusters on dedicated hosts or a dedicated cluster with no other workloads, no interactive logins except through PAM, and memory protections such as disabled swap or encrypted swap, so secrets in memory are not written to disk. Follow the platform's own production hardening guidance for the specific settings.
- Patching and support: track supplier security advisories and upgrade promptly; an unsupported version of a tier 0 system is a finding under SA-22 Unsupported System Components.
- Supply chain: install from signed packages or images and verify signatures; pin plugin versions and review any third-party plugin as you would a privileged integration.
- SaaS tenants: enforce SSO and MFA for the tenant, restrict admin access by network where the service allows it, review the tenant's API tokens and audit export settings, and confirm the provider's responsibilities in the contract.
Lifecycle: deploy, upgrade, back up, recover, retire
- Deploy: initialise in a controlled ceremony with custodians present, distribute shares, configure audit before any secret is written, revoke the initial root token.
- Upgrade: rehearse in a staging cluster with production-like configuration, take a snapshot first, upgrade standby nodes before the active node, and keep the previous version's packages for rollback within the supplier's supported downgrade path.
- Back up: OWASP asks for automated, encrypted backups with reduced access rights, monitoring of the backup location, and regular restore tests. Keep snapshots in a separate account or vault from the one the platform operators administer. See Secrets Manager Resilience Guide.
- Recover: keep break-glass credentials in a secondary system and test them routinely, as OWASP recommends. Restore into an isolated environment first if compromise is suspected, rotate all secrets that were readable, and rekey the root.
- Retire: migrate clients, revoke every auth method and lease, destroy storage and snapshots, destroy or disable the root key in the external KMS after the retention period, and record evidence. The Secrets manager migration playbook covers moving platforms.
Hardening an existing secrets manager: a phased approach
- Week 1 to 2, see: enable a second audit destination, forward logs centrally, export roles, policies and auth methods, list everyone with admin rights and where every share and recovery key is held. Change nothing else yet.
- Week 3 to 6, contain the root of trust: revoke standing root tokens, redistribute shares to named custodians, lock down the external key policy, move break-glass credentials to a secondary system and test them.
- Month 2 to 3, separate duties: create operator, policy administrator and auditor roles, federate admin sign-in, move policy changes into a reviewed repository and pipeline.
- Month 3 to 6, fix client authentication: move workloads from static tokens to identity-based methods one application group at a time. Run the new method alongside the old, confirm in audit logs that the old token is no longer used, then revoke it. Roll back by re-enabling the old token, which you keep disabled rather than deleted for one release cycle.
- Ongoing, narrow and measure: remove wildcard production policies, disable unused auth methods and run the quarterly health check.
Decision guidance
- Self-hosted or managed: self-hosting gives you control of the root of trust and network placement but makes patching, availability and ceremonies your job. A cloud or SaaS service moves those to the provider; your remaining responsibilities are tenant admin access, IAM and key policies, client authentication and audit export.
- Key shares or external key unsealing: key shares give strong separation but slow restarts and depend on custodians being reachable. External key unsealing gives automatic restarts but moves trust to whoever controls the external key. Larger organisations with a mature KMS or HSM team usually choose external unsealing with split-custody recovery keys; small teams often find well-run key shares simpler to reason about.
- Small organisations: a managed service with SSO, MFA, two admins, identity-based client authentication and audit forwarded to a central log store covers most of this guide.
- Large organisations: add namespaces or separate clusters per environment and business unit, a dedicated policy pipeline and formal key ceremonies.
Detection and measurement
Use these to show hardening is holding; the Secrets manager health check gives formulas and thresholds for quarterly reporting.
- Share of client authentications using identity-based methods rather than static tokens.
- Number of people with standing platform administrator rights (aim for a small, named group).
- Root tokens in existence outside a ceremony (target: zero).
- Audit destinations healthy and receiving events, checked daily.
- Production policies containing wildcards across a mount or namespace.
- Days since the last successful restore test and the last break-glass test.
Framework mapping
| Control area | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | ATT&CK threat addressed |
|---|---|---|---|
| Admin roles and separation | AC-5, AC-6(5), AC-6(9) | PR.AA-05 | T1078.004 Cloud Accounts, T1098 Account Manipulation |
| Client authentication | IA-5, IA-5(2) | PR.AA-01 | T1528 Steal Application Access Token, T1552 Unsecured Credentials |
| Root of trust and key management | SC-12, SC-12(1), SC-13, SC-28 | PR.DS-01 | T1555 Credentials from Password Stores |
| Configuration and change control | CM-3, CM-6 | PR.PS-01 | T1556 Modify Authentication Process |
| Audit logging | AU-6, AU-9(2), AU-12 | PR.PS-04 | T1685 Disable or Modify Tools |
| Backup and recovery | CP-9, CP-10 | PR.DS-11 | T1485 Data Destruction, T1490 Inhibit System Recovery |
| Patching and supported versions | SI-2, SA-22 | PR.PS-02 | T1190 Exploit Public-Facing Application |
Common failure patterns
- Unseal shares in one place: all key shares stored in the same password manager or wiki page, so one compromised account reconstructs the root of trust.
- A static token guarding everything: a long-lived token with broad read access baked into pipeline variables or images, which becomes the real secret zero. See Top 10 Secrets Management Mistakes.
- Operators who can read production: the team that upgrades the cluster also has a policy granting read on all secrets "for troubleshooting".
- Audit to one local file: logs written only on the node, rotated away within days and readable and deletable by the same administrators.
- Backups with weaker access than the platform: storage snapshots readable by the general backup team, with the unsealing key reachable from the same account.
- Broad identity bindings: a CI/CD role that trusts any repository in the organisation, or a Kubernetes role bound to every namespace.
Practitioner checklist
- The secrets manager is classified as tier 0 with an owner, and its admin group is small and named.
- Operator, policy administrator and auditor roles are separate; admins sign in through the identity provider with phishing-resistant MFA.
- No standing root token exists; unseal or recovery shares are held by named custodians in separate places.
- External key policies allow only the secrets manager's identity to use the key, and changes alert.
- Workloads authenticate with identity-based methods bound to narrow claims; unused auth methods are disabled.
- Production policies are path-scoped with no wildcards across mounts, and are managed as reviewed code.
- Audit goes to two destinations including the central log platform, with alerts for audit, auth method and root token events.
- The platform runs a supported version on dedicated, patched hosts, with the admin interface private.
- Backups are encrypted, held in a separate account and restore-tested; break-glass credentials live in a secondary system and are tested.
- A quarterly health check is scheduled and its findings tracked to closure.
Standards and references
- OWASP: Secrets Management Cheat Sheet
- NIST: SP 800-57 Part 1 Rev. 5 Recommendation for Key Management: Part 1 General
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls for Information Systems and Organizations
- NIST: Cybersecurity Framework 2.0
- MITRE ATT&CK: T1555 Credentials from Password Stores
- MITRE ATT&CK: T1556 Modify Authentication Process
- MITRE ATT&CK: T1528 Steal Application Access Token
Related NHI Mgmt Group resources: Secrets Management Guide, Secrets manager health check, If your secrets manager is compromised, Secrets Zero Problem Guide, Securing the PAM Vault Itself.