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>