---
title: "A few notes on AWS Nitro Enclaves: KMS integration"
description: "Integrating AWS Nitro Enclaves with KMS through PCR-based key policies and attestation-encrypted responses still leaves a range of passive and active attacks on the enclave-KMS channel."
url: "https://swe.quest/articles/a-few-notes-on-aws-nitro-enclaves-kms-integration-717dffbbed378c0a"
canonical: "https://blog.trailofbits.com/2026/08/05/a-few-notes-on-aws-nitro-enclaves-kms-integration/"
source: "Trail of Bits"
published: "2026-08-05"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 17
tags: ["cryptography","sandboxing","cloud","identity-auth","security"]
---

# A few notes on AWS Nitro Enclaves: KMS integration

A post on [Trail of Bits](https://swe.quest/sources/trail-of-bits.md), published 2026-08-05, 17 min read, Deep dive. Original: [https://blog.trailofbits.com/2026/08/05/a-few-notes-on-aws-nitro-enclaves-kms-integration/](https://blog.trailofbits.com/2026/08/05/a-few-notes-on-aws-nitro-enclaves-kms-integration/)

## Summary

Integrating AWS Nitro Enclaves with KMS through PCR-based key policies and attestation-encrypted responses still leaves a range of passive and active attacks on the enclave-KMS channel. Passive attackers can swap data-key ciphertexts, substitute CMKs, abuse key aliases or IAM credentials, and replay attestations within KMS's five-minute window. The countermeasures are attacker-resistant encryption context, hardcoded full CMK ARNs checked against response keyId, an attested IAM role verified via sts:GetCallerIdentity, and validation of algorithm identifiers. Active attackers require enclave-initiated TLS with a pinned, attested Amazon CA plus VPC restrictions, and key policies should use PCR0/PCR8, avoid root-principal pitfalls, and require MFA for critical operations.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Cryptography](https://swe.quest/tags/cryptography.md) (Security)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Security](https://swe.quest/tags/security.md) (Security)

## Prerequisites

- AWS KMS and IAM policies ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- envelope encryption ([easy posts on Cryptography](https://swe.quest/tags/cryptography.md?difficulty=easy))
- remote attestation and PCRs
- TLS basics ([easy posts on Cryptography](https://swe.quest/tags/cryptography.md?difficulty=easy))

## Keywords

AWS Nitro Enclaves, AWS KMS, PCR, envelope encryption, encryption context, IAM, TLS, VPC

## Related posts

- [How Bee implemented Zero Operator Access for personal AI on AWS](https://swe.quest/articles/how-bee-implemented-zero-operator-access-for-personal-ai-on-aws-8963bf3fef032b45.md): AWS Architecture Blog · 2026-11-20 · Hard · 8 min read · Security, Cryptography, Cloud platforms, Privacy, Sandboxing & isolation
  Bee, Amazon's wearable personal AI, enforces Zero Operator Access by having the user's device release short-lived decryption keys only to EC2 instances whose NitroTPM attestation matches software published in a public Sigstore Rekor transparency log.
- [Upgrading 3 Million Variables to Envelope Encryption](https://swe.quest/articles/upgrading-3-million-variables-to-envelope-encryption-eb068fd9d30969a4.md): Railway · 2024-04-16 · Medium · 6 min read · Cryptography, Schema migrations, Cloud platforms, Security
  Railway replaced direct per-variable calls to GCP KMS with envelope encryption: a locally generated AES-256-GCM data key per environment, encrypted once by KMS and serialized alongside each ciphertext.
- [Incident Report: October 21st Security Attack](https://swe.quest/articles/incident-report-october-21st-security-attack-5a78ac26d27c6de1.md): Railway · 2026-11-10 · Medium · 21 min read · Incidents & postmortems, Security, Identity & auth, Multi-tenancy, CI/CD
  An attacker partially escaped filesystem isolation in Railway's multi-tenant build infrastructure and stole a build credential.
- [Our Journey Migrating to AWS IMDSv2](https://swe.quest/articles/our-journey-migrating-to-aws-imdsv2-7a3bae8a33284213.md): Slack Engineering · 2023-12-12 · Medium · 10 min read · Cloud platforms, Security, Application security, Infrastructure as code, Identity & auth
  Slack enforced IMDSv2 across roughly 60,000 EC2 instances in hundreds of AWS accounts.
- [Securing Model Context Protocol: Safer Agentic AI with Containers](https://swe.quest/articles/securing-model-context-protocol-safer-agentic-ai-with-containers-f3a8a077a2aa77b5.md): Docker · 2025-05-06 · Easy · 9 min read · AI agents, Sandboxing & isolation, Supply chain security, Containers
  Running MCP servers via npx on the host with plaintext environment-variable secrets leaves agentic tooling exposed to supply-chain tampering, credential leakage, and attacks such as rug pulls, tool shadowing, and tool poisoning.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
