העברת עומס עבודה (workload)
בדף הזה מוסבר איך לבצע ניתוח תאימות לפני שמעבירים פרויקט קיים לתיקיית Assured Workloads. בניתוח הזה מתבצעת השוואה בין פרויקט המקור לבין תיקיית היעד ב-Assured Workloads, כדי לקבוע אילו שינויים צריך לבצע לפני או אחרי שמתחילים את ההעברה. לדוגמה, אם יש לכם פרויקט שאתם רוצים להעביר לתיקיית Assured Workloads שמוגדרת ל-FedRAMP Moderate, אתם יכולים לטפל באופן יזום בכל הפרה פוטנציאלית של התאימות שעלולה להתרחש לפני העברת הפרויקט.
ניתוח ההעברה מחזיר את סוגי הממצאים הבאים:
- בפרויקט המקור יש מוצרים או שירותים שלא נתמכים.
- בפרויקט המקור יש משאבים שנמצאים במיקום שאסור להשתמש בו.
- בפרויקט המקור מוגדרים ערכי אילוצים של מדיניות הארגון שלא תואמים לתיקיית היעד של Assured Workloads.
חשוב לגלות את הממצאים האלה לפני שמנסים לבצע העברה. כברירת מחדל, תיקיית Assured Workloads יכולה להכיל רק סוגי משאבים של השירותים שנתמכים בגבולות הנתונים של התיקייה. אם הפרויקט מכיל משאבים של שירות שלא נתמך ב-Data Boundary של התיקייה, יכול להיות שתצטרכו לפרוס מחדש או להסיר את המשאבים האלה.
אפשר לשנות את רשימת ברירת המחדל של השירותים הנתמכים בתיקיית Assured Workloads, על ידי שינוי מדיניות הארגון בנושא הגבלת השימוש במשאבים. כך אפשר לפרוס בתיקייה שירותים שלא עומדים בדרישות, אבל בדיקות התאימות ברקע יתעלמו מהשירותים האלה ומהמשאבים שלהם. לכן, אם תפעילו שירות לא נתמך, אתם בוחרים לקבל את הסיכון שעומס העבודה שלכם לא יעמוד בדרישות התאימות.
העברת תיקיות ופרויקטים של Assured Workloads
אם אתם מעבירים תיקיות או פרויקטים של Assured Workloads, אתם יכולים להעביר אותם רק לתיקייה שמשתמשת באותו גבול נתונים. אחרת, יכול להיות שתחויבו בעמלות נוספות וסטטוס התאימות שלכם ייפגע.
לפני שמתחילים
- אוספים את מזהי המשאבים של פרויקט המקור ושל תיקיית היעד ב-Assured Workloads.
- מקצים או מאמתים הרשאות IAM גם בפרויקט המקור וגם בתיקיית היעד של Assured Workloads, כדי לוודא שהגורם שמבצע את הקריאה מורשה לבצע את ההעברה.
הרשאות IAM נדרשות
כדי לבצע ניתוח של העברה, צריך להעניק למבצע הקריאה החוזרת הרשאות IAM באמצעות תפקיד מוגדר מראש שכולל קבוצה רחבה יותר של הרשאות, או באמצעות תפקיד בהתאמה אישית שמוגבל להרשאות המינימליות הנדרשות.
אלה ההרשאות שנדרשות:
-
assuredworkloads.workload.getבעומס העבודה ביעד -
cloudasset.assets.searchAllResourcesבפרויקט המקור -
orgpolicy.policy.getבפרויקט המקור ובתיקיית היעד ב-Assured Workloads
ביצוע ניתוח העברה
כשמבצעים ניתוח של פרויקט המקור ושל תיקיית היעד ב-Assured Workloads, צריך לטפל בכל הממצאים לפני שמעבירים את הפרויקט ליעד. למרות שהממצאים לא מונעים מכם להעביר את הפרויקט, הם עלולים לגרום להפרות של תאימות בתיקיית היעד של Assured Workloads.
הממצאים האלה הם משני סוגים שונים:
- אזהרה: אזהרה מופיעה כשפרויקט המקור עלול לא להתאים ליעד, ועלולה להתרחש הפרה של תאימות. צריך לבדוק את האזהרות כדי לוודא שחוסר התאימות מקובל או שצריך לטפל בו לפני ההעברה.
- חסימה: תוצאת חסימה מתרחשת כשמזוהה הפרת תאימות בין פרויקט המקור ליעד. צריך לטפל בגורמים החוסמים לפני שממשיכים בהעברה.
אלה סוגי הממצאים שמדווחים:
מיקומי משאבים: בגבולות נתונים רבים נאכפות הגבלות מיקום על משאבים כדי לעמוד בדרישות התאימות. למשל, אם פרויקט המקור מכיל משאבים שנמצאים במיקום אסור.
כדי לפתור את הבעיה, צריך להעביר את המשאבים המושפעים למיקומים מותרים, למחוק אותם או לשנות את הגדרת האילוץ של מדיניות הארגון
gcp.resourceLocationsביעד.מוצרים או שירותים שלא נתמכים: כל גבול נתונים תומך ברשימה ספציפית של מוצרים ושירותים של Google Cloud . אם בפרויקט שלכם נעשה שימוש בשירות שלא נתמך בגבולות הנתונים של תיקיית היעד ב-Assured Workloads, הוא יופיע כממצא.
אילוצים של מדיניות הארגון: יכול להיות שפרויקט המקור מוגדר עם ערכי אילוצים של מדיניות הארגון ששונים מהמדיניות בפועל של תיקיית היעד ב-Assured Workloads, או שהם לא תואמים לגבולות הנתונים של היעד. הניתוח הזה מתבצע רק לגבי אילוצים שרלוונטיים לגבולות הנתונים של תיקיית היעד ב-Assured Workloads. לא מתבצעת הערכה של כל ערכי האילוצים של הפרויקט. יכולות להיות כמה תוצאות, כמו הבעיות הבאות:
- המדיניות בפועל של הפרויקט ושל היעד לא תואמות.
- בפרויקט שלכם יש ערכי אילוצים של מדיניות הארגון שלא מוגדרים ביעד, או להיפך.
- בפרויקט יש ערכים של אילוצים במדיניות הארגון שלא תואמים לגבולות הנתונים של היעד.
אם נמצא גורם חוסם לאילוץ של מדיניות הארגון, התשובה כוללת את הערכים הצפויים שתואמים לחבילת אמצעי הבקרה המטורגטת. אתם יכולים להשתמש בערכים הצפויים האלה כדי לבצע שינויים בפרויקט לפני שאתם מבצעים העברה.
כדי לפתור את הבעיה, צריך לבדוק איזה אילוץ של מדיניות הארגון צריך לשנות ולבצע את השינויים הנדרשים.
סוגי ממצאים שלא נתמכים
ניתוח ההעברה לא תומך בסוגי הממצאים הבאים:
- חוסר תאימות ברמת המשאב לאילוצים של מדיניות הארגון, מלבד
gcp.resourceLocations. לדוגמה, חלק מגבולות הנתונים מוגדרים עם האילוץ הגלובליgcp.restrictCmekCryptoKeyProjectsאו עם האילוץcompute.disableNestedVirtualizationהספציפי ל-Compute Engine. חוסר התאמה לאילוצים האלה בין המקור ליעד לא מנותח ולא מדווח. - תכונות ספציפיות לשירות שעשויות להיות מושבתות בגבול נתונים מסוים. לדוגמה, בדיקות זמני הפעילות של Cloud Monitoring מושבתות בתיקיות IL4, והפונקציות המרוחקות של BigQuery מושבתות בתיקיות ITAR. אם בפרויקט המקור נעשה שימוש בתכונות מושבתות כאלה, חוסר התאימות הזה לא מנותח ולא מדווח.
ניתוח של העברת פרויקט לתיקיית Assured Workloads
ה-method analyzeWorkloadMove מבצעת ניתוח של העברת פרויקט המקור לתיקיית היעד של Assured Workloads.
בדוגמה לבקשה שבהמשך, מחליפים את הפרמטרים הבאים בפרמטרים שלכם:
- ENDPOINT_URI: ה-URI של נקודת הקצה של השירות ב-Assured Workloads.
ה-URI הזה חייב להיות נקודת הקצה שתואמת למיקום של עומס העבודה ביעד, למשל
https://us-west1-assuredworkloads.googleapis.comלעומס עבודה אזורי באזורus-west1ו-https://us-assuredworkloads.googleapis.comלעומס עבודה במספר אזורים בארה"ב. - DESTINATION_ORGANIZATION_ID: מזהה הארגון של עומס העבודה ביעד שאליו יועבר פרויקט המקור. לדוגמה:
919698201234 - DESTINATION_LOCATION_ID: המיקום של עומס העבודה ביעד. לדוגמה:
us-west1אוus. הוא תואם לערךdata regionשל עומס העבודה. - DESTINATION_WORKLOAD_ID: המזהה של תיקיית היעד ב-Assured Workloads שאליה יועבר פרויקט המקור.
לדוגמה:
00-701ea036-7152-4780-a867-9f5 - SOURCE_PROJECT_ID: פרמטר של שאילתה למזהה של פרויקט המקור שרוצים להעביר. לדוגמה:
my-project-123 - ASSET_TYPES: אופציונלי. סוג נכס אחד לכל פרמטר של שאילתה, שיסנן את הממצאים רק לסוגים שצוינו.
לדוגמה:
cloudresourcemanager.googleapis.com/Project - PAGE_SIZE: אופציונלי. פרמטר של שאילתה למספר התוצאות שיוחזרו בכל דף, עד למקסימום של 50. לדוגמה:
5 - PAGE_TOKEN: אופציונלי. פרמטר של שאילתה לאסימון כדי להמשיך את התוצאות שחולקו לדפים. לדוגמה:
CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
שיטת ה-HTTP, כתובת ה-URL והפרמטרים של השאילתה:
GET https://[ENDPOINT_URI]/v1/organizations/[DESTINATION_ORGANIZATION_ID]/locations/[DESTINATION_LOCATION_ID]/workloads/[DESTINATION_WORKLOAD_ID]:analyzeWorkloadMove?project=projects/SOURCE_PROJECT_ID&page_size=PAGE_SIZE&page_token=PAGE_TOKEN
לדוגמה:
GET https://us-west1-assuredworkloads.googleapis.com/v1/organizations/919698298765/locations/us-west1/workloads/00-701ea036-7152-4781-a867-9f5:analyzeWorkloadMove?project=projects/my-project-123&page_size=5&page_token=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
אתם אמורים לקבל תגובת JSON שדומה לזו:
{ "assetMoveAnalyses": [ { "asset": "//orgpolicy.googleapis.com/projects/130536381852/policies/container.restrictNoncompliantDiagnosticDataAccess", "assetType": "orgpolicy.googleapis.com/Policy" }, { "asset": "//compute.googleapis.com/projects/my-project-123/global/routes/default-route-9ca6e6b0ab7326f0", "assetType": "compute.googleapis.com/Route", "analysisGroups": [ { "displayName": "RESOURCE_LOCATIONS", "analysisResult": { "warnings": [ { "detail": "The asset's location 'global' is incompatible with the gcp.resourceLocations org policy effective at the target. In case of 'global only' assets, this may be ignored." } ] } } ] }, { "asset": "//compute.googleapis.com/projects/my-project-123/regions/europe-west10/subnetworks/default", "assetType": "compute.googleapis.com/Subnetwork", "analysisGroups": [ { "displayName": "RESOURCE_LOCATIONS", "analysisResult": { "blockers": [ { "detail": "The asset's location 'europe-west10' is incompatible with the gcp.resourceLocations org policy effective at the target." } ] } } ] }, { "asset": "//serviceusage.googleapis.com/projects/130536381852/services/servicemanagement.googleapis.com", "assetType": "serviceusage.googleapis.com/Service" }, { "asset": "//serviceusage.googleapis.com/projects/130536381852/services/monitoring.googleapis.com", "assetType": "serviceusage.googleapis.com/Service" }, { "asset": "//serviceusage.googleapis.com/projects/130536381852/services/bigquerymigration.googleapis.com", "assetType": "serviceusage.googleapis.com/Service", "analysisGroups": [ { "displayName": "DISALLOWED_SERVICES", "analysisResult": { "warnings": [ { "detail": "This service is not allowed by the gcp.restrictServiceUsage org policy effective at the target" } ] } } ] }, { "asset": "//cloudresourcemanager.googleapis.com/projects/my-project-123", "assetType": "cloudresourcemanager.googleapis.com/Project", "analysisGroups": [ { "displayName": "ORG_POLICIES", "analysisResult": { "warnings": [ { "detail": "constraints/gcp.resourceLocations: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target." }, { "detail": "constraints/compute.disableInstanceDataAccessApis: Source applies this custom policy and it is not applied by the target." }, { "detail": "constraints/cloudkms.allowedProtectionLevels: Source and target set different values for this policy." }, { "detail": "constraints/container.restrictNoncompliantDiagnosticDataAccess: Source and target set different values for this policy." }, { "detail": "constraints/gcp.restrictServiceUsage: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target." } ], "blockers": [ { "detail": "constraints/gcp.resourceLocations: The value applied at the source is not compliant with the target compliance program. The expected allowed values are [us-west4, us-west1, us-west2, us-west3, us-central1, us-east1, us-east4, us-south1, us-central2, us-east5]." }, { "detail": "constraints/container.restrictNoncompliantDiagnosticDataAccess: The value applied at the source is not compliant with the target compliance program. The expected value is [true]." }, { "detail": "constraints/container.restrictTLSVersion: The value applied at the source is not compliant with the target compliance program. The expected denied values are [TLS_VERSION_1, TLS_VERSION_1_1]." } ] } } ] } ], "nextPageToken": "Ch8wLDc0MzY3NTExNCwzMzg4ODM1NTM2NDQ0NTg4MDMy" }
כדי לסנן את הממצאים לפי סוג נכס ספציפי, משתמשים בפרמטר השאילתה asset_types:
GET https://assuredworkloads.googleapis.com/v1/organizations/919698298765/locations/us-west1/workloads/00-701ea036-7152-4781-a867-9f5:analyzeWorkloadMove?project=projects/my-project-123&asset_types=cloudresourcemanager.googleapis.com/Project&page_size=5&page_token=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
התוצאות יכילו רק ממצאים מהסוג שצוין (cloudresourcemanager.googleapis.com/Project):
{ "assetMoveAnalyses": [ { "asset": "//cloudresourcemanager.googleapis.com/projects/my-project-123", "assetType": "cloudresourcemanager.googleapis.com/Project", "analysisGroups": [ { "displayName": "ORG_POLICIES", "analysisResult": { "warnings": [ { "detail": "constraints/gcp.resourceLocations: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target." }, { "detail": "constraints/compute.disableInstanceDataAccessApis: Source applies this custom policy and it is not applied by the target." } ], "blockers": [ { "detail": "constraints/gcp.resourceLocations: The value applied at the source is not compliant with the target compliance program. The expected allowed values are [us-west4, us-west1, us-west2, us-west3, us-central1, us-east1, us-east4, us-south1, us-central2, us-east5]." } ] } } ] } ], "nextPageToken": "Ch8wLDc0MzY3NTExNCwzMzg4ODM1NTM2NDQ0NTg4MDMy" }
כדי לסנן את הממצאים לפי יותר מסוג נכס אחד, מוסיפים כל אחד מהם כפרמטר שאילתה נוסף:
GET https://assuredworkloads.googleapis.com/v1/organizations/919698298765/locations/us-west1/workloads/00-701ea036-7152-4781-a867-9f5:analyzeWorkloadMove?project=projects/my-project-123&asset_types=cloudresourcemanager.googleapis.com/Project&asset_types=serviceusage.googleapis.com/Service&page_size=5&page_token=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
התוצאות יכילו רק ממצאים מהסוגים שצוינו (cloudresourcemanager.googleapis.com/Project ו-serviceusage.googleapis.com/Service):
{ "assetMoveAnalyses": [ { "asset": "//serviceusage.googleapis.com/projects/130536381852/services/bigquerymigration.googleapis.com", "assetType": "serviceusage.googleapis.com/Service", "analysisGroups": [ { "displayName": "DISALLOWED_SERVICES", "analysisResult": { "warnings": [ { "detail": "This service is not allowed by the gcp.restrictServiceUsage org policy effective at the target" } ] } } ] }, { "asset": "//cloudresourcemanager.googleapis.com/projects/my-project-123", "assetType": "cloudresourcemanager.googleapis.com/Project", "analysisGroups": [ { "displayName": "ORG_POLICIES", "analysisResult": { "warnings": [ { "detail": "constraints/gcp.resourceLocations: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target." }, { "detail": "constraints/compute.disableInstanceDataAccessApis: Source applies this custom policy and it is not applied by the target." } ], "blockers": [ { "detail": "constraints/gcp.resourceLocations: The value applied at the source is not compliant with the target compliance program. The expected allowed values are [us-west4, us-west1, us-west2, us-west3, us-central1, us-east1, us-east4, us-south1, us-central2, us-east5]." } ] } } ] } ], "nextPageToken": "Ch8wLDc0MzY3NTExNCwzMzg4ODM1NTM2NDQ0NTg4MDMy" }
אחרי שמבצעים את ניתוח ההעברה, בודקים ופותרים את כל האזהרות או החסימות, ואז מריצים שוב את הניתוח כדי לוודא שהן טופלו. אחרי שההרשאות יוגדרו, תוכלו להעביר את הפרויקט.
המאמרים הבאים
- להבין את גבולות הנתונים של Assured Workloads.
- אילו מוצרים נתמכים בכל גבול נתונים?