Skip to content

πŸ” AWS KMS Integration for LafaekStreet ​

Enterprise-grade security for Hedera blockchain transactions using AWS Key Management Service


πŸ“š Documentation Guide ​

DocumentPurposeTime to Read
Quick StartGet KMS working in 5 minutes5 min
Technical Deep DiveComplete implementation details15 min
Architecture DiagramsVisual system architecture10 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 ApproachAWS 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 ​

FileDescription
README.mdThis overview (you are here)
QUICK_START_KMS.md5-minute setup guide
AWS_KMS_IMPLEMENTATION.mdComplete technical documentation
KMS_ARCHITECTURE.mdVisual architecture diagrams
test_kms_integration.pyTest script to verify setup
install_kms_dependencies.shDependency installation script


πŸ†˜ Quick Troubleshooting ​

ErrorSolution
Module not found: CryptoRun pip install pycryptodome==3.19.1
AWS_KMS_KEY_ID not configuredAdd KMS ARN to .env file
AccessDeniedExceptionCheck IAM permissions: kms:Sign, kms:GetPublicKey

For detailed troubleshooting, see AWS_KMS_IMPLEMENTATION.md.


πŸ” Hardware Security β€’ πŸ“œ Immutable Records β€’ πŸ” Full Audit Trail

Built for Timor-Leste