Cara kerja identitas workload terkelola
Workload identity terkelola memberi workload Compute Engine dan GKE Anda identitas yang diattestasi, beserta sertifikat dan trust anchor yang digunakan workload untuk saling mengautentikasi melalui mutual TLS (mTLS). Workload identity terkelola dikelompokkan ke dalam workload identity pool, yang bertindak sebagai batas kepercayaan untuk identitas di dalamnya.
Saat Anda menautkan workload identity pool ke pool CA Service, Google Cloud akan otomatis menerbitkan dan memperpanjang sertifikat untuk workload Anda. Otomatisasi ini menghilangkan pengelolaan kredensial manual dan mencegah pemadaman layanan.
Sebelum memulai
- Login ke akun Google Cloud Anda. Jika Anda baru menggunakan Google Cloud, buat akun untuk mengevaluasi performa produk kami dalam skenario dunia nyata. Pelanggan baru juga mendapatkan kredit gratis senilai $300 untuk menjalankan, menguji, dan men-deploy workload.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud 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.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Compute Engine, Certificate Manager, Certificate Authority Service APIs, if any are 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.-
In the Google Cloud console, on the project selector page, select or create a Google Cloud 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.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Compute Engine, Certificate Manager, Certificate Authority Service APIs, if any are 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.- Pastikan Anda sudah memiliki workload identity pool dengan identitas workload terkelola. Untuk mengetahui informasi selengkapnya, lihat Mengonfigurasi autentikasi workload identity terkelola untuk Compute Engine atau Mengonfigurasi autentikasi workload identity terkelola untuk GKE.
- Pastikan Anda sudah memiliki pool CA Service yang dapat menerbitkan sertifikat ke workload Anda. Untuk mengetahui informasi selengkapnya, lihat Membuat kumpulan CA.
Peran yang diperlukan
Untuk mendapatkan izin yang Anda perlukan guna mengonfigurasi pengelolaan siklus proses, minta administrator untuk memberi Anda peran IAM berikut pada project Anda:
- Certificate Manager Editor (
roles/certificatemanager.editor) - CA Service Certificate Manager (
roles/privateca.certificateManager) - Admin Workload Identity Pool (
roles/iam.workloadIdentityPoolAdmin)
Untuk mengetahui informasi selengkapnya tentang pemberian peran, lihat Mengelola akses ke project, folder, dan organisasi.
Anda mungkin juga bisa mendapatkan izin yang diperlukan melalui peran khusus atau peran bawaan lainnya.
Mengonfigurasi siklus proses untuk workload terkelola
Konfigurasikan workload identity pool terkelola untuk menentukan cara workload terkait menerima dan memperpanjang sertifikat dari pool CA Service yang ada.
- Di konsol Google Cloud , buka halaman Certificate Manager (2nd gen).
- Di panel navigasi, klik Manage Lifecycle.
- Pilih tab Managed Workload Identity.
- Temukan workload identity pool yang ingin Anda konfigurasi, lalu klik Configure lifecycle management.
- Pilih Region dan CA pool untuk region tersebut.
- Di kolom Certificate lifetime, tentukan validitas sertifikat yang diterbitkan. Nilainya harus antara 21 dan 30 hari.
- Tetapkan Rotation window ke nilai antara 50 dan 80. Ini adalah persentase masa berlaku sertifikat yang memicu perpanjangan.
- Di kolom Key algorithm, pilih algoritma enkripsi yang akan digunakan untuk membuat kunci pribadi.
- Klik Update.
Langkah berikutnya
- Melihat inventaris sertifikat
- Membuat konfigurasi penerbitan
- Memantau sertifikat Anda
- Mengonfigurasi pengelolaan siklus proses untuk load balancer
- Membuat konfigurasi kepercayaan