| Cloud Firestore Enterprise エディションにのみ関連します。 |
このドキュメントでは、MongoDB 互換の Cloud Firestore の監査ロギングについて説明します。Google Cloud サービスは、Google Cloud リソース内の管理アクティビティとアクセス アクティビティを記録する監査ログを生成します。
Cloud Audit Logs の詳細については、以下をご覧ください。
備考
監査ロギングを構成する場合は、サービス名 datastore.googleapis.com を使用して、datastore.googleapis.com と firestore.googleapis.com の両方を構成します。firestore.googleapis.com.
Once configured, logs for the Cloud Firestore with MongoDB compatibility API include the service name
DATA_READ リクエストまたは DATA_WRITE リクエストの処理に要した時間を確認するには、AuditLog の metadata オブジェクト内に存在する processing_duration フィールドをご覧ください。processing_duration フィールドは、データベースがリクエストの処理に要した時間を示します。これはエンドユーザーのレイテンシよりも小さくなります。特に、ネットワーク オーバーヘッドは含まれません。
サービス名
Cloud Firestore監査ログでは、サービス名 firestore.googleapis.com が使用されます。このサービスでフィルタ:
protoPayload.serviceName="firestore.googleapis.com"
メソッド(権限タイプ別)
各 IAM 権限には type プロパティがあります。このプロパティの値は列挙型で、ADMIN_READ、ADMIN_WRITE、DATA_READ、DATA_WRITE のいずれかになります。メソッドを呼び出すと、Cloud Firestore によってそのメソッドの実行に必要な権限の type プロパティによって変わるカテゴリの監査ログが生成されます。
type プロパティ値が DATA_READ、DATA_WRITE、または ADMIN_READ の IAM 権限を必要とするメソッドは、データアクセス監査ログを生成します。
type プロパティ値が ADMIN_WRITE の IAM 権限を必要とするメソッドは、管理アクティビティ監査ログを生成します。
| 権限タイプ | メソッド |
|---|---|
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
|
リクエストの呼び出し元を特定する
監査ログエントリには、ログに記録されたオペレーションを実行した ID に関する情報が含まれます。リクエストの呼び出し元を特定するには、AuditLog オブジェクト内の次のフィールドをご覧ください。
呼び出し元の ID は、
AuthenticationInfoフィールドに保持されます。これには、ユーザーのprincipalEmailが含まれることがあります。この情報は秘匿化されていることがあります。AuditLogエントリのrequestMetadataオブジェクト内のcallerIpフィールドには、呼び出し元の IP アドレスが含まれます。