π AWS KMS Integration for LafaekStreet β
Enterprise-grade security for Hedera blockchain transactions using AWS Key Management Service
π Documentation Guide β
| Document | Purpose | Time to Read |
|---|---|---|
| Quick Start | Get KMS working in 5 minutes | 5 min |
| Technical Deep Dive | Complete implementation details | 15 min |
| Architecture Diagrams | Visual system architecture | 10 min |
π― What This Does β
Every citizen report in LafaekStreet is cryptographically signed and recorded on the Hedera blockchain. AWS KMS provides hardware-backed security for the signing keys.
βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Citizen β β LafaekStreetβ β AWS KMS β β Hedera β
β Report βββββββΆβ Backend βββββββΆβ (HSM) βββββββΆβ Blockchain β
β β β β β β β β
β "Pothole β β Create TX β β Sign TX β β Immutable β
β on road" β β + Hash β β (secure) β β Record β
βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ
β
βββββββββββββ΄ββββββββββββ
β Private key NEVER β
β leaves AWS hardware β
βββββββββββββββββββββββββπ‘οΈ Why AWS KMS? β
| Traditional Approach | AWS KMS Approach |
|---|---|
β Private key in .env file | β Key stored in tamper-proof HSM |
| β Key can be stolen/leaked | β Key cannot be exported |
| β No audit trail | β All operations logged in CloudTrail |
| β Manual key rotation | β Automatic key rotation |
| β Single point of failure | β Multi-region backup |
Security Certifications β
- β FIPS 140-2 Level 2 validated hardware
- β SOC 2 compliant
- β PCI DSS compliant
- β HIPAA eligible
β‘ Quick Verification β
bash
# Test KMS integration
python test_kms_integration.py
# Expected output:
# β
ALL KMS TESTS PASSEDπ Files in This Directory β
| File | Description |
|---|---|
README.md | This overview (you are here) |
QUICK_START_KMS.md | 5-minute setup guide |
AWS_KMS_IMPLEMENTATION.md | Complete technical documentation |
KMS_ARCHITECTURE.md | Visual architecture diagrams |
test_kms_integration.py | Test script to verify setup |
install_kms_dependencies.sh | Dependency installation script |
π Related Documentation β
- Backend README - Main backend documentation
- Hedera Integration - Blockchain integration details
- Database Schema - How blockchain records are stored
π Quick Troubleshooting β
| Error | Solution |
|---|---|
Module not found: Crypto | Run pip install pycryptodome==3.19.1 |
AWS_KMS_KEY_ID not configured | Add KMS ARN to .env file |
AccessDeniedException | Check IAM permissions: kms:Sign, kms:GetPublicKey |
For detailed troubleshooting, see AWS_KMS_IMPLEMENTATION.md.
π Hardware Security β’ π Immutable Records β’ π Full Audit Trail
