במאמר הזה מוסבר על רישום ביומני ביקורת במסגרת Cloud Firestore. שירותי Google Cloud יוצרים יומני ביקורת שבהם מתועדים אירועי גישה למשאבי Google Cloud ופעילויות אדמין שמבוצעות בהם.
אתם יכולים לקרוא מידע נוסף על יומני הביקורת של Cloud במאמרים האלה:
- הסוגים של יומני הביקורת
- המבנה של רשומות ביומני הביקורת
- שמירה וניתוב של יומני ביקורת
- סיכום התמחור של Cloud Logging
- הפעלת יומני ביקורת של גישה לנתונים
הערות
כשמגדירים רישום ביומן הביקורת, משתמשים בשם השירות datastore.googleapis.com כדי להגדיר גם את datastore.googleapis.com וגם את firestore.googleapis.com.
Once configured, logs for the Cloud Firestore API include the service namefirestore.googleapis.com`.
כדי לראות כמה זמן לקח לעבד בקשת DATA_READ או DATA_WRITE, אפשר לעיין בשדה processing_duration באובייקט metadata של AuditLog.
השדה processing_duration מתאר את משך הזמן שלקח למסד הנתונים לעבד בקשה. הזמן הזה קצר יותר מזמן האחזור של משתמש הקצה. באופן ספציפי, הוא לא כולל את התקורה של הרשת.
שם השירות
יומני הביקורת של Cloud Firestore משתמשים בשם השירות firestore.googleapis.com.
אפשר לסנן לפי השירות הזה:
protoPayload.serviceName="firestore.googleapis.com"
קודי Method לפי סוג ההרשאה
לכל הרשאה ב-IAM יש מאפיין type עם enum שיכול להיות אחד מארבעת הערכים הבאים: ADMIN_READ, ADMIN_WRITE, DATA_READ או DATA_WRITE. כשקוראים ל-method, נוצר יומן ביקורת של Cloud Firestore שהקטגוריה שלו תלויה במאפיין type של ההרשאה שנדרשת לביצוע ה-method.
שיטות שדורשות הרשאת IAM עם ערך המאפיין type של DATA_READ, DATA_WRITE או ADMIN_READ יוצרות יומני ביקורת של גישה לנתונים.
ב-methods שדורשות הרשאת IAM עם ערך המאפיין type של ADMIN_WRITE, נוצרים יומני ביקורת של פעילות אדמין.
| סוג ההרשאה | Methods |
|---|---|
ADMIN_READ |
google.cloud.location.Locations.GetLocationgoogle.cloud.location.Locations.ListLocationsgoogle.firestore.admin.v1.FirestoreAdmin.GetBackupgoogle.firestore.admin.v1.FirestoreAdmin.GetBackupSchedulegoogle.firestore.admin.v1.FirestoreAdmin.GetDatabasegoogle.firestore.admin.v1.FirestoreAdmin.GetFieldgoogle.firestore.admin.v1.FirestoreAdmin.GetIndexgoogle.firestore.admin.v1.FirestoreAdmin.ListBackupSchedulesgoogle.firestore.admin.v1.FirestoreAdmin.ListBackupsgoogle.firestore.admin.v1.FirestoreAdmin.ListDatabasesgoogle.firestore.admin.v1.FirestoreAdmin.ListFieldsgoogle.firestore.admin.v1.FirestoreAdmin.ListIndexesgoogle.firestore.admin.v1beta1.FirestoreAdmin.GetIndexgoogle.firestore.admin.v1.MongoDBCompatible.ListIndexesgoogle.firestore.admin.v1.MongoDBCompatible.ListDatabases
|
ADMIN_WRITE |
google.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedulegoogle.firestore.admin.v1.FirestoreAdmin.CreateDatabasegoogle.firestore.admin.v1.FirestoreAdmin.CreateIndexgoogle.firestore.admin.v1.FirestoreAdmin.DeleteBackupgoogle.firestore.admin.v1.FirestoreAdmin.DeleteBackupSchedulegoogle.firestore.admin.v1.FirestoreAdmin.DeleteDatabasegoogle.firestore.admin.v1.FirestoreAdmin.DeleteIndexgoogle.firestore.admin.v1.FirestoreAdmin.RestoreDatabasegoogle.firestore.admin.v1.FirestoreAdmin.UpdateBackupSchedulegoogle.firestore.admin.v1.FirestoreAdmin.UpdateDatabasegoogle.firestore.admin.v1.FirestoreAdmin.UpdateFieldgoogle.longrunning.Operations.CancelOperationgoogle.longrunning.Operations.DeleteOperation
|
DATA_READ |
google.firestore.v1.MongoDBCompatible.Findgoogle.firestore.v1.MongoDBCompatible.Aggregategoogle.firestore.v1.MongoDBCompatible.GetMoregoogle.firestore.v1.MongoDBCompatible.ListCollectionsgoogle.firestore.v1.MongoDBCompatible.Countgoogle.firestore.v1.MongoDBCompatible.Distinctgoogle.firestore.v1.MongoDBCompatible.CommitTransactiongoogle.firestore.v1.MongoDBCompatible.AbortTransactiongoogle.firestore.v1.MongoDBCompatible.EndSessionsgoogle.firestore.v1.MongoDBCompatible.KillCursors
|
DATA_WRITE |
google.firestore.v1.MongoDBCompatible.Insertgoogle.firestore.v1.MongoDBCompatible.Updategoogle.firestore.v1.MongoDBCompatible.Deletegoogle.firestore.v1.MongoDBCompatible.FindAndModifygoogle.firestore.v1.MongoDBCompatible.CreateCollection
|
זיהוי המתקשרים שביקשו את השיחה
הרשומות ביומן הביקורת כוללות מידע על הזהות שביצעה את הפעולה שנרשמה ביומן. כדי לזהות את מבצע הקריאה החוזרת, אפשר לעיין בשדות הבאים באובייקט AuditLog:
זהות המתקשר מופיעה בשדה
AuthenticationInfo. המידע הזה יכול לכלול אתprincipalEmailשל המשתמש. המידע הזה מצונזר לפעמים.השדה
callerIpבאובייקטrequestMetadataשל רשומתAuditLogכולל את כתובת ה-IP של מבצע הקריאה.