IAM and compartments
OCI Foundations · Lesson 3 of 15 · 14:56
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Oracle Cloud Infrastructure Foundations Associate exam (1Z0-1085-26). In this lesson: Identity and Access Management, the tenancy and its root compartment, compartments and their limits, identity domains, and the home region. Includes three original practice questions, with Kettlebrook Fitness, a fictional gym chain, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Three teams, one account
Kettlebrook now has one OCI account, and three teams want to start at once: the network engineers, the developers, and the finance team, who only wants to see costs. If everyone gets full access, one mistake could break the booking website. This lesson covers identity and access management, compartments, identity domains, and the home region.
Identity and access management
Identity and access management, or IAM, controls who can access your cloud resources in OCI, and what they can do with them. A principal is an entity that can interact with OCI resources: a user, a group of users, or even a compute instance that calls OCI services. Resources are the cloud objects that you create and use, like networks, instances, and storage buckets. And IAM answers two questions: who are you, which is authentication, and what are you allowed to do, which is authorization.
Compartments
A compartment is a collection of related resources, used to organize and isolate them, and to control access to them. When Oracle creates your tenancy, the tenancy itself is the root compartment, and you create other compartments inside it, for example one for each team or each project. You place each resource in a compartment when you create it, and resources in different compartments can still work together, like an instance that uses a network in another compartment. Compartments are global: one compartment spans all the regions of your tenancy. And compartments can be nested up to six levels deep, with up to six thousand compartments per tenancy.
Compartment rules
Compartments come with a few rules. Policies are inherited downward: a permission that you grant on a parent compartment also applies to all of its child compartments. Most resources can move from one compartment to another, and a whole compartment can move under a new parent with all of its contents, which changes the policies that apply to them. To delete a compartment, you must first empty it, and a deleted compartment is kept for ninety days. And after you create a compartment, nobody can use it, except administrators, until you write a policy for it.
Identity domains
Users and groups are managed in an identity domain. An identity domain is a container for your users, groups, and roles, with its own settings for single sign-on, federation with other identity providers, and multi-factor authentication. Every tenancy has a Default identity domain, and you can create more, for example to keep employees apart from partners or customers. In a policy, a group of the Default domain is written by its name alone, while a group of another domain is prefixed by the name of that domain.
The home region
Your tenancy's home region is the region where your IAM resources reside. IAM resources are global: users, groups, compartments, and policies are available in every region that your tenancy uses. But you must make changes to them in the home region, and OCI copies those changes to the other regions automatically. So choose the home region carefully when you sign up, because it cannot be changed afterward.
Recap
Let's recap. IAM controls who can access your resources, and what they can do: authentication, then authorization. A compartment is a collection of related resources, inside the root compartment, which is your tenancy. Compartments are global, can be nested six levels deep, and pass their policies down to their children. An identity domain holds users, groups, and their sign-on settings, starting with the Default domain. And IAM resources are global, but you change them in the home region, which you choose once.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Kettlebrook wants its network team to manage the networks, and its developers to manage only their test servers, inside one tenancy. What should it set up first?
- A separate tenancy for each team
- A separate region for each team
- A separate fault domain for each team
- Compartments for networks and test servers
Show the answer
Compartments for networks and test servers
Compartments isolate resources, so that policies can give each team access to its own compartment only. “A separate tenancy for each team” would split the company into several accounts, with more administration, when compartments do the job inside one tenancy. “A separate region for each team” would only spread resources across places, and a region does not limit access. And “A separate fault domain for each team” is about hardware placement inside an availability domain, not about access.
Kettlebrook wants the freelance trainers of its partner network to sign in with their own sign-on rules, kept apart from those of its employees. What fits best?
- A separate identity domain for the trainers
- A separate compartment for the trainers
- A separate region for the trainers
- A second home region for the trainers
Show the answer
A separate identity domain for the trainers
An identity domain has its own users, groups, and sign-on settings, so the trainers can be managed apart from the employees. “A separate compartment for the trainers” would organize resources, but users and their sign-on rules are not managed in compartments. “A separate region for the trainers” would only move resources to another place, and IAM resources are global anyway. And “A second home region for the trainers” is impossible, because a tenancy has a single home region.
Kettlebrook’s home region is Frankfurt, and it also uses the Ashburn region. Where are its users, groups, and policies available?
- Only in Frankfurt, its home region
- Only in Ashburn, where it runs servers
- In every region that the tenancy uses
- In every region of every realm
Show the answer
In every region that the tenancy uses
IAM resources are global, so they are available in every region that the tenancy uses, even though they are changed in the home region. “Only in Frankfurt, its home region” is where the changes are made, not the only place where the resources work. “Only in Ashburn, where it runs servers” leaves out the home region itself. And “In every region of every realm” goes too far, because a tenancy exists in one realm, and uses only its regions.