Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Google Cloud bietet eine Identitäts- und Zugriffsverwaltung (Identity and Access Management, IAM), mit der Sie den Zugriff auf bestimmteGoogle Cloud -Ressourcen noch genauer steuern können. Außerdem wird der unerwünschte Zugriff auf andere Ressourcen verhindert. Auf dieser Seite werden die Rollen der Service Directory API beschrieben. Eine ausführliche Beschreibung von IAM finden Sie in der IAM-Dokumentation.
Mit IAM können Sie steuern, werwelche Berechtigungen für welche Ressourcen hat. Dazu legen Sie die IAM-Richtlinien fest. IAM-Richtlinien gewähren einem Nutzer bestimmte Rollen und dadurch bestimmte Berechtigungen.
Berechtigungen und Rollen
Der Aufrufer muss für jede Service Directory API-Methode die erforderlichen IAM-Berechtigungen haben. Sie können Berechtigungen zuweisen, indem Sie einem Nutzer, einer Gruppe oder einem Dienstkonto Rollen zuweisen. Zusätzlich zu den grundlegenden Rollen „Inhaber“, „Bearbeiter“ und „Betrachter“ können Sie den Nutzern Ihres Projekts Service Directory API-Rollen zuweisen.
Wählen Sie im oberen Drop-down-Menü Ihr Projekt aus.
Klicken Sie auf Add.
Geben Sie unter Neue Hauptkonten die E-Mail-Adresse eines neuen Hauptkontos ein.
Wählen Sie im Drop-down-Menü die gewünschte Rolle aus: servicedirectory.admin, servicedirectory.editor oder servicedirectory.viewer.
Klicken Sie auf Speichern.
Prüfen Sie, ob das Hauptkonto mit der Rolle aufgelistet wird, die Sie ihm zugewiesen haben.
Service Directory-Zonen überschreiben IAM-Einschränkungen
Wenn Sie einer Service Directory-Zone einen Namespace zuweisen, sind die Dienstnamen für alle Clients in allen Netzwerken sichtbar, die zur Abfrage der privaten Zone autorisiert sind. Es gibt keine IAM-Zugriffssteuerung für DNS, da das DNS-Protokoll keine Authentifizierungsfunktionen bietet.
Nächste Schritte
Mehr zur Identitäts- und Zugriffsverwaltung in der IAM-Dokumentation erfahren
Weitere Informationen zu Service Directory finden Sie in der Übersicht.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (UTC)."],[],[],null,["# Roles and permissions\n\nGoogle Cloud offers Identity and Access Management (IAM),\nwhich enables you to give more granular access to specific\nGoogle Cloud resources and prevents unwanted access to other\nresources. This page describes the Service Directory API roles. For a detailed\ndescription of IAM, read the [IAM documentation](/iam/docs).\n\nIAM enables you to adopt the\n[security principle of least privilege](https://wikipedia.org/wiki/Principle_of_least_privilege),\nso you grant only the necessary access to your resources.\n\nIAM enables you to control *who* has *what* permissions to\n*which* resources by setting IAM policies. IAM\npolicies grant specific roles to a user, giving the user certain\npermissions.\n\nPermissions and Roles\n---------------------\n\nEvery Service Directory API method requires the caller to have the necessary\nIAM permissions. You can assign permissions by granting roles to\na user, group, or service account. In addition to the basic Owner,\nEditor, and Viewer roles, you can grant Service Directory API roles to the users\nof your project.\n\n### Permissions\n\nYou can find out which permissions are required for each method in the\nService Directory\n[API reference documentation](/service-directory/docs/reference/rest).\n\n### Roles\n\nAccess Control using the Google Cloud console\n---------------------------------------------\n\nYou can use the Google Cloud console to manage access control for your\nregistry.\n\nTo set access controls at the project level: \n\n### Console\n\n1. In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/iam-admin/iam)\n2. Select your project from the top pull-down menu.\n\n3. Click **Add**.\n\n4. In **New principals**, enter the email address of a new principal.\n\n5. Select the desired role from the drop-down menu: `servicedirectory.admin`,\n `servicedirectory.editor`, or `servicedirectory.viewer`\n\n6. Click **Save**.\n\n7. Verify that the principal is listed with the role that you granted.\n\nService Directory zones override IAM restrictions\n-------------------------------------------------\n\nWhen assigning a namespace to a Service Directory zone, the service names\nbecome visible to all clients on any networks that are authorized to\nquery the private zone. There is no IAM access control for DNS as\nthe DNS protocol does not provide authentication capability.\n\nWhat's next\n-----------\n\n- See the [IAM documentation](/iam/docs) for details on Identity and Access Management\n- See the [Overview](/service-directory/docs/overview) for an understanding of Service Directory."]]