Course contentsShow
← Cloud and Infrastructure
Lesson 338 of 2,9897. Identity and Access ManagementFree lesson

Policy Evaluation Logic

How cloud providers determine whether a request is allowed through explicit deny, allow, and default deny.

Policy Evaluation Logic

What you'll learn: How cloud providers decide whether to allow or deny your requests using a specific decision-making process.

When you try to access a cloud resource—like reading a file from storage or starting a virtual machine—the cloud provider's IAM system must answer one question: "Is this allowed?" It doesn't just check one policy and call it done. Instead, it follows a strict policy evaluation logic to make that decision.

The Three-Step Decision Process

Think of IAM like a security checkpoint with three gates:

  1. Explicit Deny (Gate 1): First, the system checks all policies for an explicit Deny. If any policy explicitly denies the action, the request is immediately blocked—no exceptions. This always wins.

  2. Explicit Allow (Gate 2): If no explicit deny exists, the system looks for an explicit Allow. If at least one policy grants permission, the request can proceed.

  3. Default Deny (Gate 3): If there's no explicit deny and no explicit allow, the request is denied by default. This is the "fail-safe" position—you must be explicitly granted permission.

Why This Order Matters

Explicit denies acting as a trump card means you can broadly grant permissions, then carve out specific exceptions. For example, you might allow a user to access all S3 buckets except the finance bucket—the explicit deny on finance overrides the broader allow.

Key Takeaway: Cloud IAM uses a three-tier evaluation: explicit deny always wins, explicit allow comes next, and if neither exists, the default deny blocks the request. This "deny-by-default" approach ensures security unless permissions are purposefully granted.