Saltar al contenido
Skillpedia
Seguridad35 mil · #8000

implementing-aws-nitro-enclave-security

Qué hace

Esta herramienta te ayuda a crear entornos seguros en AWS llamados 'Nitro Enclaves'. Aíslan datos sensibles, como información personal o claves de cifrado, dentro de una parte protegida de la máquina virtual, de modo que ni siquiera los administradores puedan acceder a ellos.

Cuándo usarla

  • ✓Para proteger datos muy sensibles, como información sanitaria o financiera.
  • ✓Para asegurarte de que el código que maneja secretos solo se ejecute en un entorno verificado.
  • ✓Para permitir que distintos entornos seguros se comuniquen de forma fiable entre sí.

Link de la skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aws-nitro-enclave-security/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aws-nitro-enclave-security/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Configura un entorno seguro en AWS para procesar datos de pacientes, asegurando que solo el código autorizado pueda descifrar la información.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Usas herramientas específicas de AWS para empaquetar tu código en una 'imagen de enclave' y configuras políticas de seguridad para que solo esa imagen concreta pueda acceder a las claves de cifrado.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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-cli toolset 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-c or Python aws-encryption-sdk for 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.yaml to reserve resources for the enclave. The enclave requires dedicated memory that is carved from the parent instance:
    ---
    memory_mib: 4096
    cpu_count: 2
    
    Restart the allocator: sudo systemctl restart nitro-enclaves-allocator.service
  • Verify setup: Run nitro-cli describe-enclaves to 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.eif
    

    The 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
    

…

Preguntas frecuentes

¿Qué son los 'Nitro Enclaves'?

Son entornos de computación confidencial que aíslan datos y código dentro de una máquina virtual de AWS, protegiéndolos incluso de los administradores del sistema.

¿Qué es la 'atestación'?

Es un proceso de verificación que demuestra que tu código se está ejecutando exactamente como se espera en un entorno seguro y de confianza, antes de permitir el acceso a datos sensibles.

¿Necesito hardware especial?

Sí, necesitas usar máquinas virtuales de AWS compatibles con la tecnología Nitro y con al menos 4 vCPUs.

Detalles

Descripción original del autor

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

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularidad

Estrellas en GitHub
35 mil
Posición en el ranking
#8000
Licencia
Apache-2.0
Actualizada
31/8/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas