π Just Started Exploring OCI β Part 1
π Identity & Access Management (IAM) + π Compartments + π Regions
Iβve started diving into Oracle Cloud Infrastructure (OCI) and hereβs what Iβve picked up so far from IAM & resource organization.
π IAM = Who can do What on Which resources, and Where π
OCIβs Identity and Access Management (IAM) system helps you secure cloud resources by defining:
π§ββοΈ Users
π₯ Groups
π Policies
π¦ Compartments
π οΈ Resources
IAM Flow:
π Create Identity Domain
π Add Users
π Organize into Groups
π Define Policies for groups
π Scope them to Compartments inside your Tenancy
π Grant access to Resources π₯
π§ IAM Concepts:
AuthN (Authentication) = Who you are
πΈ Username/password
πΈ API signing keys
πΈ Auth tokens
πΈ SAML, OAuth2
AuthZ (Authorization) = What youβre allowed to do
β
Authorization in OCI is handled through policies. These are plain-text statements that grant permissions to groups, not individual users, to perform actions on resources in specific compartments.
π Policies: Plain, Powerful & Human-readable
Example:
Allow group DevTeam to manage compute-instances in compartment ProjectA
π§ Understanding IAM Policies in OCI
Policies are defined using a simple, human-readable language that specifies:
- Who (a group)
- What permissions (verbs like inspect, read, use, or manage)
- On what resource types (like instances, buckets, volumes)
- In which compartment or tenancy
Verbs:
- inspect: List and view metadata.
- read: View full details (but no updates).
- use: Perform standard operations (start/stop, etc.).
- manage: Full control (create/update/delete).
Policy Scope:
- Policies can be defined at the tenancy level (global) or at a compartment level (scoped).
- You can also create dynamic groups (for resources like instances or functions) and attach policies to allow them to access other OCI servicesβideal for automation or service-to-service communication.
ποΈ Compartments = Logical Isolation
Think of compartments as folders ποΈ:
- Group resources by team/project/type
- Root compartment holds everything, but best to organize using sub-compartments
- Up to 6 levels of nesting allowed
Resources can:
- π Move between compartments
- π Belong to multiple regions
- π Interact across compartments
π OCID β Oracle Cloud Identifier
Every OCI resource gets a globally unique ID:
ocid1.<resource_type>.<realm>.[region].<unique_id>
Useful for tracing, automation, and scripting!
π Regions, Availability Domains, and Fault Domains β for High Availability
OCI is designed to minimize single points of failure (SPOF) and maximize uptime π:
π’ Region
β
βββ π’ Availability Domains (ADs)
β βββ πΉ Fault Domain 1
β βββ πΉ Fault Domain 2
β βββ πΉ Fault Domain 3
β
βββ πͺ’ Region Pair (for disaster recovery)
- Region: Geographical location (e.g., India Central, US East)
- Availability Domain (AD): Physically isolated DC within a region
- Fault Domain: Logical group within an AD β protects from rack/power failures
β
Use multiple fault domains within an AD for HA
β
Use multiple ADs across a region for redundancy
β
Use Region Pairs for cross-region disaster recovery (DR)
π IAM Best Practices in OCI
Start by creating an Identity Domain, then define users, group them
- logically (e.g., by role or function), and attach policies to groups.
- Avoid using the tenancy administrator for daily workβcreate least-privilege roles.
- Enable MFA for all users to prevent unauthorized access.
- Use dedicated compartments for network, compute, security, audit logs, etc.
- Regularly review and clean up unused users, groups, and policies.
IAM in OCI is built with enterprise-grade flexibility and security in mind. Whether you're building a secure landing zone, managing team access, or automating deployments, understanding IAM is essential to running a scalable and secure OCI environment.
π That's it for Part 1 of my OCI Journey! IAM + Compartments + Regions made clear π§
Coming up next: Networking, Compute & Storage modules π
Top comments (2)
Nice blog Vishnu, looking forward for the next one :)
Fantastic App β feature-rich and intuitive.