Membuat dan mengelola profil keamanan pencegatan kustom

Halaman ini menjelaskan cara membuat dan mengelola profil keamanan pencegat kustom.

Sebelum memulai

Peran

Untuk membuat, melihat, memperbarui, atau menghapus profil keamanan pencegatan kustom, minta administrator Anda untuk memberi Anda peran IAM yang diperlukan di organisasi Anda. Untuk mengetahui informasi selengkapnya tentang cara memberikan peran, lihat Mengelola akses ke project, folder, dan organisasi.

Untuk memeriksa progres operasi yang tercantum di halaman ini, pastikan peran pengguna Anda memiliki izin Compute Network User role (roles/compute.networkUser) berikut:

  • networksecurity.operations.get
  • networksecurity.operations.list

Membuat profil keamanan pencegatan kustom

Untuk integrasi dalam band, Anda hanya dapat membuat profil keamanan jenis custom-intercept.

Konsol

  1. Di konsol Google Cloud , buka halaman Security profiles.

    Buka Profil keamanan

  2. Dari pemilih project, pilih organisasi Anda.

  3. Di tab Security profiles, klik Create profile.

  4. Untuk Name, masukkan nama.

  5. Untuk Security profile purpose, pilih NSI in-band.

  6. Untuk Project, pilih project yang menghosting grup endpoint pencegat.

  7. Untuk Intercept endpoint group, pilih grup endpoint pencegat.

  8. Klik Create.

gcloud

Untuk membuat profil keamanan pencegatan kustom untuk integrasi dalam band, gunakan perintah gcloud network-security security-profiles custom-intercept create:

gcloud network-security security-profiles custom-intercept create CUSTOM_INTERCEPT_PROFILE_ID \
    --organization ORGANIZATION_ID \
    --location global \
    --billing-project BILLING_PROJECT_ID \
    --intercept-endpoint-group \
        projects/ENDPOINT_GROUP_PROJECT_ID/locations/global/interceptEndpointGroups/ENDPOINT_GROUP_ID

Ganti kode berikut:

  • CUSTOM_INTERCEPT_PROFILE_ID: ID profil keamanan pencegat kustom.
  • ORGANIZATION_ID: organisasi tempat Anda ingin membuat profil keamanan pencegat kustom.
  • BILLING_PROJECT_ID: project ID yang akan digunakan untuk kuota.
  • ENDPOINT_GROUP_PROJECT_ID: project ID tempat Anda membuat grup endpoint pencegat.
  • ENDPOINT_GROUP_ID: ID grup endpoint.

Terraform

Untuk membuat profil keamanan, Anda dapat menggunakan resource google_network_security_security_profile.

resource "google_network_security_security_profile" "default" {
  name     = "security-profile"
  type     = "CUSTOM_INTERCEPT"
  parent   = "organizations/${data.google_organization.default.org_id}"
  location = "global"

  custom_intercept_profile {
    intercept_endpoint_group = google_network_security_intercept_endpoint_group.default.id
  }
}

Untuk mempelajari cara menerapkan atau menghapus konfigurasi Terraform, lihat Perintah dasar Terraform.

Melihat detail profil keamanan pencegat kustom

Anda dapat melihat detail profil keamanan pencegatan kustom, seperti nama dan ID grup endpoint-nya.

Konsol

  1. Di konsol Google Cloud , buka halaman Security profiles.

    Buka Profil keamanan

  2. Dari pemilih project, pilih organisasi Anda.

  3. Di tab Profil keamanan, klik nama profil keamanan.

gcloud

Untuk melihat detail profil keamanan pencegatan kustom, gunakan perintah gcloud network-security security-profiles custom-intercept describe:

gcloud network-security security-profiles custom-intercept describe CUSTOM_INTERCEPT_PROFILE_ID \
    --billing-project BILLING_PROJECT_ID \
    --location global

Ganti kode berikut:

  • CUSTOM_INTERCEPT_PROFILE_ID: ID profil keamanan pencegat kustom.

  • BILLING_PROJECT_ID: project ID yang akan digunakan untuk kuota.

Dalam output, nama profil keamanan pencegat kustom ditampilkan dalam format organizations/ORGANIZATION_ID/locations/global/securityProfiles/SECURITY_PROFILE_ID.

Mencantumkan profil keamanan pencegatan kustom

Anda dapat mencantumkan semua profil keamanan pencegat kustom dalam organisasi, termasuk ID-nya.

Konsol

  1. Di konsol Google Cloud , buka halaman Security profiles.

    Buka Profil keamanan

  2. Dari pemilih project, pilih organisasi Anda.

  3. Di tab Profil keamanan, lihat semua profil keamanan project.

gcloud

Untuk mencantumkan semua profil keamanan pencegatan kustom, gunakan perintah gcloud network-security security-profiles custom-intercept list:

gcloud network-security security-profiles custom-intercept list \
    --organization ORGANIZATION_ID \
    --location global \
    --billing-project BILLING_PROJECT_ID

Ganti kode berikut:

  • ORGANIZATION_ID: ID organisasi tempat profil keamanan pencegat kustom dibuat.

  • BILLING_PROJECT_ID: project ID yang akan digunakan untuk kuota.

Menghapus profil keamanan pencegat kustom

Anda dapat menghapus profil keamanan pencegat kustom dengan menentukan nama dan organisasinya. Sebelum menghapus profil keamanan, pastikan profil tersebut tidak digunakan oleh grup profil keamanan.

Konsol

  1. Di konsol Google Cloud , buka halaman Security profiles.

    Buka Profil keamanan

  2. Dari pemilih project, pilih organisasi Anda.

  3. Di tab Security profiles, centang kotak profil keamanan, lalu klik Delete.

  4. Klik Delete lagi untuk mengonfirmasi.

gcloud

Untuk menghapus profil keamanan pencegatan kustom, gunakan perintah gcloud network-security security-profiles custom-profile delete:

gcloud network-security security-profiles custom-profile delete CUSTOM_INTERCEPT_PROFILE_ID \
    --organization ORGANIZATION_ID \
    --location global \
    [--billing-project BILLING_PROJECT_ID]

Ganti kode berikut:

  • CUSTOM_INTERCEPT_PROFILE_ID: ID profil keamanan intersep yang ingin Anda hapus.
  • ORGANIZATION_ID: organisasi tempat profil keamanan intersep dibuat.
  • BILLING_PROJECT_ID: project ID yang akan digunakan untuk kuota.

Langkah berikutnya