שימוש במדיניות ארגונית שהוגדרה מראש

כדי לאכוף דרישות הצפנה ברמת הארגון על אשכולות וגיבויים של AlloyDB ל-PostgreSQL, אתם יכולים להחיל אילוצים מוגדרים מראש של מדיניות הארגון ברמת הפרויקט, התיקייה או הארגון.

מדיניות הארגון בנושא מפתחות הצפנה בניהול הלקוח (CMEK)

אתם יכולים להשתמש במדיניות הארגון ל-CMEK כדי לשלוט בהגדרות ה-CMEK של האשכולות והגיבויים ב-AlloyDB. המדיניות הזו מאפשרת לכם לשלוט במפתחות של Cloud Key Management Service (Cloud KMS) שמשמשים להגנה על הנתונים שלכם.

ב-AlloyDB יש שני אילוצים של מדיניות הארגון שעוזרים לאכוף את ההגנה באמצעות CMEK בארגון:

  • ‫constraints/gcp.restrictNonCmekServices: נדרשת הגנה באמצעות CMEK לשירות alloydb.googleapis.com. כשמוסיפים את האילוץ הזה ומוסיפים את alloydb.googleapis.com לרשימת השירותים של מדיניות Deny, המערכת של AlloyDB לא יוצרת אשכול חדש או גיבוי חדש, אלא אם הם מופעלים באמצעות CMEK.

  • ‫constraints/gcp.restrictCmekCryptoKeyProjects: מגבילה את מפתחות ההצפנה של Cloud KMS שאפשר להשתמש בהם להגנה באמצעות CMEK באשכולות ובגיבויים של AlloyDB. עם האילוץ הזה, כשיוצרים ב-AlloyDB אשכול חדש או גיבוי עם CMEK, מפתח ה-CryptoKey צריך להגיע מפרויקט, מתיקייה או מארגון מורשים.

האילוצים האלה נאכפים רק על אשכולות וגיבויים חדשים שנוצרו ב-AlloyDB.

לסקירה כללית, ראו מדיניות הארגון לגבי CMEK. למידע נוסף על אילוצים של מדיניות הארגון לגבי CMEK, ראו אילוצים של מדיניות הארגון.

לפני שמתחילים

  1. נכנסים לחשבון Google Cloud . אנחנו ממליצים למשתמשים חדשים ב- Google Cloud ליצור חשבון כדי שיוכלו להעריך את הביצועים של המוצרים שלנו בתרחישים מהעולם האמיתי. לקוחות חדשים מקבלים בחינם גם קרדיט בשווי 300$ להרצה, לבדיקה ולפריסה של עומסי העבודה.
  2. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Install the Google Cloud CLI.

  5. If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

  6. To initialize the gcloud CLI, run the following command:

    gcloud init
  7. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  8. Verify that billing is enabled for your Google Cloud project.

  9. Install the Google Cloud CLI.

  10. If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

  11. To initialize the gcloud CLI, run the following command:

    gcloud init
  12. בדף IAM וניהול, מוסיפים לחשבון המשתמש או לחשבון השירות את התפקיד אדמין של מדיניות הארגון (roles/orgpolicy.policyAdmin).

    כניסה לדף IAM accounts

הוספת מדיניות הארגון ל-CMEK

כדי להוסיף מדיניות ארגון לגבי CMEK, צריך לבצע את השלבים הבאים:

  1. נכנסים לדף Organization policies.

    כניסה לדף Organization policies

  2. לוחצים על התפריט הנפתח בסרגל התפריטים של מסוף Google Cloud , ובוחרים את הפרויקט, התיקייה או הארגון שבהם רוצים להגדיר את מדיניות הארגון. בדף Organization policies מוצגת רשימה של אילוצים זמינים במדיניות הארגון.

  3. כדי להגדיר את constraints/gcp.restrictNonCmekServices, פועלים לפי השלבים הבאים:

    1. מסננים לפי האילוץ באמצעות ID: constraints/gcp.restrictNonCmekServices או Name: Restrict which services may create resources without CMEK.
    2. לוחצים על Name של האילוץ.
    3. לוחצים על Edit.
    4. לוחצים על התאמה אישית.
    5. לוחצים על הוספת כלל.
    6. בקטע ערכי מדיניות, לוחצים על בהתאמה אישית.
    7. בקטע Policy types (סוגי מדיניות), בוחרים באפשרות Deny (דחייה).
    8. בקטע ערכים מותאמים אישית, מזינים את alloydb.googleapis.com. ההגדרה הזו אוכפת את השימוש ב-CMEK כשיוצרים אשכולות וגיבויים של AlloyDB.
  4. כדי להגדיר את constraints/gcp.restrictCmekCryptoKeyProjects, פועלים לפי השלבים הבאים:

    1. מסננים לפי האילוץ ID: constraints/gcp.restrictCmekCryptoKeyProjects או Name: Restrict which projects may supply KMS CryptoKeys for CMEK.
    2. לוחצים על Name של האילוץ.
    3. לוחצים על Edit.
    4. לוחצים על התאמה אישית.
    5. לוחצים על הוספת כלל.
    6. בקטע ערכי מדיניות, לוחצים על בהתאמה אישית.
    7. בקטע סוגי מדיניות, בוחרים באפשרות אישור.
    8. בקטע Custom values, מזינים את המשאב בפורמט הבא: under:organizations/ORGANIZATION_ID, under:folders/FOLDER_ID או projects/PROJECT_ID.

      ההגדרה הזו מגבילה את אשכולות AlloyDB והגיבויים לשימוש במפתחות Cloud KMS רק מהפרויקט, התיקייה או הארגון המורשים.

  5. לוחצים על סיום ואז על שמירה.

המאמרים הבאים