ניהול הגישה לבדיקה של הזרקת תקלות

בדף הזה מוסבר איך להשתמש בניהול הזהויות והרשאות הגישה (IAM) כדי לנהל את הגישה לתכונות של בדיקות הזרקת תקלות.

אדמינים או בעלים של משאבי Google Cloudיכולים להעניק תפקידים והרשאות לבדיקת הזרקת תקלות.

האדמינים אחראים לוודא שלמשתמשים יש את הגישה שהם צריכים, ולא יותר מזה (העיקרון של הרשאות מינימליות). בדיקות הזרקת תקלות דורשות חשבונות כדי להגדיר ולהפעיל ניסויים, ולכן חשוב במיוחד להשתמש בהרשאות המינימליות הנדרשות – ניסויים של תקלות עלולים לגרום להפסקות לא צפויות אם הם מופעלים במשאבים לא נכונים, או על ידי משתמשים לא מורשים או לא מיומנים.

הפעלת ממשקי ה-API לבדיקה של הזרקת תקלות

כדי להפעיל את Fault Injection Testing API בפרויקט:

  1. נכנסים לדף API Library של Google Cloud console.
  2. מחפשים את faulttesting ובוחרים באפשרות Fault Testing API.
  3. לוחצים על הכפתור הפעלה.

מופיעה תיבת דו-שיח שבה מוצגת ההתקדמות בהפעלת ה-API.

הגדרת ההרשאות הנדרשות

בדיקה של הזרקת תקלות מספקת את התפקידים הבאים:

שם התפקיד

תיאור

הרשאות

roles/faulttesting.operator

בדיקת תקלות לאדמין/למפעיל

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

faulttesting.googleapis.com/operations.delete

faulttesting.googleapis.com/operations.cancel

faulttesting.googleapis.com/experiments.create

faulttesting.googleapis.com/experiments.update

faulttesting.googleapis.com/experiments.delete

faulttesting.googleapis.com/validations.create

faulttesting.googleapis.com/validations.delete

faulttesting.googleapis.com/validationResources.create

faulttesting.googleapis.com/validationResources.update

faulttesting.googleapis.com/validationResources.delete

faulttesting.googleapis.com/affectedResources.create

faulttesting.googleapis.com/affectedResources.update

faulttesting.googleapis.com/affectedResources.delete

faulttesting.googleapis.com/experimentTemplates.create

faulttesting.googleapis.com/experimentTemplates.update

faulttesting.googleapis.com/experimentTemplates.delete

faulttesting.googleapis.com/exclusionWindows.create

faulttesting.googleapis.com/exclusionWindows.update

faulttesting.googleapis.com/exclusionWindows.delete

cloudresourcemanager.googleapis.com/projects.get

cloudresourcemanager.googleapis.com/projects.list

faulttesting.googleapis.com/operations.list

faulttesting.googleapis.com/operations.get

faulttesting.googleapis.com/locations.list

faulttesting.googleapis.com/locations.get

faulttesting.googleapis.com/experiments.list

faulttesting.googleapis.com/experiments.get

faulttesting.googleapis.com/validations.list

faulttesting.googleapis.com/validations.get

faulttesting.googleapis.com/validationResources.list

faulttesting.googleapis.com/validationResources.get

faulttesting.googleapis.com/affectedResources.list

faulttesting.googleapis.com/affectedResources.get

faulttesting.googleapis.com/experimentTemplates.list

faulttesting.googleapis.com/experimentTemplates.get

faulttesting.googleapis.com/exclusionWindows.list

faulttesting.googleapis.com/exclusionWindows.get

roles/faulttesting.viewer

בעל הרשאת צפייה בבדיקת תקלות

הרשאת קריאה בלבד למשאבים של בדיקות תקלות.

cloudresourcemanager.googleapis.com/projects.get

cloudresourcemanager.googleapis.com/projects.list

faulttesting.googleapis.com/operations.list

faulttesting.googleapis.com/operations.get

faulttesting.googleapis.com/locations.list

faulttesting.googleapis.com/locations.get

faulttesting.googleapis.com/experiments.list

faulttesting.googleapis.com/experiments.get

faulttesting.googleapis.com/validations.list

faulttesting.googleapis.com/validations.get

faulttesting.googleapis.com/validationResources.list

faulttesting.googleapis.com/validationResources.get

faulttesting.googleapis.com/affectedResources.list

faulttesting.googleapis.com/affectedResources.get

faulttesting.googleapis.com/experimentTemplates.list

faulttesting.googleapis.com/experimentTemplates.get

faulttesting.googleapis.com/exclusionWindows.list

faulttesting.googleapis.com/exclusionWindows.get

משתמשים ב-Google Cloud CLI כדי להעניק תפקידים והרשאות. כדי להעניק את ההרשאה faulttesting.operator role, מריצים את הפקודה הבאה:

gcloud projects add-iam-policy-binding ${PROJECT_ID} \
  --member {USER|GROUP|SERVICE_ACCOUNT} \
  --role roles/faulttesting.operator

דוגמה לתחביר להוספת faulttesting.operator למשתמש anon@example.com in projectexample-project` תיראה כך:

gcloud projects add-iam-policy-binding example-project --member=user:anon@example.com --role=roles/faulttesting.operator