|
| 1 | +--- |
| 2 | +title: 'Configure access control using OVHcloud IAM on an OVHcloud Managed Private Registry' |
| 3 | +excerpt: 'Learn how to enable and manage OVHcloud IAM authentication to control access to your Managed Private Registry (MPR) using centralized identities and roles.' |
| 4 | +updated: 2025-09-10 |
| 5 | +--- |
| 6 | + |
| 7 | +<style> |
| 8 | +details>summary { |
| 9 | + color:rgb(33, 153, 232) !important; |
| 10 | + cursor: pointer; |
| 11 | +} |
| 12 | +details>summary::before { |
| 13 | + content:'\25B6'; |
| 14 | + padding-right:1ch; |
| 15 | +} |
| 16 | +details[open]>summary::before { |
| 17 | + content:'\25BC'; |
| 18 | +} |
| 19 | +</style> |
| 20 | + |
| 21 | +## Objective |
| 22 | + |
| 23 | +OVHcloud Managed Private Registry (MPR) supports authentication through OVHcloud IAM, allowing you to manage access using centralized user identities and roles. |
| 24 | + |
| 25 | +This guide explains how to enable IAM authentication and control user access to your registry using OVHcloud IAM users and roles. |
| 26 | + |
| 27 | +## Requirements |
| 28 | + |
| 29 | +- An OVHcloud Managed Private Registry (see the [creating a private registry](/pages/public_cloud/containers_orchestration/managed_private_registry/creating-a-private-registry) guide for more information). |
| 30 | +- An access to the Harbor UI to operate the private registry (see the [connecting to the UI](/pages/public_cloud/containers_orchestration/managed_private_registry/connecting-to-the-ui) guide for more information). |
| 31 | + |
| 32 | +## Instructions |
| 33 | + |
| 34 | +### Introduction to OVHcloud IAM |
| 35 | + |
| 36 | +OVHcloud IAM (Identity and Access Management) is a centralized system that lets you manage who can access your OVHcloud services and what they are allowed to do. It provides fine-grained access control through users, groups and roles. |
| 37 | + |
| 38 | +When used with Managed Private Registry (MPR), OVHcloud IAM replaces Harbor’s local user database. This enables you to: |
| 39 | + |
| 40 | +- use SSO (Single Sign-On) with your OVHcloud credentials to access Harbor. |
| 41 | +- assign predefined IAM roles (admin, standard) to control access levels. |
| 42 | +- manage permissions at scale using IAM groups and projects. |
| 43 | + |
| 44 | +By integrating IAM with your registry, you ensure consistent access control across your OVHcloud services — reducing manual management and improving security. |
| 45 | + |
| 46 | +### Activate/disable authentication via OVHcloud IAM |
| 47 | + |
| 48 | +> [!warning] |
| 49 | +> |
| 50 | +> When you enable OVHcloud IAM authentication on your Managed Private Registry: |
| 51 | +> |
| 52 | +> - all existing Harbor users will be removed. |
| 53 | +> - existing robot accounts remain functional. |
| 54 | +> - new robot accounts can still be created and managed. |
| 55 | +> |
| 56 | +> From this point on, all users access are managed through OVHcloud IAM roles and policies. |
| 57 | +> |
| 58 | +
|
| 59 | +> [!tabs] |
| 60 | +> Via the OVHcloud Control Panel |
| 61 | +>> Log in to the [OVHcloud Control Panel](/links/manager), navigate to the `Public Cloud`{.action} section, and select the relevant project. Then, in the left-hand menu under **Containers & Orchestration**, click on `Managed Private Registry`{.action}. |
| 62 | +>> |
| 63 | +>> In the list of registries, click the `...`{.action} button for the relevant registry, then select: |
| 64 | +>> |
| 65 | +>> - `Activate authentication via OVHcloud IAM`{.action} to enable it. |
| 66 | +>> |
| 67 | +>> {.thumbnail} |
| 68 | +>> |
| 69 | +>> - `Disable authentication via OVHcloud IAM`{.action} to disable it. |
| 70 | +>> |
| 71 | +>> {.thumbnail} |
| 72 | +>> |
| 73 | +> Via the OVHcloud API |
| 74 | +>> /// details | Enable IAM authentication |
| 75 | +>> |
| 76 | +>> > [!api] |
| 77 | +>> > |
| 78 | +>> > @api {v1} /cloud POST /cloud/project/{serviceName}/containerRegistry/{registryID}/iam |
| 79 | +>> > |
| 80 | +>> |
| 81 | +>> /// |
| 82 | +>> |
| 83 | +>> /// details | Disable IAM authentication |
| 84 | +>> |
| 85 | +>> > [!api] |
| 86 | +>> > |
| 87 | +>> > @api {v1} /cloud DELETE /cloud/project/{serviceName}/containerRegistry/{registryID}/iam |
| 88 | +>> > |
| 89 | +>> |
| 90 | +>> /// |
| 91 | +>> |
| 92 | +>> Replace: |
| 93 | +>> |
| 94 | +>> - `serviceName` with the ID of your Public Cloud project. |
| 95 | +>> - `registryID` with the ID of the Managed Private Registry. |
| 96 | +>> |
| 97 | +>> You can retrieve the `registryID` in two ways: |
| 98 | +>> |
| 99 | +>> - **Via API:** |
| 100 | +>> |
| 101 | +>> > [!api] |
| 102 | +>> > |
| 103 | +>> > @api {v1} /cloud GET /cloud/project/{serviceName}/containerRegistry |
| 104 | +>> > |
| 105 | +>> |
| 106 | +>> - **Via the OVHcloud Control Panel:** |
| 107 | +>> |
| 108 | +>> Log in to the [OVHcloud Control Panel](/links/manager), navigate to the `Public Cloud`{.action} section, and select the relevant project. Then, in the left-hand menu under **Containers & Orchestration**, click on `Managed Private Registry`{.action}. |
| 109 | +>> |
| 110 | +
|
| 111 | + |
| 112 | +### Authentication using SSO with OVHcloud IAM users |
| 113 | + |
| 114 | +Once IAM authentication is enabled, access to the Harbor UI is handled via OVHcloud Single Sign-On (SSO). Users no longer log in with Harbor-local credentials but authenticate directly using their OVHcloud IAM identity. |
| 115 | + |
| 116 | +To log in via SSO: |
| 117 | + |
| 118 | +- Open the `Harbor user interface`{.action} from the Control Panel. |
| 119 | + |
| 120 | +{.thumbnail} |
| 121 | + |
| 122 | +- You will be redirected to the OVHcloud authentication page, log in using your OVHcloud IAM credentials. |
| 123 | + |
| 124 | +{.thumbnail} |
| 125 | + |
| 126 | +- Access to Harbor is granted based on the IAM role associated with your user account. |
| 127 | + |
| 128 | +> [!primary] |
| 129 | +> |
| 130 | +> Only users with the appropriate IAM role (admin or standard) can access the registry after IAM authentication is enabled. |
| 131 | +> |
| 132 | +
|
| 133 | +### Managing access rights with OVHcloud IAM |
| 134 | + |
| 135 | +OVHcloud IAM provides two predefined roles for managing access to your Managed Private Registry (MPR): |
| 136 | + |
| 137 | +- Standard |
| 138 | +- Admin |
| 139 | + |
| 140 | +> [!primary] |
| 141 | +> |
| 142 | +> **Admin** role: Regardless of the user group defined in the Identities section, assigning the Admin role will grant full administrative privileges on the selected registry. |
| 143 | +> |
| 144 | +> **Standard** role: Be aware that users belonging to the Default group in the Identities section automatically inherit admin privileges on the registry. Assigning them the Standard role will not override these inherited rights. To ensure proper separation of roles, we recommend: |
| 145 | +> |
| 146 | +> - Organizing users into clearly defined groups. |
| 147 | +> - After changing a user’s group and assigning the Standard role, fine-tune their permissions directly in Harbor for better control and consistency. See the different roles in Harbor [here](https://goharbor.io/docs/1.10/administration/managing-users/user-permissions-by-role/){.external}. |
| 148 | +> |
| 149 | +
|
| 150 | +These roles are assigned through IAM policies. To create and configure a policy, log in to the [OVHcloud Control Panel](/links/manager) and navigate to the `Identity, Security & Operations`{.action} section. Then, in the left-hand menu under **Identity and Access management**, click on `Policies`{.action} and click the `Create a policy`{.action} button. |
| 151 | + |
| 152 | +{.thumbnail} |
| 153 | + |
| 154 | +Define users and groups, name your policy, add the users you want to include and optionally, add user groups if they have already been created. |
| 155 | + |
| 156 | +{.thumbnail width="700"} |
| 157 | + |
| 158 | +Set permissions for MPR: |
| 159 | + |
| 160 | +- In the `Product types` section, select `Public Cloud Project/Managed Registry`. |
| 161 | +- In the `Resources` section, choose the specific MPR instance to which the policy will apply. |
| 162 | + |
| 163 | +{.thumbnail} |
| 164 | + |
| 165 | +Expand `Public Cloud Project/Managed Registry` and select the desired role for the users defined in the policy. |
| 166 | + |
| 167 | +{.thumbnail width="700"} |
| 168 | + |
| 169 | +### Go further |
| 170 | + |
| 171 | +To go further you can look at our guides on: |
| 172 | + |
| 173 | +- [Managing users and projects](/pages/public_cloud/containers_orchestration/managed_private_registry/managing-users-and-projects). |
| 174 | +- [Creating and using a private image](/pages/public_cloud/containers_orchestration/managed_private_registry/creating-and-using-a-private-image). |
0 commit comments