All Tools View Categories About Contact Privacy

IAM Policy Conflict Detector

Find Allow vs Deny statements across multiple policies whose Action/Resource patterns overlap — an explicit Deny always wins.

Wildcard-overlap heuristic, not a complete regex-equivalence check — runs entirely in your browser.

Conflicts found


  

About IAM Policy Conflict Detector

When several policies apply to the same role or user, it is easy for one policy to grant an action that another policy explicitly denies — and in IAM, the explicit Deny always wins, which can be a surprising source of "access denied" even though a policy clearly grants the permission. IAM Policy Conflict Detector pastes 2–3 policy documents, scans every Allow statement against every Deny statement across all of them, and reports the pairs whose Action and Resource patterns overlap.

Overlap detection uses the same wildcard-pattern heuristic documented in the shared policy engine: two patterns are treated as overlapping if either, read literally, matches the other read as a wildcard. That is enough to catch the common cases — an exact match, a Deny wildcard that covers an Allow statement’s specific action, an Allow wildcard that covers a Deny statement’s specific action — but it is not a full regex-equivalence check, so unusual wildcard shapes can occasionally be missed, and statements using NotAction/NotResource/Principal-only forms are excluded from the check entirely rather than risk a wrong answer.

Finding a conflict does not change the outcome — an explicit Deny always overrides an overlapping Allow in real IAM evaluation, regardless of which policy it lives in or how many other policies grant the access. What this tool adds is visibility: instead of noticing the effect of a buried Deny only when a request unexpectedly fails, you can see the exact Allow/Deny pair up front and decide whether the Deny is an intentional guardrail or an accidental one.

Features

  • Cross-policy conflict detection between Allow and Deny statements across 2–3 pasted documents.
  • Each conflict shown as an Allow/Deny pair, sourced back to its originating policy.
  • Documented wildcard-overlap heuristic — not a full regex-equivalence engine, and it says so.
  • Sample conflicting pair to see the tool in action immediately.
  • 100% client-side — nothing is uploaded.

How to Use

  1. Paste Policy 1 and Policy 2 (and optionally Policy 3).
  2. Click Detect Conflicts.
  3. Review each conflict pair — the Allow statement and the overlapping Deny statement, shown together with their source policy.
  4. Remember: the Deny always wins for the overlapping scope — use the list to check whether that is what you intended.

Examples

Example 1 — direct conflict. Policy 1 allows s3:GetObject on arn:aws:s3:::b/*, Policy 2 denies the same action on the same resource → 1 conflict reported.

Example 2 — wildcard guardrail. Policy 1 allows s3:* on a bucket, Policy 2 denies s3:DeleteBucket on the same bucket → reported as a conflict, since the Allow statement’s s3:* pattern covers the Deny statement’s specific action.

Example 3 — no overlap. Policy 1 allows S3 actions, Policy 2 denies an unrelated EC2 action → 0 conflicts.

Benefits

  • Surfaces hidden Deny effects before they show up as unexpected access-denied errors.
  • Cross-policy visibility — conflicts between statements in different documents are easy to miss by eye.
  • Honest about limits — clearly documents its heuristic instead of overclaiming exhaustive coverage.
  • Private — everything stays in your browser.

Frequently Asked Questions

What counts as a "conflict" here?
An Allow statement (from any of the pasted policies) whose Action patterns overlap AND whose Resource patterns overlap with a Deny statement (from any pasted policy, including the same one). Overlap is checked with a wildcard heuristic, not full regex-equivalence — see below.
Who actually wins when a conflict is found?
In real IAM evaluation, an explicit Deny always wins over any Allow for the overlapping scope. This tool does not need to tell you that — it always holds; what it does is surface the pairs so you can review whether the Deny is intentional (a guardrail) or accidental (blocking access you meant to grant).
Is the overlap check exhaustive?
No — it is a documented heuristic (see <code>patternListsOverlap</code> and <code>findPolicyConflicts</code> in the shared engine). Two patterns are considered to overlap if either one, treated as a literal string, matches the other treated as a wildcard pattern. This catches exact matches, a wildcard containing a literal, and simple prefix-style wildcard/wildcard relationships, but it is <strong>not a complete regex-equivalence check</strong> — some overlapping wildcard pairs (for example, two differently-shaped patterns that both happen to match some third value neither of them literally is) can be missed.
Does it cover NotAction, NotResource, or Principal-only statements?
No. Statements using <code>NotAction</code>, <code>NotResource</code>, or that only specify a <code>Principal</code> without an <code>Action</code>/<code>Resource</code> pair are excluded from this heuristic entirely — they are simply not considered when looking for conflicts, since the overlap logic here is a straightforward wildcard-pattern match on Action/Resource lists.
Is any policy uploaded anywhere?
No — detection runs entirely in your browser.