Skip to content

IAM-02: Instance role identity policy enforces KMS RecipientAttestation

Property Value
Severity high
Platform AWS Nitro Enclaves
Lifecycle stage attest
Mode Passive: read-only cloud API calls.

What it checks

It passes when:

  • All … identity-policy statement(s) granting an attestation-gated KMS op bind to a code measurement (or none grant one).
  • No IAM instance profile attached.
  • Instance profile has no roles.

Example failures:

  • … of … identity-policy statement(s) granting an attestation-gated KMS op do not enforce a code measurement: …. If the key policy delegates to IAM (the default 'Enable IAM User Permissions' statement), this bypasses the enclave attestation gate.

How to fix

  • Add a StringEqualsIgnoreCase condition on kms:RecipientAttestation:ImageSha384 (PCR0) or PCR8 with the expected non-zero enclave image hash to every such statement in the role's identity policy, or enforce the same condition in the KMS key policy and remove its IAM-delegation statement. Never rely on PCR3/PCR4 (launch identity) or NitroTPM PCRs (instance boot) alone, and prefer explicit key ARNs and action names over kms:* / NotAction.
  • Resolve the policy inspection errors and rerun this check.

After the fix, scan again: the check should report PASS.

When it is not assessed

SKIP:

  • No instance ID specified; skipping check.

ERROR:

  • Instance role policy inspection is incomplete; identity-side attestation enforcement is unverified.

Scan inputs

The untrust scan options this check reads:

Option Description
--instance-id EC2 instance ID running the Nitro Enclave.
--region AWS region.

Permissions

The cloud API calls this check makes, read from the scanner's source:

Cloud API call Permission Access
AWS ec2.describe_instances ec2:DescribeInstances read
AWS iam.get_instance_profile iam:GetInstanceProfile read
AWS iam.get_policy iam:GetPolicy read
AWS iam.get_policy_version iam:GetPolicyVersion read
AWS iam.get_role_policy iam:GetRolePolicy read
AWS iam.list_attached_role_policies iam:ListAttachedRolePolicies read
AWS iam.list_role_policies iam:ListRolePolicies read

Every AWS scan also calls sts:GetCallerIdentity. See Required permissions for a complete policy.

Generated from untrust 1.3.0 (commit 7ef462d9a0c3).