Lab:03 IAM Policy - TanveeKhanDB/OCI GitHub Wiki

IAM Policy

Definition: Identity and Access Managment Policy is a set of rules that define WHAT users/groups can DO with WHICH resources. Ultimately It is the "bridge" that connects the Who (Group) to the What (Verb/Resource) and the Where (Compartment).

It connects:

๐Ÿ‘ค Users / ๐Ÿ‘ฅ Groups ๐Ÿ“ฆ Compartments โš™๏ธ Actions (read, write, manage) ๐Ÿง  Simple Formula

๐Ÿ‘‰ Policy = WHO + WHAT + WHERE

WHO โ†’ Group (e.g., Developers)

WHAT โ†’ Action (read, manage, use)

WHERE โ†’ Compartment

โšก Real Example (Very Important)

Policy:

Allow group Developers to manage instances in compartment Dev

๐Ÿ‘‰ Meaning:

๐Ÿ‘ฅ Developers (WHO)

โš™๏ธ can manage instances (WHAT)

๐Ÿ“ฆ in Dev compartment (WHERE)


Conceptual View


๐Ÿ”‘ Common Actions in OCI Policies

inspect โ†’ view basic info (Auditing purpose)

read โ†’ see full details (Monitoring purpose)

use โ†’ use resource (but not change) (Day to Day admin task i.e CPU +/-)

manage โ†’ full control (Most powerfull)


Steps to define policy in OCI

**Note:You can create only 500 policies per compartement.**


๐Ÿข Real-Life Analogy

In a company: HR Department (Group) Can access employee records (Action) Only in HR system (Compartment)

๐Ÿ‘‰ That rule = IAM Policy


๐ŸŽฏ Why IAM Policies Matter โœ”๏ธ Control access securely โœ”๏ธ Prevent unauthorized actions โœ”๏ธ Follow least privilege principle

๐Ÿงพ One-Line Summary


๐Ÿ‘‰ IAM Policy = Rule that controls who can access what resources in OCI and how>