对 Access Approval 进行身份验证
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本文档介绍了如何以程序化方式向 Access Approval 进行身份验证。如何向 Access Approval 进行身份验证取决于您用于访问 API 的界面以及运行代码的环境。
如需详细了解 Google Cloud 身份验证,请参阅身份验证方法。
API 访问权限
访问权限审批支持程序化访问。您可以通过以下方式访问 API:
Google Cloud CLI
使用 gcloud CLI 访问“访问权限审批”时,您需要使用用户账号登录 gcloud CLI,该账号会提供 gcloud CLI 命令使用的凭据。
如果您的组织的安全政策阻止用户账号获取所需的权限,您可以使用服务账号模拟。
如需了解详情,请参阅使用 gcloud CLI 时进行身份验证。如需详细了解如何将 gcloud CLI 与访问权限审批搭配使用,请参阅 gcloud CLI 参考页面。
REST
您可以使用 gcloud CLI 凭据或使用应用默认凭据向 Access Approval API 进行身份验证。如需详细了解 REST 请求身份验证,请参阅使用 REST 时进行身份验证。如需了解凭据类型,请参阅 gcloud CLI 凭据和 ADC 凭据。
对“Access Approvals”的访问权限控制
向 Access Approval 进行身份验证后,您必须有权访问 Google Cloud 资源。访问权限审批使用 Identity and Access Management (IAM) 进行授权。
如需详细了解“访问权限审批”的角色,请参阅使用 IAM 进行访问权限控制。
如需详细了解 IAM 和授权,请参阅 IAM 概览。
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-10。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-10。"],[[["Access Approval can be accessed programmatically through the Google Cloud CLI or REST."],["Authentication to Access Approval depends on the interface used (gcloud CLI or REST) and the environment in which the code is running."],["The gcloud CLI uses user account credentials by default, but supports service account impersonation for stricter security requirements."],["REST API access can use either gcloud CLI credentials or Application Default Credentials for authentication."],["After authenticating, users must be authorized to access Google Cloud resources via Identity and Access Management (IAM)."]]],[]]