Gemini Enterprise Agent Platform에서 Gemini를 사용하려면 Cloud de Confiance by S3NS API 키를 사용하거나 애플리케이션 기본 사용자 인증 정보를 사용하여 인증해야 합니다. 테스트에는 API 키를, 프로덕션에는 애플리케이션 기본 사용자 인증 정보를 사용하는 것이 좋습니다. 이 페이지에서는 애플리케이션 기본 사용자 인증 정보를 구성하는 방법을 보여줍니다.
시작하기 전에
프로젝트 선택, 결제 사용 설정, Agent Platform API 사용 설정, gcloud CLI 설치
-
In the Cloud de Confiance console, on the project selector page, select or create a Cloud de Confiance project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Cloud de Confiance project.
Enable the Agent Platform API, if it is not already enabled.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.-
Install the Google Cloud CLI.
-
Configure the gcloud CLI to use your federated identity.
For more information, see Sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
로컬 인증 사용자 인증 정보 만들기
콘솔
사용자 계정에 대한 로컬 인증 사용자 인증 정보를 만듭니다.
gcloud auth application-default login
인증 오류가 반환되면 제휴 ID로 gcloud CLI에 로그인했는지 확인합니다.
curl
다음 명령어를 실행하여 gcloud를 설치하고 실행하여 애플리케이션 기본 사용자 인증 정보를 설정합니다.
bash <(curl -sSL https://storage.googleapis.com/cloud-samples-data/adc/setup_adc.sh)첫 번째 API 요청 실행
애플리케이션 기본 사용자 인증 정보를 구성한 후 API 빠른 시작에서 첫 번째 요청을 실행하는 방법을 알아봅니다.