監査ロギングの情報
このドキュメントでは、MongoDB 互換の Firestore の監査ロギングについて説明します。 Google Cloudサービスは、 Google Cloud リソース内の管理アクティビティとアクセス アクティビティを記録する監査ログを生成します。
Cloud Audit Logs の詳細については、以下をご覧ください。
説明
監査ロギングを構成する場合は、サービス名 datastore.googleapis.com
を使用して、datastore.googleapis.com
と firestore.googleapis.com.
Once configured, logs for the Firestore with MongoDB compatibility API include the service name
firestore.googleapis.com` の両方を構成します。
DATA_READ
リクエストまたは DATA_WRITE
リクエストの処理に要した時間を確認するには、AuditLog
の metadata
オブジェクト内に存在する processing_duration
フィールドをご覧ください。processing_duration
フィールドは、データベースがリクエストの処理に要した時間を示します。これはエンドユーザーのレイテンシよりも小さくなります。特に、ネットワーク オーバーヘッドは含まれません。
サービス名
Firestore 監査ログでは、サービス名 firestore.googleapis.com
が使用されます。
このサービスでフィルタ:
protoPayload.serviceName="firestore.googleapis.com"
メソッド(権限タイプ別)
各 IAM 権限には type
プロパティがあります。このプロパティの値は列挙型で、ADMIN_READ
、ADMIN_WRITE
、DATA_READ
、DATA_WRITE
のいずれかになります。メソッドを呼び出すと、Firestore はそのメソッドの実行に必要な権限の type
プロパティによって変わるカテゴリの監査ログを生成します。
type
プロパティ値が DATA_READ
、DATA_WRITE
、または ADMIN_READ
の IAM 権限を必要とするメソッドは、データアクセス監査ログを生成します。
type
プロパティ値が ADMIN_WRITE
の IAM 権限を必要とするメソッドは、管理アクティビティ監査ログを生成します。
権限タイプ | メソッド |
---|---|
ADMIN_READ |
google.cloud.location.Locations.GetLocation google.cloud.location.Locations.ListLocations google.firestore.admin.v1.FirestoreAdmin.GetBackup google.firestore.admin.v1.FirestoreAdmin.GetBackupSchedule google.firestore.admin.v1.FirestoreAdmin.GetDatabase google.firestore.admin.v1.FirestoreAdmin.GetField google.firestore.admin.v1.FirestoreAdmin.GetIndex google.firestore.admin.v1.FirestoreAdmin.ListBackupSchedules google.firestore.admin.v1.FirestoreAdmin.ListBackups google.firestore.admin.v1.FirestoreAdmin.ListDatabases google.firestore.admin.v1.FirestoreAdmin.ListFields google.firestore.admin.v1.FirestoreAdmin.ListIndexes google.firestore.admin.v1beta1.FirestoreAdmin.GetIndex google.firestore.admin.v1.MongoDBCompatible.ListIndexes google.firestore.admin.v1.MongoDBCompatible.ListDatabases
|
ADMIN_WRITE |
google.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedule google.firestore.admin.v1.FirestoreAdmin.CreateDatabase google.firestore.admin.v1.FirestoreAdmin.CreateIndex google.firestore.admin.v1.FirestoreAdmin.DeleteBackup google.firestore.admin.v1.FirestoreAdmin.DeleteBackupSchedule google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase google.firestore.admin.v1.FirestoreAdmin.DeleteIndex google.firestore.admin.v1.FirestoreAdmin.RestoreDatabase google.firestore.admin.v1.FirestoreAdmin.UpdateBackupSchedule google.firestore.admin.v1.FirestoreAdmin.UpdateDatabase google.firestore.admin.v1.FirestoreAdmin.UpdateField google.longrunning.Operations.CancelOperation google.longrunning.Operations.DeleteOperation
|
DATA_READ |
google.firestore.v1.MongoDBCompatible.Find google.firestore.v1.MongoDBCompatible.Aggregate google.firestore.v1.MongoDBCompatible.GetMore google.firestore.v1.MongoDBCompatible.ListCollections google.firestore.v1.MongoDBCompatible.Count google.firestore.v1.MongoDBCompatible.Distinct google.firestore.v1.MongoDBCompatible.CommitTransaction google.firestore.v1.MongoDBCompatible.AbortTransaction google.firestore.v1.MongoDBCompatible.EndSessions google.firestore.v1.MongoDBCompatible.KillCursors
|
DATA_WRITE |
google.firestore.v1.MongoDBCompatible.Insert google.firestore.v1.MongoDBCompatible.Update google.firestore.v1.MongoDBCompatible.Delete google.firestore.v1.MongoDBCompatible.FindAndModify google.firestore.v1.MongoDBCompatible.CreateCollection
|
リクエストの呼び出し元を特定する
監査ログエントリには、ログに記録されたオペレーションを実行した ID に関する情報が含まれます。リクエストの呼び出し元を特定するには、AuditLog
オブジェクト内の次のフィールドをご覧ください。
呼び出し元の ID は、
AuthenticationInfo
フィールドに保持されます。これには、ユーザーのprincipalEmail
が含まれることがあります。この情報は秘匿化されていることがあります。AuditLog
エントリのrequestMetadata
オブジェクト内のcallerIp
フィールドには、呼び出し元の IP アドレスが含まれます。