implementing-aws-nitro-enclave-security
यह क्या करती है
यह टूल AWS में 'Nitro Enclaves' नाम के सुरक्षित वातावरण बनाने में मदद करता है। ये संवेदनशील डेटा, जैसे निजी जानकारी या encryption keys, को AWS virtual machine के एक सुरक्षित हिस्से में अलग रखते हैं, ताकि सिस्टम एडमिनिस्ट्रेटर भी उन तक न पहुंच सकें।
कब इस्तेमाल करें
- ✓बेहद संवेदनशील डेटा (जैसे स्वास्थ्य या वित्तीय जानकारी) की सुरक्षा के लिए।
- ✓यह पक्का करने के लिए कि secrets संभालने वाला कोड केवल सत्यापित वातावरण में चले।
- ✓अलग-अलग सुरक्षित वातावरणों को भरोसेमंद तरीके से आपस में बात करवाने के लिए।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aws-nitro-enclave-security/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“AWS में एक सुरक्षित वातावरण सेट करो जो मरीज़ों का डेटा प्रोसेस करे, और सुनिश्चित करो कि केवल अधिकृत कोड ही जानकारी को decrypt कर सके।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
आप AWS के खास टूल से अपने कोड को 'enclave image' में पैक करते हैं और सुरक्षा policies सेट करते हैं, ताकि केवल वही खास image encryption keys तक पहुंच सके।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Implementing AWS Nitro Enclave Security
When to Use
- Processing sensitive data (PII, PHI, financial records, cryptographic secrets) that must be isolated from EC2 instance operators and administrators
- Building confidential computing pipelines where even root-level access on the parent instance cannot read enclave memory or state
- Implementing cryptographic attestation workflows that tie KMS decryption rights to a specific, verified enclave image hash
- Deploying multi-party computation environments where two or more enclaves authenticate each other via attestation before exchanging data
- Hardening existing workloads that currently decrypt secrets on the parent instance by migrating decryption into an enclave boundary
Do not use when the workload does not handle sensitive data that requires hardware-level isolation, when the instance type does not support Nitro Enclaves (requires Nitro-based instances with at least 4 vCPUs), or when latency constraints make the vsock communication overhead unacceptable.
Prerequisites
- An AWS account with permissions to launch Nitro-capable EC2 instances (m5.xlarge or larger, C5, R5, M6i families)
- AWS CLI v2 and the
nitro-clitoolset installed on the parent EC2 instance (Amazon Linux 2 or AL2023) - Docker installed on the parent instance for building enclave image files (EIF)
- An AWS KMS symmetric key with key policy permissions for the enclave's IAM role
- The
aws-nitro-enclaves-sdk-cor Pythonaws-encryption-sdkfor enclave-side KMS operations - The Nitro Enclaves allocator service configured with sufficient memory and vCPU allocation in
/etc/nitro_enclaves/allocator.yaml
Workflow
Step 1: Configure the Nitro Enclaves Environment
Set up the parent EC2 instance to support enclave launches:
- Install the Nitro Enclaves CLI: On Amazon Linux 2, install the tools and allocator:
sudo amazon-linux-extras install aws-nitro-enclaves-cli sudo yum install aws-nitro-enclaves-cli-devel -y sudo systemctl enable --now nitro-enclaves-allocator.service sudo systemctl enable --now docker sudo usermod -aG ne ec2-user sudo usermod -aG docker ec2-user - Configure memory and CPU allocation: Edit
/etc/nitro_enclaves/allocator.yamlto reserve resources for the enclave. The enclave requires dedicated memory that is carved from the parent instance:
Restart the allocator:--- memory_mib: 4096 cpu_count: 2sudo systemctl restart nitro-enclaves-allocator.service - Verify setup: Run
nitro-cli describe-enclavesto confirm the CLI can communicate with the Nitro hypervisor. An empty JSON array[]indicates no enclaves are running and the setup is correct.
Step 2: Build the Enclave Image File (EIF)
Package the sensitive workload into a signed enclave image:
Create the application Dockerfile: The enclave runs a minimal Linux environment. The application communicates exclusively through vsock:
FROM amazonlinux:2 RUN yum install -y python3 python3-pip && \ pip3 install boto3 cbor2 cryptography requests COPY enclave_app.py /app/enclave_app.py WORKDIR /app CMD ["python3", "enclave_app.py"]Build the EIF with nitro-cli: Convert the Docker image into an enclave image file, capturing the PCR measurements:
docker build -t enclave-app:latest . nitro-cli build-enclave \ --docker-uri enclave-app:latest \ --output-file enclave-app.eifThe output contains three critical PCR values:
- PCR0: SHA-384 hash of the enclave image file (the full image digest)
- PCR1: SHA-384 hash of the Linux kernel and bootstrap process
- PCR2: SHA-384 hash of the application code Record these values; they are used in KMS key policies for attestation-based access control.
Build a signed EIF (recommended for production): Generate a signing certificate and use it to produce PCR8:
openssl ecparam -name secp384r1 -genkey -noout -out enclave_key.pem openssl req -new -key enclave_key.pem -sha384 \ -nodes -subj "/CN=Enclave Signer" -out enclave_csr.pem openssl x509 -req -days 365 -in enclave_csr.pem \ -signkey enclave_key.pem -sha384 -out enclave_cert.pem nitro-cli build-enclave \ --docker-uri enclave-app:latest \ --output-file enclave-app.eif \ --private-key enclave_key.pem \ --signing-certificate enclave_cert.pem
…
अक्सर पूछे जाने वाले सवाल
'Nitro Enclaves' क्या हैं?
ये confidential computing वातावरण हैं जो AWS virtual machine के अंदर डेटा और कोड को अलग रखते हैं, यहां तक कि सिस्टम एडमिनिस्ट्रेटर से भी।
'attestation' क्या है?
यह एक सत्यापन प्रक्रिया है जो साबित करती है कि आपका कोड सुरक्षित और भरोसेमंद वातावरण में ठीक वैसे ही चल रहा है जैसा अपेक्षित है। उसके बाद ही संवेदनशील डेटा तक पहुंच दी जाती है।
क्या मुझे खास हार्डवेयर चाहिए?
हां, आपको ऐसे AWS virtual machine इस्तेमाल करने होंगे जो Nitro तकनीक सपोर्ट करते हों और जिनमें कम से कम 4 vCPUs हों।
जानकारी
लेखक का मूल विवरण
Build AWS Nitro Enclave confidential computing environments using nitro-cli to create enclave images, configure attestation-aware KMS policies with PCR condition keys, validate attestation documents against the Nitro PKI root, and set up vsock/kmstool-enclave-cli pipelines for processing PII, keys, and health records. Use for Nitro Enclave setup, attestation validation, or scoping KMS to an enclav
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #8000
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।