בקרת גישה באמצעות IAM

בדף הזה מוסבר על אפשרויות בקרת הגישה שזמינות לכם ב-Eventarc.

סקירה כללית

‫Eventarc משתמש בניהול זהויות והרשאות גישה (IAM) לצורך בקרת גישה.

בסעיפים הבאים מפורטות רשימות של ההרשאות והתפקידים ש-Eventarc תומך בהם.

סוכן שירות Eventarc

לחלק מה Google Cloud שירותים יש סוכני שירות שמאפשרים לשירות לגשת למשאבים שלכם אם ניתנות להם ההרשאות המתאימות. אם API מסוים דורש סוכן שירות, אז Google Cloud יוצר את סוכן השירות בשלב מסוים אחרי שמפעילים את ה-API ומשתמשים בו.

‫Eventarc משתמש במודל הקצאת משאבים שיוצר את סוכן השירות שלו רק כשצריך אותו בפעם הראשונה – למשל, כשיוצרים משאב Eventarc בפעם הראשונה – ולא כשמפעילים את ה-API בפעם הראשונה. יכולות לחלוף כמה דקות עד שהסוכן יוקצה ועד שהשינויים יתעדכנו במערכת. מידע נוסף על העיכוב הזה זמין במאמר ההרשאה נדחתה במהלך השימוש בסוכן השירות של Eventarc.

הפעלת ממשקי ה-API של Eventarc

כדי להציג ולהקצות תפקידי IAM ל-Eventarc, צריך להפעיל את ממשקי ה-API של Eventarc בפרויקט. לא תוכלו לראות את התפקידים של Eventarc במסוף עד שתפעילו את ממשקי ה-API. Google Cloud

המסוף

  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. Enable the Eventarc and Eventarc Publishing APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. 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.

    Enable the APIs

  5. 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

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

  7. Enable the Eventarc and Eventarc Publishing APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. 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.

    Enable the APIs

gcloud

  1. נכנסים לחשבון Google Cloud . אם אתם משתמשים חדשים ב- Google Cloud, צרו חשבון כדי שתוכלו להעריך את הביצועים של המוצרים שלנו בתרחישים מהעולם האמיתי. לקוחות חדשים מקבלים בחינם גם קרדיט בשווי 300$ להרצה, לבדיקה ולפריסה של עומסי העבודה.
  2. התקינו את ה-CLI של Google Cloud.

  3. אם אתם משתמשים בספק זהויות חיצוני (IdP), קודם אתם צריכים להיכנס ל-CLI של gcloud באמצעות המאגר המאוחד לניהול זהויות.

  4. כדי לאתחל את ה-CLI של gcloud, הריצו את הפקודה הבאה:

    gcloud init
  5. יוצרים או בוחרים Google Cloud פרויקט.

    תפקידים שנדרשים כדי לבחור או ליצור פרויקט

    • Select a project: כדי לבחור פרויקט לא צריך תפקיד IAM ספציפי – אפשר לבחור כל פרויקט שקיבלתם בו תפקיד.
    • יצירת פרויקט: כדי ליצור פרויקט, צריך את התפקיד Project Creator (יצירת פרויקטים) (roles/resourcemanager.projectCreator), שכולל את ההרשאה resourcemanager.projects.create. איך מקצים תפקידים
    • יוצרים Google Cloud פרויקט:

      gcloud projects create PROJECT_ID

      מחליפים את PROJECT_ID בשם של פרויקט Google Cloud שיוצרים.