Join our Newsletter — 33% off our NHI Course
Home› Guides› Secrets manager migration playbook: move platforms without copying…
Guide Secrets Management

Secrets manager migration playbook: move platforms without copying old risk

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 11 November 2026 13 min read
On this page

Moving from one secrets manager to another is the moment an organisation handles every one of its secrets at once, and a migration done as a bulk copy carries every long-lived, over-shared and already-leaked secret into the new platform while leaving the old one quietly running. Platform migrations happen for consolidation after mergers, a move between clouds, a self-hosted cluster reaching end of support, or a change of operating model. This playbook covers moving from one secrets management platform to another: what actually has to move besides secret values, choosing between copying and re-issuing, translating policies and machine authentication, the privileged migration identity, cutover and rollback, and decommissioning the source so it cannot be used again. It is vendor-neutral and based on the OWASP Secrets Management Cheat Sheet and NIST guidance. Building and onboarding a new platform from scratch is covered in the Secrets manager rollout playbook; choosing one is covered in the Secrets Management Buyer's Guide.

Key takeaways

  • Re-issue where you can, copy only where you must. Every secret that can be rotated should arrive in the new platform as a fresh value, so the migration also retires whatever leaked from the old one.
  • Secrets are the easy part. Policies, machine authentication methods, dynamic secret backends, certificate authorities, metadata and audit history all need a plan, and translating policies is where access quietly widens.
  • The migration identity is the most privileged NHI you will create this year. It can read everything in the source and write everything in the target; make it short-lived, tightly scoped and logged.
  • Freeze, watch, then switch off. Put the source into read-only mode after cutover and alert on every read, so stragglers surface before you decommission.
  • Decommissioning is a security task. Keep audit logs for their retention period, destroy backups and unseal material, and revoke the old platform's own credentials in every connected system.

What has to move

OWASP's cheat sheet (section 2.11) advises storing metadata with every secret precisely so that it can be moved later, and warns that without it vendor lock-in becomes more likely. In practice, a secrets platform holds much more than key and value pairs. Build the migration inventory by object type.

ObjectMigration approachWatch for
Static secrets (passwords, API keys, tokens)Rotate into the target where the issuer allows; copy only the restVersion history is usually lost; copied values keep their exposure history
Metadata (owner, purpose, consumers, type, rotation schedule)Map to the target's tags or path convention before moving valuesSecrets with no owner: resolve before migration, not after
Dynamic secret backends (database, cloud credentials)Rebuild in the target with a new root credential for each backend; let old leases expireOutstanding leases in the source; the backend's own long-lived root secret (OWASP 6.2)
Certificate authority or PKI engineStand up a new issuing CA under the same or a new root; reissue on renewalNever export a CA private key in plaintext; plan revocation of the old issuer
Encryption-as-a-service keysTreat as a key migration: rewrap or re-encrypt data under target keysCiphertext that only the old platform can decrypt; keep old keys decrypt-only until re-encryption is proven (NIST SP 800-57 Part 1 describes deactivated keys kept for processing protected data). See the Envelope Encryption and KMS Integration Patterns Guide
Policies and rolesTranslate by intent, then test with real identitiesWildcards and broader paths introduced during translation
Machine authentication methodsRecreate with workload identity or federation in the targetStatic bootstrap tokens copied as-is; see the Secrets Zero Problem Guide
Audit configuration and historyConfigure target audit before the first secret; archive source logsLogs destroyed with the old cluster before their retention period ends
Integrations (CI/CD, orchestrators, sidecars, operators)Repoint per consumer pattern during cutoverHidden consumers: cron jobs, scripts, disaster recovery sites

Copy or re-issue: choosing the transfer method

Most migrations mix three methods. The decision is per secret, based on whether you control the issuer and whether the consumer can tolerate a new value.

MethodHow it worksChoose it whenTrade-off
Rotate into targetGenerate a new credential at the issuer, store it only in the target, cut the consumer over, revoke the old oneYou control the issuer (databases, cloud keys, internal services) and the consumer can reloadMore work per secret; the strongest outcome, since nothing from the old platform survives
Dynamic in targetReplace a static secret with short-lived credentials issued by the targetThe backend supports it and the application can renewApplication change; OWASP 6.2 notes some services cannot issue temporary credentials
Secure copyRead value from source and write to target in one automated, logged jobThird-party keys you cannot rotate on demand, licence keys, recovery codesValue keeps any past exposure; schedule a rotation with the issuer

Our recommendation: aim for at least 80% of migrated secrets to be rotated or replaced with dynamic credentials, and record a dated rotation plan for every copied one. Copying everything is faster but means the old platform's exposure, including any secret already sitting in a repository or log, moves with you. The Internet Archive breach shows the cost of tokens left valid after the source code holding them was stolen: Zendesk API tokens found in that code were used in a second breach weeks later.

Rules for a secure copy

  • Machine to machine only: the job reads from the source API and writes to the target API in memory. No export file, spreadsheet or laptop in between.
  • If a file is unavoidable: encrypt it to a key held in the target environment, keep it on restricted storage for hours, not days, and log its destruction.
  • Preserve attribution: tag each copied secret with "migrated, not rotated" and its source path, so later reports can find it.
  • Verify by hash, not by eye: compare a keyed hash of source and target values in the job; never print values to logs or the console.

The migration identity

The job that reads the source and writes the target is a non-human identity with read access to everything you hold. It should be the most closely watched credential in the programme.

  • Scope by wave: grant read on only the paths in the current wave in the source, and write on only the matching paths in the target.
  • Time-bound: issue it for the migration window and revoke it at the end of each wave. Use workload identity or federation to authenticate the job rather than a static token.
  • Run from a controlled place: a dedicated pipeline or job runner with no human interactive shell, not an engineer's workstation.
  • Alert on its use outside the window: any read by the migration identity outside an approved run is an incident.
  • Two people for the bulk run: require a second approver to start a wave that includes production or privileged paths (NIST SP 800-53 AC-5, separation of duties).

Translating policies and authentication

Different platforms express access in different ways: path-based rules, resource policies, role bindings, vault-level or project-level boundaries. A literal translation rarely exists, and the tempting shortcut is a broader rule that "makes it work".

  1. Translate intent: for each source policy, write down which identity needs which action on which secrets, then express that in the target model. Start from least privilege (AC-6), not from the old rule text.
  2. Keep the boundaries: OWASP advises separating production and development secrets; keep that separation as hard boundaries in the target (separate instances, accounts, vaults or projects), not just naming.
  3. Replace static machine authentication: if the source relied on long-lived tokens or static identifier and secret pairs for applications, use the migration to move to workload identity or OIDC federation in the target.
  4. Test with real identities: for each translated policy, prove that the intended identity can read its secrets and that a neighbouring identity cannot. Automate these as tests that run on every policy change.
  5. Diff effective access: before cutover, compare who can read what in source and target. Any identity that gains access is a finding to explain.

The phased playbook

  1. Phase 0, inventory and map: export the object inventory above, consumers per secret (from audit logs of the last 90 days), owners and rotation capability. Resolve ownerless secrets, and delete secrets with no reads in the period after owner confirmation.
  2. Phase 1, target ready: build and harden the target, with audit logging on before the first secret (OWASP 2.6) and backup and restore tested (OWASP 2.9). Follow the rollout playbook for platform design.
  3. Phase 2, pilot: migrate one low-risk application end to end, including a rotation into the target and a rehearsed rollback.
  4. Phase 3, waves: migrate by consumer pattern (runtime API, sidecar or agent, file injection, pipeline), lowest risk first, production and privileged credentials last. For each application: create the target secret, switch the consumer, verify, rotate, then remove the source entry or mark it deprecated.
  5. Phase 4, freeze the source: make the source read-only and alert on every successful read. Each read is a missed consumer to fix.
  6. Phase 5, decommission: see the section below.

Per-application cutover and rollback

  • Dual-read only as a bridge: letting an application fall back to the source if the target fails reduces risk during cutover, but set an end date, because a permanent fallback means the old platform never retires.
  • Rotate after the switch, not before: once the consumer reads from the target, rotate the credential at the issuer and update the target only. A rollback after this point points the consumer back with the new value written to the source temporarily.
  • Rollback trigger: define it in advance, for example authentication failures above the normal baseline for 15 minutes after cutover (our recommendation), and who decides.
  • Disaster recovery sites: repoint standby environments in the same wave, or they will fail on the day you need them.

Decommissioning the source

  • Archive audit logs: export the source's audit history to your log store for its full retention period (NIST SP 800-53 AU-11) before shutting anything down.
  • Revoke the platform's own credentials: the old secrets manager held credentials in other systems, such as database root accounts for dynamic secrets, cloud roles, identity provider clients and KMS keys used for its seal. Revoke or delete each one, or it remains a usable identity.
  • Revoke outstanding leases and tokens: let dynamic leases expire or revoke them, and revoke every token and authentication method the source issued.
  • Destroy backups and recovery material: snapshots, backups, unseal or recovery shares and replicas all contain the full secret set. Sanitise storage following NIST SP 800-88 Rev. 2 and record it (MP-6).
  • Remove network paths and DNS: so a forgotten script fails loudly rather than reaching a restored copy.
  • Close with a scan: search code, pipelines and configuration for references to the old endpoint and for any secret values that were copied, not rotated. See the Secret Sprawl Measurement Guide.

Small versus large organisations

A small team with a few hundred secrets can often run a single wave over a few days: rotate everything that can be rotated, copy the rest with a scripted job, freeze the source for two weeks, then decommission. A large estate with thousands of consumers needs the wave model, a migration team with platform and application owners, translated policy tests in CI, and a longer freeze period, because rarely run jobs (month-end, annual renewals, disaster recovery tests) only show up over time. Our recommendation for large estates is a freeze of at least one full business cycle, typically 30 to 45 days.

Detection and measurement

OWASP section 2.6 lists the events a secrets platform should audit, including who requested secrets, approvals, usage, expiration and administrative actions; during a migration watch both platforms.

Metric or signalWhy it mattersTarget (our recommendation)
Share of migrated secrets rotated or made dynamicShows whether old exposure was retired80% or more
Reads on the source after freezeEach one is a missed consumerZero for 30 days before decommission
Identities with more access in target than sourceDetects policy wideningZero unexplained
Copied secrets without a dated rotation planOld values with no end dateZero
Migration identity use outside approved runsMisuse of the most privileged NHIZero; alert on any
Source-side credentials still valid after decommissionOrphaned accessZero

Common failure patterns

  • Bulk export to a file: a plaintext export left in a bucket, ticket attachment or download folder becomes the largest single leak the organisation has ever had.
  • Copy everything, rotate nothing: the platform changes, the exposure does not.
  • Wildcard policies to hit the deadline: temporary broad rules that are never narrowed.
  • Old platform never switched off: left running "for safety", unpatched and unwatched, still holding every secret.
  • Seal and root credentials forgotten: the old platform's database roots, cloud roles and seal keys remain active after shutdown.
  • Audit history lost: the source cluster is destroyed with its logs, so an investigation into an earlier access cannot be completed.

Framework mapping

ActivityNIST SP 800-53 Rev 5NIST CSF 2.0OWASP ASVS 5.0
Secret storage and access in the targetIA-5, AC-6PR.AA-05V13.3.1, V13.3.2
Rotation into the targetIA-5PR.AA-05V13.3.4
Migration change control and separation of dutiesCM-3, AC-5PR.PS-01Not applicable
Audit logging and retentionAU-2, AU-9, AU-11DE.CM-09V16.4.2
Decommissioning and sanitisationMP-6, SA-22PR.DS-01Not applicable

Practitioner checklist

  • Inventory every object type in the source, not only secret values, with owners and consumers.
  • Decide per secret: rotate into the target, replace with dynamic credentials, or secure copy with a dated rotation plan.
  • Ban export files; run transfers machine to machine and verify by keyed hash.
  • Make the migration identity scoped per wave, time-bound, federated and alerted.
  • Translate policies by intent and test effective access for real identities in both platforms.
  • Turn on target audit logging and test backup and restore before the first secret.
  • Migrate in waves by consumer pattern, with defined rollback triggers.
  • Freeze the source read-only and alert on every read until it stays at zero.
  • Archive source audit logs, revoke its own credentials, destroy backups and recovery material.
  • Scan code and configuration for the old endpoint and copied values after decommissioning.

Standards and references

Related NHI Mgmt Group resources: Secrets manager rollout playbook · Secrets Management Guide · Secrets Management Buyer's Guide · Secrets Rotation Runbook Template

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 11 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.