Build OCI IAM policy statements with compartment scope, verbs, and resource types.
Last verified: May 2026
Output will appear here...Oracle Cloud Infrastructure uses a human-readable policy language that is fundamentally different from the JSON-based policies in AWS or Azure. Policies follow the pattern Allow <subject> to <verb> <resource-type> in <location> where <conditions>, and getting the syntax right — especially compartment paths, verb levels (inspect, read, use, manage), and condition matching — can be tricky. The OCI IAM Policy Builder provides guided inputs for each policy component and generates syntactically correct policy statements. It supports both identity-based and resource-based policies, including cross-tenancy endorsement and admission statements.
Your team is migrating a production workload to OCI and needs 4 IAM policies: developers can manage compute in dev compartment, ops can manage networking across all compartments, security can read everything everywhere, and a dynamic group for OKE worker nodes can access object storage. The builder generates each statement with correct syntax in 5 minutes. Without the tool, the team would have spent 2-3 hours hand-crafting policy strings, hitting syntax errors on first apply, and debugging from cryptic 'NotAuthorizedOrNotFound' errors.
OCI's verb hierarchy (inspect → read → use → manage) is fundamentally simpler than AWS's individual action lists. The downside: it's coarser-grained. If you need 'read most things but not list secrets', you may need to combine 'read <type>' with explicit deny conditions, or use multiple narrow groups.
The most common OCI policy mistake is forgetting compartment hierarchy. A policy at the tenancy root applies everywhere. A policy in a compartment applies only there. If you grant 'manage all-resources in compartment X' to a group, they have no access to compartment Y unless explicitly granted there too.
Always use dynamic groups for service-to-service auth, not pre-shared credentials. A dynamic group + matching rule (e.g., `instance.compartment.id = '...'`) lets all VMs in a compartment automatically authenticate as that group. No keys to rotate, no secrets to leak.
The builder constructs OCI policy statements following the canonical syntax: `Allow <subject> to <verb> <resource-type> in <location> where <conditions>`. It validates verb levels (inspect/read/use/manage), resource type spellings against the OCI catalog, compartment paths, and condition expressions. Output is generated as policy statement strings ready to paste into the OCI console, oci CLI commands, or Terraform oci_identity_policy resources.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.