Which TWO best practices should be followed when designing OCI IAM policies? (Choose two.)
Scoping IAM policies to specific compartments rather than the tenancy root directly satisfies the principle of least privilege, which is a core security best practice in Oracle Cloud Infrastructure. By restricting permissions to the smallest necessary operational boundary, you limit the blast radius of compromised credentials or misconfigurations. Applying policies at the root compartment grants excessive, unneeded access across all child compartments, whereas compartment-level assignment ensures that principals can only manage or view resources within their designated administrative domain.
Why this answer
Option A is correct because scoping policies to specific compartments rather than the tenancy root follows the OCI best practice of limiting a policy's blast radius; policies written at the tenancy level apply to all compartments and resources, so granting access only where needed reduces unintended exposure. Option C is correct because the Principle of Least Privilege dictates granting only the minimum permissions required for a user's job, which in OCI means using narrowly defined verbs (inspect, read, use, manage) and specific resource types instead of broad grants. Option B is not correct because hardcoding API signing keys into public repositories exposes credentials and violates OCI security guidance to protect and rotate keys.
Option D is not correct because assigning 'manage all-resources' to every user grants excessive, tenancy-wide privileges and directly contradicts least privilege. Option E is not correct because tenancy-wide administrative policies for all standard developers over-privileges them; developer access should be scoped to the compartments and resources they actually need.
Exam trap
The trap is selecting convenience-oriented options (broad permissions, hardcoded keys) over security best practices — candidates must consistently choose least privilege and narrow scoping.