IBM Cloud Docs
Defining IAM access policies for Container Registry

Defining IAM access policies for Container Registry

As an administrator, you can define IBM Cloud® Identity and Access Management (IAM) access policies to create different levels of access for different users in IBM Cloud® Container Registry. For example, you can authorize some users to view quotas and other users to set quotas.

You must define IAM access policiesA method for granting users, service IDs, and access groups access to account resources. An access policy includes a subject, target, and role. for every user that works with IBM Cloud Container Registry. The scope of an IAM access policy is based on the user's role or roles that determine the actions that they are allowed to do. Some roles are predefined, but custom roles can be defined.

To find out more about IAM access policies, see IBM Cloud IAM roles.

You can assign Container Registry namespaces to a resource group and scope access policies to that group, see Planning namespaces. However, you can still define access policies that are scoped to individual Container Registry namespaces or to all namespaces that are owned by the account.

Creating policies

Before you begin, complete the following tasks:

  • Decide on the roles that each user needs and on which resources in IBM Cloud Container Registry, see IAM roles. You can create multiple policies, for example, you can grant write access on a resource but grant read access only on another resource. Policies are additive, which means that a global read policy and a resource-scoped write policy grants both read and write access on that resource.

  • Invite users to an account.

    If you want users to create clusters in IBM Cloud Kubernetes Service, ensure that you assign the IBM Cloud Container Registry Administrator role to those users, and don't assign a resource group. For more information, see Preparing your account to create clusters.

To create policies for IBM Cloud Container Registry, the service name field must be container-registry.

If you want to access resources, you must assign roles to users or service IDs. If you want to grant access to everything, don't specify a resource type or a resource. If you want to grant access to a specific namespace, specify the resource type as namespace and use the namespace name as the resource.

For an example of useful access policies for IBM Cloud Container Registry, see Granting access to Container Registry resources tutorial.