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

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

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

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

‫AlloyDB תומך בשני אילוצים של מדיניות הארגון שעוזרים להבטיח הגנה באמצעות CMEK בכל הארגון:

  • ‫constraints/gcp.restrictNonCmekServices: נדרשת הגנה באמצעות CMEK עבור alloydb.googleapis.com. כשמוסיפים את האילוץ הזה ואת alloydb.googleapis.com לרשימת השירותים של מדיניות Deny,‏ AlloyDB לא מאפשר ליצור אשכול חדש או גיבוי אלא אם הם מופעלים באמצעות CMEK.
  • ‫constraints/gcp.restrictCmekCryptoKeyProjects: מגביל את השימוש במפתחות Cloud KMS CryptoKey להגנה באמצעות 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 & Admin, מוסיפים את התפקיד Organization Policy Administrator ‏(roles/orgpolicy.policyAdmin) לחשבון המשתמש או לחשבון השירות.

    כניסה לדף IAM accounts

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

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

  1. עוברים לדף מדיניות ארגונית.

    מעבר לדף 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. בקטע סוגי מדיניות, בוחרים באפשרות דחייה.
    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. בקטע ערכים מותאמים אישית, מזינים את המשאב בפורמט הבא: under:organizations/ORGANIZATION_ID, under:folders/FOLDER_ID או projects/PROJECT_ID.

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

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

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