﻿# Why does IAM Allow with NotAction fail to define read-only access?

A practical investigation of why does IAM Allow with NotAction fail to define read-only access?, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-security-iam-notaction-readonly-policy-complement/
Language: en

## The operational scenario

A model worker needs to download accepted artifacts, and a policy author tries to make it read-only by allowing everything except a short list of write operations. That exclusion list can omit another applicable mutation or administration action. A compact document then looks restrictive while granting more than the intended read workflow. The policy’s set semantics matter more than how few action names appear.

## The trust-boundary mechanism

AWS defines NotAction as matching applicable actions other than those listed, with Resource determining scope. Under Allow, the complement is allowed; the listed exclusions are not themselves explicitly denied by that statement. Another applicable policy can grant an excluded action. Under Deny, the complement has a different effect. These rules should be evaluated as authorization sets rather than translated from an informal phrase such as all but writes.

## Define the control contract

Define the worker’s required operations and exact resource types first, including any separate metadata or key-service needs. Distinguish a positive allowed-action inventory from an explicit deny and from absence of an allow. Preserve other identity, resource and organization policies affecting the principal. Do not assume that limiting one statement’s resource automatically constrains unrelated permissions granted elsewhere in the effective policy set.

## A step-by-step verification

First map the accepted download workflow to documented API permissions. Next examine the proposed NotAction complement over the relevant resources. Use a non-destructive policy fixture to evaluate required reads, representative mutations and an excluded action granted elsewhere. Compare with an explicit required-action design. Review new actions and changed resource scope as policy changes rather than assuming an old exclusion list remains a permanent definition of read-only.

## Evidence required for acceptance

Evidence should retain policy versions, evaluated principal and resource context, expected outcomes and the operation-to-permission map. A control places a mutation outside the short exclusion list: the audit must detect the unexpected allowance without executing that mutation against production. Another control supplies an additional allow for an excluded action, demonstrating why exclusion in one Allow statement is not an explicit deny.

## Failure cases and limits

This technical review does not establish legal compliance or certify an entire AWS account. Service-specific conditions and resource policies still require the actual context. NotAction can be useful when its complement is genuinely the intended set; the mistake is treating brevity as minimal privilege. The conclusion should state which operations remain authorized and which independent controls enforce the worker’s declared read-only workflow.

## Primary references and related reading

NotAction with Allow grants the applicable complement; it is not a positive inventory of required reads. [AWS IAM NotAction semantics](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_notaction.html); [AWS IAM policy evaluation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html).

The proposed investigation of iam notaction readonly policy complement is a proposed control review; no live security test was executed. Related reading: [The 2024 Hugging Face Spaces disclosure: secrets, token scope and evidence](/journal/hugging-face-spaces-2024-secret-disclosure-token-scope/); [The digest matches, but whom do you trust: verifying container image signatures](/journal/artifact-signature-verification/).
