Bei der Zugriffsgenehmigung authentifizieren
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
In diesem Dokument wird die programmatische Authentifizierung bei Access Approval beschrieben. Wie Sie sich bei der Zugriffsberechtigung authentifizieren, hängt von der Schnittstelle ab, über die Sie auf die API zugreifen, und von der Umgebung, in der Ihr Code ausgeführt wird.
Weitere Informationen zur Google Cloud Authentifizierung finden Sie unter Authentifizierungsmethoden.
API-Zugriff
Die Zugriffsgenehmigung unterstützt den programmatischen Zugriff. Sie haben folgende Möglichkeiten, um auf die API zuzugreifen:
Google Cloud CLI
Wenn Sie die gcloud CLI verwenden, um auf die Zugriffsberechtigung zuzugreifen, melden Sie sich in der gcloud CLI mit einem Nutzerkonto an, das die von den gcloud CLI-Befehlen verwendeten Anmeldedaten bereitstellt.
Wenn die Sicherheitsrichtlinien Ihrer Organisation verhindern, dass Nutzerkonten die erforderlichen Berechtigungen haben, können Sie die Identitätsübernahme des Dienstkontos verwenden.
Weitere Informationen finden Sie unter Für die Verwendung der gcloud CLI authentifizieren.
Weitere Informationen zur Verwendung der gcloud CLI mit der Zugriffsberechtigung finden Sie auf den Referenzseiten zur gcloud CLI.
REST
Sie können sich bei der Access Approval API mithilfe Ihrer gcloud CLI-Anmeldedaten oder mithilfe der Standardanmeldedaten für Anwendungen authentifizieren.
Weitere Informationen zur Authentifizierung für REST-Anfragen finden Sie unter Für die Verwendung von REST authentifizieren.
Informationen zu den Arten von Anmeldedaten finden Sie unter gcloud CLI-Anmeldedaten und ADC-Anmeldedaten.
Zugriffssteuerung für Zugriffsgenehmigungen
Nach der Authentifizierung bei der Zugriffsgenehmigung müssen Sie berechtigt sein, auf Google Cloud -Ressourcen zuzugreifen. Die Zugriffsgenehmigung verwendet die Identitäts- und Zugriffsverwaltung (Identity and Access Management, IAM) für die Autorisierung.
Weitere Informationen zu den Rollen für die Zugriffsberechtigung finden Sie unter Zugriffssteuerung mit IAM.
Weitere Informationen zu IAM und Autorisierung finden Sie in der IAM-Übersicht.
Nächste Schritte
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-08-18 (UTC).
[[["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-08-18 (UTC)."],[[["\u003cp\u003eAccess Approval can be accessed programmatically through the Google Cloud CLI or REST.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication to Access Approval depends on the interface used (gcloud CLI or REST) and the environment in which the code is running.\u003c/p\u003e\n"],["\u003cp\u003eThe gcloud CLI uses user account credentials by default, but supports service account impersonation for stricter security requirements.\u003c/p\u003e\n"],["\u003cp\u003eREST API access can use either gcloud CLI credentials or Application Default Credentials for authentication.\u003c/p\u003e\n"],["\u003cp\u003eAfter authenticating, users must be authorized to access Google Cloud resources via Identity and Access Management (IAM).\u003c/p\u003e\n"]]],[],null,["# Authenticate to Access Approval\n\nThis document describes how to authenticate to Access Approval programmatically. How\nyou authenticate to Access Approval depends on the interface you use to access the API\nand the environment where your code is running.\n\n\nFor more information about Google Cloud authentication, see the\n[Authentication methods](/docs/authentication).\n\nAPI access\n----------\n\n\nAccess Approval supports programmatic access. You can access the API in\nthe following ways:\n\n- [Google Cloud CLI](#gcloud)\n- [REST](#rest)\n\n### Google Cloud CLI\n\n\nWhen you use the [gcloud CLI](/sdk/gcloud/reference/access-approval) to access\nAccess Approval, you\n[log in to the gcloud CLI](/sdk/docs/authorizing) with a user\naccount, which provides the credentials used by the gcloud CLI commands.\n\n\nIf your organization's security policies prevent user accounts from having the required\npermissions, you can use [service account impersonation](#sa-impersonation).\n\nFor more information, see\n[Authenticate for using the gcloud CLI](/docs/authentication/gcloud).\nFor more information about using the gcloud CLI with Access Approval,\nsee [the gcloud CLI reference pages](/sdk/gcloud/reference/access-approval).\n\n\n### REST\n\n\nYou can authenticate to\n[the Access Approval API](/assured-workloads/access-approval/docs/reference/rest)\nby using your gcloud CLI credentials or by using\n[Application Default Credentials](/docs/authentication/application-default-credentials).\nFor more information about authentication for REST requests, see\n[Authenticate for using REST](/docs/authentication/rest).\nFor information about the types of credentials, see\n[gcloud CLI credentials and ADC credentials](/docs/authentication/gcloud#gcloud-credentials).\n\nAccess control for Access Approval\n----------------------------------\n\n\nAfter you authenticate to Access Approval, you must be authorized to access\nGoogle Cloud resources. Access Approval uses\nIdentity and Access Management (IAM) for authorization.\n\n\nFor more information about the roles for Access Approval, see\n[Access control with IAM](/assured-workloads/access-approval/docs/access-control).\nFor more information about IAM and authorization, see\n[IAM overview](/iam/docs/overview).\n\nWhat's next\n-----------\n\n- Learn about [Google Cloud authentication methods](/docs/authentication#auth-decision-tree).\n- See a list of [authentication use cases](/docs/authentication/use-cases)."]]