$ initiat guides
Secret Rotation
Safely rotate secrets across environments
Back to Docs

Steps

#1 Audit Current Secrets

Review current secrets and versions

      initiat secret list
      
    

Document existing secrets before rotation

#2 Backup Current Secrets

Retrieve current secret values for backup

      initiat secret get <secret-key>
      
    

Save current values in case rollback is needed

#3 Update Development

Update secret in development environment

      initiat secret set API_KEY --value "new-dev-key" --project-path acme-corp/development
      
    

Test new secret in development first

#4 Test in Development

Verify new secret works in development

      initiat secret get API_KEY --project-path acme-corp/development
      
    

Confirm new secret is working correctly

#5 Update Staging

Update secret in staging environment

      initiat secret set API_KEY --value "new-staging-key" --project-path acme-corp/staging
      
    

Deploy to staging for further testing

#6 Test in Staging

Verify new secret works in staging

      initiat secret get API_KEY --project-path acme-corp/staging
      
    

Confirm staging environment is working

#7 Update Production

Update secret in production environment

      initiat secret set API_KEY --value "new-prod-key" --project-path acme-corp/production
      
    

Deploy to production after successful testing

#8 Verify Production

Verify new secret works in production

      initiat secret get API_KEY --project-path acme-corp/production
      
    

Confirm production environment is working

Success criteria

  • All environments have updated secrets

  • New secrets are working correctly

  • Old secrets are no longer accessible

Next steps

  • Update CI/CD pipelines with new secrets

  • Notify team of secret rotation

  • Document rotation process for future

© 2025 Initiat Technologies. All rights reserved.