Complete guide to HSM-backed key management for the Oracle service.
New to HSM key management? Start here:
-
Quick Start Guide (5 minutes)
- Environment variable reference
- Quick setup for AWS KMS and GCP KMS
- Verification steps
-
Comprehensive Guide (30 minutes)
- Detailed architecture overview
- Step-by-step setup instructions
- Configuration examples
- Troubleshooting guide
Ready to migrate to production?
-
Migration Guide (1 hour)
- Pre-migration checklist
- Phase-by-phase migration steps
- Rollback procedures
- Post-migration monitoring
-
Deployment Checklist (Reference)
- Pre-deployment tasks
- Deployment steps
- Verification procedures
- Success criteria
For developers and architects:
- Implementation Summary (15 minutes)
- Architecture overview
- Component structure
- Code changes
- Performance impact
- Security improvements
Ready-to-use configurations:
-
IAM Policies
-
Kubernetes Deployments
| Variable | Provider | Required | Description |
|---|---|---|---|
KEY_PROVIDER |
All | Yes | env, aws-kms, or gcp-kms |
ORACLE_PRIVATE_KEY |
env | Yes | Stellar secret key |
AWS_REGION |
aws-kms | Yes | AWS region |
AWS_KMS_KEY_ID |
aws-kms | Yes | KMS key ARN |
GCP_PROJECT_ID |
gcp-kms | Yes | GCP project ID |
GCP_KEY_RING_ID |
gcp-kms | Yes | KMS key ring ID |
GCP_KEY_ID |
gcp-kms | Yes | KMS key ID |
AWS KMS:
npm install @aws-sdk/client-kms
export KEY_PROVIDER=aws-kms
export AWS_REGION=us-east-1
export AWS_KMS_KEY_ID=arn:aws:kms:...Google Cloud KMS:
npm install @google-cloud/kms
export KEY_PROVIDER=gcp-kms
export GCP_PROJECT_ID=my-project
export GCP_KEY_RING_ID=oracle-keys
export GCP_KEY_ID=oracle-signing-keyCheck logs for:
KeyService initialized with [provider-type] provider for address: G...
Common issues and solutions:
| Issue | Solution | Reference |
|---|---|---|
| SDK not installed | npm install @aws-sdk/client-kms |
Guide |
| Access denied | Check IAM permissions | Policies |
| High latency | Check network/region | Guide |
| Signing failures | Verify key status | Migration |
| Aspect | Env Provider | HSM Provider |
|---|---|---|
| Key Storage | Environment | HSM |
| Key Exposure | In memory | Never |
| Audit Logging | None | Full |
| Key Rotation | Manual | Automated |
| Compliance | ❌ | ✅ |
| Provider | Latency | Throughput | Cost |
|---|---|---|---|
| Env | <1ms | Unlimited | $0 |
| AWS KMS | 10-50ms | 1,200/s | ~$3/1M |
| GCP KMS | 10-50ms | 60k/min | ~$3/1M |
- Read Quick Start
- Review Migration Guide
- Use Deployment Checklist
- Bookmark Troubleshooting
- Read Implementation Summary
- Review code in
oracle/src/keys/ - Study Kubernetes Examples
- Run tests:
npm test
- Read Comprehensive Guide
- Review Implementation Summary
- Evaluate Performance Impact
- Plan Migration Strategy
- Found a typo? Submit a PR
- Need clarification? Open an issue
- Have a question? Ask in team chat
- Check Troubleshooting Guide
- Review Migration Rollback
- Contact on-call engineer
Before going to production:
- Read all documentation
- Test in staging environment
- Configure monitoring and alerts
- Set up audit logging
- Document rollback procedure
- Train team on new system
- Schedule deployment window
- Notify stakeholders
Once deployed, you'll have:
✅ Enterprise-grade key management
✅ HSM-backed security
✅ Full audit trail
✅ Automated key rotation
✅ Compliance-ready infrastructure
Last Updated: 2026-04-23
Version: 1.0.0
Maintainer: DevOps Team