implementing-aws-nitro-enclave-security
하는 일
이 도구는 AWS에서 ‘Nitro Enclaves’라는 안전한 환경을 만드는 데 도움을 줍니다. 개인 정보나 암호화 키 같은 민감한 데이터를 가상 머신의 보호된 영역 안에 격리하여, 관리자조차 접근할 수 없도록 합니다.
사용하는 경우
- ✓건강 정보나 금융 정보처럼 매우 민감한 데이터를 보호할 때.
- ✓비밀 정보를 다루는 코드가 검증된 환경에서만 실행되도록 할 때.
- ✓서로 다른 보안 환경이 안정적으로 통신하도록 할 때.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aws-nitro-enclave-security/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“AWS에 안전한 환경을 설정해 환자 데이터를 처리하고, 승인된 코드만 데이터를 복호화할 수 있도록 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
특정 AWS 도구로 코드를 ‘enclave 이미지’로 패키징하고, 보안 정책을 설정해 그 특정 이미지만 암호화 키에 접근할 수 있도록 합니다.
기술 내용 (원본 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’란 무엇인가요?
AWS 가상 머신 안에서 데이터와 코드를 격리하는 기밀 컴퓨팅 환경입니다. 시스템 관리자로부터도 보호합니다.
‘어테스테이션(attestation)’이란 무엇인가요?
민감한 데이터에 접근하기 전에, 코드가 안전하고 신뢰할 수 있는 환경에서 예상대로 실행되고 있음을 증명하는 검증 과정입니다.
특별한 하드웨어가 필요한가요?
네, Nitro 기술을 지원하고 vCPU가 최소 4개 이상인 AWS 가상 머신을 사용해야 합니다.
상세 정보
작성자의 원본 설명
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
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.