IAM Policy Check

IAM Policy Check is a copy-paste React component that stops helps catch an s3 bucket made public by a policy before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/iam-policy-check
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsHelps catch an S3 bucket made public by a policy

Was this component page useful?

How do I install IAM Policy Check?

pnpm dlx shadcn@latest add @bollard/iam-policy-check

The files land in your project. They're yours to edit.

How do I use IAM Policy Check in React?

iam-policy-check-usage.tsx
import { IamPolicyCheck } from "@/components/ui/iam-policy-check"

return <IamPolicyCheck label="acme-uploads bucket policy" defaultValue={POLICY} accountId="111122223333" />

What input mistakes does IAM Policy Check catch?

  • Full-admin and service:* action wildcards, and Resource "*"
  • Principal "*" that S3 Block Public Access treats as public, including conditions that don't narrow it
  • Public reads and writes on a bucket
  • Allow with NotAction, and NotPrincipal traps
  • iam:PassRole on every role, with an iam:PassedToService fix

What props does IAM Policy Check accept?

IamPolicyCheck props
PropTypeDefault
value

Controlled policy JSON.

string—
defaultValue

Initial JSON when uncontrolled.

string""
onValueChange

Called with the new text on every edit or fix. Fixes re-format the JSON with 2-space indents.

(value: string) => void—
accountId

Your 12-digit AWS account ID; enables "Limit to account" on public principals.

string—
orgId

Your AWS Organizations ID (o-…); enables "Limit to my organization" when no account ID is given.

string—
usedActions

Actions the principal really uses (e.g. from IAM Access Analyzer); enables replacing wildcards with them.

string[]—
policyType

What the policy is attached as; "scp" treats Allow "*" on "*" as the FullAWSAccess baseline.

"identity" | "resource" | "scp"—
label

Visible label; shorthand for `messages.label`.

string—
messages

Every visible string. `{line}`, `{detail}`, `{count}`, `{account}`, `{n}` are filled in.

Partial<IamPolicyCheckMessages>—

* required. Also accepts the native props of <textarea> (className, aria-*, data-*…), passed through to it.

How is IAM Policy Check accessible?

  • Text area has a label, aria-invalid when errors exist, and is described by the status
  • Status uses role=status; icons are aria-hidden
  • Each issue has a labelled button that selects its line; focus returns to a nearby control after a fix

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Validate policies with IAM Access Analyzer in CI and keep S3 Block Public Access on at the account level.

  • Static review of one policy; it can't see SCPs, permission boundaries, session policies or resource policies elsewhere
  • Doesn't evaluate a request the way the IAM engine does; use IAM Access Analyzer or the policy simulator to confirm
  • Suggested fixes (your account, used actions) depend on the inputs you pass

What validation rules apply to IAM Policy Check?

Rules last verified:

Informational; check the official source. Confirmed that non-public requires fixed values for principals or aws:SourceIp CIDR sets. The exact CIDR width AWS counts as public and the IAM element reference were not re-checked this round. Copied components don't update themselves, so re-check after rule changes (see updating a component).

What expensive mistakes does IAM Policy Check stop?

Helps catch an S3 bucket made public by a policy

Also known as

aws iam · s3 bucket policy · iam policy · least privilege · principal · json policy · cloud security · devops

Field type

What dependencies does IAM Policy Check require?

IAM Policy Check facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameIAM Policy Check
Registry identifier@bollard/iam-policy-check
Install commandnpx shadcn@latest add @bollard/iam-policy-check
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about IAM Policy Check

What form validation mistake does IAM Policy Check catch?

IAM Policy Check prevents helps catch an S3 bucket made public by a policy. Reads an AWS IAM or S3 bucket policy back in plain words and flags grants far wider than intended, such as a bucket made public. Catches: Full-admin and service:* action wildcards, and Resource "*", Principal "*" that S3 Block Public Access treats as public, including conditions that don't narrow it, Public reads and writes on a bucket, Allow with NotAction, and NotPrincipal traps, iam:PassRole on every role, with an iam:PassedToService fix. Limitation: validate iam-policy-check schemas on backend.

How do I install iam-policy-check with shadcn?

Run `npx shadcn@latest add @bollard/iam-policy-check`. Sources added: registry/default/iam-policy-check/iam-policy-check.tsx, registry/default/iam-policy-check/iam-policy.ts. Package requirements: lucide-react.

What props customize IAM Policy Check?

IAM Policy Check accepts `value`, `defaultValue`, `onValueChange`, `accountId`, `orgId`. Configures aws iam, s3 bucket policy, iam policy behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of iam-policy-check?

Static review of one policy; it can't see SCPs, permission boundaries, session policies or resource policies elsewhere. Doesn't evaluate a request the way the IAM engine does; use IAM Access Analyzer or the policy simulator to confirm. Suggested fixes (your account, used actions) depend on the inputs you pass Server requirement: Validate policies with IAM Access Analyzer in CI and keep S3 Block Public Access on at the account level.

How does IAM Policy Check meet accessibility guidelines?

Text area has a label, aria-invalid when errors exist, and is described by the status. Status uses role=status; icons are aria-hidden. Each issue has a labelled button that selects its line; focus returns to a nearby control after a fix. Minimizes errors: s3 bucket public, iam policy too broad.

Which components pair with IAM Policy Check?