LAB 03 ‐ Create Policy - gautam-amitesh/OCI GitHub Wiki
Policy Creation
While creating policies, keep in mind that policies are inherited from parent to child compartments, but the reverse is not true. For example, if I grant the inspect policy to Compartment A, then its child compartments Compartment A1 and Compartment A2 will inherit it. However, if I grant the inspect policy to Compartment A1 or Compartment A2, Compartment A will not inherit it.
- Navigate to
Policies
Navigation menu > Identity & Security > Policies
- On the policies page click
Create Policy
Compartment level
Providing the inspect policy to the hub-group for the hub_compartment
- Provide
NameandDescriptionand selecthub_compartmentfromCompartmentlist
- Write policies inside
Policy Builderand clickCreate
Providing the read policy to the hub-group for the hub_compartment
First, I removed the inspect policy for the hub-group because read is higher in the hierarchy, so it includes both inspect and read policies.
- Provide
NameandDescriptionand selecthub_compartmentfromCompartmentlist
- Write policies inside
Policy Builderand clickCreate
Providing the use policy to the hub-group for the hub_compute_storage_compartment
- Provide
NameandDescriptionand selecthub_compute_storage_compartmentfromCompartmentlist
- Write policies inside
Policy Builderand clickCreate
Providing the manage policy to the hub-group for the hub_compute_storage_compartment
First, I removed the use policy for the hub-group because manage is highest in the hierarchy, so it includes all inspect, read, and use policies.
- Provide
NameandDescriptionand selecthub_compute_storage_compartmentfromCompartmentlist
- Write policies inside
Policy Builderand clickCreate
Tenancy level
Administrators is the group where tenancy owners reside, and they require the highest level of policy to manage all resources in the tenancy. There is already a policy named Tenant Admin Policy that provides the privilege to manage all resources. To review this policy, head over to the Policy page and follow the instructions below.
- Change the Applied filters to
rootin my case it'sdevoncloud01 (root)
- Click
Tenant Admin Policy
- Head over to
Statementssection
- Here you can see the policy statement written