Workload: Generate service account JSON key¶
Overview¶
Generate key to applied for component of other service to authentication using service account
Methodlogy¶
Flow:
flowchart LR
%% Component
maintainer[Maintainer Developers] -- authentication and use gcloud CLI --> sa_json_key[Service Account JSON key]
maintainer -- get content and sync by manual or API Rest --> targeted_service[Targeted Service] Permissions:
For this workload, required roles/iam.serviceAccountKeyAdmin on the domain email.
Command:
declare SA_NAME=service-account-name
declare KEY_FILE=temp/$SA_NAME.json
declare PROJECT_ID=cloud-project-id
gcloud iam service-accounts keys create $KEY_FILE --iam-account=$SA_NAME@$PROJECT_ID.iam.gserviceaccount.com