Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment gérer le contrôle des accès dans le registre Harbor-as-a-Service tout en respectant le principe du moindre privilège. Les administrateurs IAM de l'organisation de l'appliance Google Distributed Cloud (GDC) isolée contrôlent qui peut être authentifié et autorisé à utiliser les API Harbor-as-a-Service. Pour autoriser les API et l'accès dans une instance Harbor, utilisez le contrôle des accès basé sur les rôles intégré à Harbor dans chaque projet Harbor. Pour en savoir plus, consultez https://goharbor.io/docs/2.8.0/administration/managing-users/.
Configurer l'accès aux API Harbor-as-a-Service
Chaque API GDC Harbor-as-a-Service exige que le principal effectuant la requête dispose des autorisations requises pour utiliser la ressource d'API. Les autorisations sont accordées aux comptes principaux en définissant des stratégies qui leur attribuent un rôle prédéfini sur la ressource.
Rôles prédéfinis Harbor-as-a-Service
Harbor-as-a-Service fournit des rôles prédéfinis qui accordent l'accès aux ressources d'API associées et empêchent les accès non autorisés aux autres ressources.
Utilisez les rôles prédéfinis suivants pour gérer les ressources d'instance Harbor et créer des ressources de projet Harbor :
Lecteur d'instances Harbor : affiche et obtient l'instance Harbor. Demandez à votre administrateur IAM de l'organisation de vous attribuer le rôle Lecteur d'instance Harbor (harbor-instance-viewer).
Administrateur d'instance Harbor : crée et gère l'instance Harbor, et crée des projets Harbor dans l'instance Harbor. Demandez à votre administrateur IAM de l'organisation de vous attribuer le rôle Administrateur d'instance Harbor (harbor-instance-admin).
Créateur de projet Harbor : crée des projets Harbor dans l'instance Harbor.
Demandez à votre administrateur IAM de l'organisation de vous accorder le rôle Créateur de projets Harbor (harbor-project-creator).
Configurer l'accès aux API et dans une instance Harbor
Dans une instance Harbor, utilisez le contrôle des accès basé sur les rôles intégré à Harbor dans chaque projet Harbor pour contrôler qui est autorisé à utiliser les API et à accéder aux ressources du projet Harbor. Pour en savoir plus, consultez https://goharbor.io/docs/2.8.0/administration/managing-users/.
L'utilisateur qui crée le projet Harbor se voit automatiquement attribuer le rôle ProjectAdmin pour ce projet. L'utilisateur ProjectAdmin peut attribuer des rôles pour le projet Harbor à d'autres utilisateurs. Pour consulter tous les rôles disponibles, accédez à https://goharbor.io/docs/2.8.0/administration/managing-users/user-permissions-by-role/.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[],[],null,["# Configure access control\n\nThis page describes how to manage access control in the Harbor-as-a-Service\nregistry while adhering to the principles of least privilege. Google Distributed Cloud (GDC) air-gapped appliance Organization IAM Administrators control who can be\nauthenticated and authorized to use Harbor-as-a-Service APIs. For authorizing\nAPIs and access in a Harbor instance, use\nHarbor's built-in role-based access control\nin each Harbor project. For more information, see \u003chttps://goharbor.io/docs/2.8.0/administration/managing-users/\u003e.\n\nConfigure access for Harbor-as-a-Service APIs\n---------------------------------------------\n\nEvery GDC Harbor-as-a-Service API requires that the principal making the\nrequest has the required permissions to use the API resource. Permissions are\ngiven to principals by setting policies that grant the principal a predefined\nrole on the resource.\n\n### Predefined Harbor-as-a-Service roles\n\nHarbor-as-a-Service provides predefined roles that grant access to related API\nresources and prevent unauthorized access to other resources.\n\nUse the following predefined roles for managing the Harbor Instance resources\nand creating Harbor Project resources:\n\n- Harbor Instance Viewer: views and gets the Harbor instance. Ask your Organization IAM Admin to grant you the Harbor Instance Viewer (`harbor-instance-viewer`) role.\n- Harbor Instance Admin: creates and manages the Harbor instance, and creates Harbor projects in the Harbor instance. Ask your Organization IAM Admin to grant you the Harbor Instance Admin (`harbor-instance-admin`) role.\n- Harbor Project Creator: creates Harbor projects in the Harbor instance. Ask your Organization IAM Admin to grant you the Harbor Project Creator (`harbor-project-creator`) role.\n\nConfigure access for APIs and within a Harbor instance\n------------------------------------------------------\n\nWithin a Harbor instance, use Harbor's built-in role-based access control in\neach Harbor project to control who is authorized to use the APIs and access\nresources in the Harbor project. For more information, see\n\u003chttps://goharbor.io/docs/2.8.0/administration/managing-users/\u003e.\n\nThe user that creates the Harbor project is automatically assigned the\n`ProjectAdmin` role for the Harbor project. The `ProjectAdmin` user can assign\nroles for the Harbor project to other users. For all of the available roles, see\n\u003chttps://goharbor.io/docs/2.8.0/administration/managing-users/user-permissions-by-role/\u003e."]]