Use this checklist when deploying HSM-backed key management to production.
- Choose HSM provider (AWS KMS or Google Cloud KMS)
- Review security requirements and compliance needs
- Estimate costs based on expected signing volume
- Schedule deployment window
- Notify stakeholders
- Create KMS key in chosen provider
- Configure IAM policies/service accounts
- Test IAM permissions
- Set up monitoring and alerting
- Configure audit logging (CloudTrail/Cloud Audit Logs)
- Install KMS SDK dependencies
npm install @aws-sdk/client-kms # or @google-cloud/kms - Update configuration files
- Create Kubernetes secrets/configmaps
- Update deployment manifests
- Test in development environment
- Test in staging environment
- Verify signing operations work
- Verify public key retrieval
- Load test signing performance
- Test error handling and retries
- Verify monitoring and alerts
- Backup current Kubernetes secrets
kubectl get secret oracle-secrets -o yaml > backup-secrets.yaml - Backup current deployment
kubectl get deployment oracle -o yaml > backup-deployment.yaml - Document current configuration
- Save rollback procedures
- Create new secrets with HSM configuration
- Update deployment manifest
- Apply changes to Kubernetes
kubectl apply -f k8s/production/
- Monitor rollout
kubectl rollout status deployment/oracle
- Check pod logs for successful initialization
kubectl logs -f deployment/oracle | grep "KeyService initialized"
- Verify provider type in logs
Expected: "KeyService initialized with aws-kms provider" - Test signing operation
- Monitor error rates
- Check latency metrics
- Verify audit logs are being generated
- Monitor signing success rate (target: 100%)
- Monitor signing latency (expected: 10-50ms)
- Monitor KMS API errors (target: 0)
- Monitor application logs for errors
- Check KMS usage and costs
- Verify audit logs are complete
- Verify system stability
- Remove old secrets
kubectl delete secret oracle-secrets-old
- Remove backup files from secure storage
- Update documentation
- Notify stakeholders of successful migration
- Update deployment documentation
- Update runbooks
- Update disaster recovery procedures
- Document lessons learned
- Update team wiki/knowledge base
If issues occur:
- Apply backup deployment
kubectl apply -f backup-deployment.yaml
- Verify rollback successful
- Check logs for errors
- Notify stakeholders
- Restore secrets
kubectl apply -f backup-secrets.yaml
- Restore deployment
kubectl apply -f backup-deployment.yaml
- Verify system operational
- Document rollback reason
- Plan remediation
- Install SDK:
npm install @aws-sdk/client-kms - Rebuild Docker image
- Redeploy
- Verify IAM permissions
- Check IAM role/service account binding
- Test KMS access manually
- Review CloudTrail/Audit logs
- Check network connectivity to KMS
- Verify KMS endpoint region
- Check for rate limiting
- Review application logs
- Check KMS key status
- Verify key permissions
- Check application logs
- Test KMS access manually
Deployment is successful when:
- All pods running and healthy
- Logs show correct provider initialization
- Signing operations succeeding at 100%
- Latency within acceptable range (10-50ms)
- No KMS API errors
- Audit logs being generated
- Monitoring and alerts working
- No increase in application errors
- Stakeholders notified
- DevOps Team: [contact info]
- Security Team: [contact info]
- On-Call Engineer: [contact info]
- AWS Support: [case link]
- Google Cloud Support: [case link]
Deployment Date: _______________
Deployed By: _______________
Approved By: _______________
Rollback Plan Tested: [ ] Yes [ ] No