API Gateway 审核日志记录
本文档列出了 API Gateway 的受审核方法。 Google Cloud 服务会生成审核日志,以记录 Google Cloud 资源中的管理和访问活动。如需详细了解 Cloud Audit Logs,请参阅以下内容:
服务名称
如需查看 API Gateway 审核日志,请执行以下操作:
在 Google Cloud 控制台中,前往 Logs Explorer 页面:
将以下查询复制并粘贴到Logs Explorer的查询字段中,然后点击运行查询。
protoPayload.serviceName="apigateway.googleapis.com"
方法(按权限类型)
每个 IAM 权限都有一个 type 属性,该属性的值是一个枚举,可以是以下四个值之一:ADMIN_READ、ADMIN_WRITE、DATA_READ 或 DATA_WRITE。在您调用某个方法时,API Gateway 会生成一个审核日志,其类别取决于执行该方法所需权限的 type 属性。需要 IAM 权限且 type 属性值为 DATA_READ、DATA_WRITE 或 ADMIN_READ 的方法会生成数据访问审核日志。需要 IAM 权限且 type 属性值为 ADMIN_WRITE 的方法会生成管理员活动审核日志。
| 权限类型 | 方法 |
|---|---|
ADMIN_READ |
google.cloud.apigateway.v1.ApiGatewayService.GetApigoogle.cloud.apigateway.v1.ApiGatewayService.GetApiConfiggoogle.cloud.apigateway.v1.ApiGatewayService.GetGatewaygoogle.cloud.apigateway.v1.ApiGatewayService.ListApiConfigsgoogle.cloud.apigateway.v1.ApiGatewayService.ListApisgoogle.cloud.apigateway.v1.ApiGatewayService.ListGatewaysgoogle.cloud.apigateway.v1beta.ApiGatewayService.GetApigoogle.cloud.apigateway.v1beta.ApiGatewayService.GetApiConfiggoogle.cloud.apigateway.v1beta.ApiGatewayService.GetGatewaygoogle.cloud.apigateway.v1beta.ApiGatewayService.ListApiConfigsgoogle.cloud.apigateway.v1beta.ApiGatewayService.ListApisgoogle.cloud.apigateway.v1beta.ApiGatewayService.ListGatewaysGetIamPolicygoogle.longrunning.Operations.GetOperationgoogle.longrunning.Operations.ListOperations |
ADMIN_WRITE |
google.cloud.apigateway.v1.ApiGatewayService.CreateApi (LRO)google.cloud.apigateway.v1.ApiGatewayService.CreateApiConfig (LRO)google.cloud.apigateway.v1.ApiGatewayService.CreateGateway (LRO)google.cloud.apigateway.v1.ApiGatewayService.DeleteApi (LRO)google.cloud.apigateway.v1.ApiGatewayService.DeleteApiConfig (LRO)google.cloud.apigateway.v1.ApiGatewayService.DeleteGateway (LRO)google.cloud.apigateway.v1.ApiGatewayService.UpdateApi (LRO)google.cloud.apigateway.v1.ApiGatewayService.UpdateApiConfig (LRO)google.cloud.apigateway.v1.ApiGatewayService.UpdateGateway (LRO)google.cloud.apigateway.v1beta.ApiGatewayService.CreateApi (LRO)google.cloud.apigateway.v1beta.ApiGatewayService.CreateApiConfig (LRO)google.cloud.apigateway.v1beta.ApiGatewayService.CreateGateway (LRO)google.cloud.apigateway.v1beta.ApiGatewayService.DeleteApi (LRO)google.cloud.apigateway.v1beta.ApiGatewayService.DeleteApiConfig (LRO)google.cloud.apigateway.v1beta.ApiGatewayService.DeleteGateway (LRO)google.cloud.apigateway.v1beta.ApiGatewayService.UpdateApi (LRO)google.cloud.apigateway.v1beta.ApiGatewayService.UpdateApiConfig (LRO)google.cloud.apigateway.v1beta.ApiGatewayService.UpdateGateway (LRO)SetIamPolicygoogle.longrunning.Operations.CancelOperationgoogle.longrunning.Operations.DeleteOperation |
API 接口审核日志
如需了解如何评估每种方法的权限以及评估哪些权限,请参阅 API Gateway 的 Identity and Access Management 文档。
google.cloud.apigateway.v1.ApiGatewayService
以下审核日志与属于 google.cloud.apigateway.v1.ApiGatewayService 的方法相关联。
CreateApi
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.CreateApi - 审核日志类型:管理员活动
- 权限:
apigateway.apis.create - ADMIN_WRITE
- 方法是长时间运行的操作或流式传输操作:长时间运行的操作
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.CreateApi"
CreateApiConfig
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.CreateApiConfig - 审核日志类型:管理员活动
- 权限:
apigateway.apiconfigs.create - ADMIN_WRITE
- 方法是长时间运行的操作或流式传输操作:长时间运行的操作
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.CreateApiConfig"
CreateGateway
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.CreateGateway - 审核日志类型:管理员活动
- 权限:
apigateway.gateways.create - ADMIN_WRITE
- 方法是长时间运行的操作或流式传输操作:长时间运行的操作
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.CreateGateway"
DeleteApi
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.DeleteApi - 审核日志类型:管理员活动
- 权限:
apigateway.apis.delete - ADMIN_WRITE
- 方法是长时间运行的操作或流式传输操作:长时间运行的操作
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.DeleteApi"
DeleteApiConfig
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.DeleteApiConfig - 审核日志类型:管理员活动
- 权限:
apigateway.apiconfigs.delete - ADMIN_WRITE
- 方法是长时间运行的操作或流式传输操作:长时间运行的操作
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.DeleteApiConfig"
DeleteGateway
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.DeleteGateway - 审核日志类型:管理员活动
- 权限:
apigateway.gateways.delete - ADMIN_WRITE
- 方法是长时间运行的操作或流式传输操作:长时间运行的操作
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.DeleteGateway"
GetApi
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.GetApi - 审核日志类型:数据访问
- 权限:
apigateway.apis.get - ADMIN_READ
- 方法是长时间运行的操作或流式传输操作:否。
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.GetApi"
GetApiConfig
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.GetApiConfig - 审核日志类型:数据访问
- 权限:
apigateway.apiconfigs.get - ADMIN_READ
- 方法是长时间运行的操作或流式传输操作:否。
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.GetApiConfig"
GetGateway
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.GetGateway - 审核日志类型:数据访问
- 权限:
apigateway.gateways.get - ADMIN_READ
- 方法是长时间运行的操作或流式传输操作:否。
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.GetGateway"
ListApiConfigs
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.ListApiConfigs - 审核日志类型:数据访问
- 权限:
apigateway.apiconfigs.list - ADMIN_READ
- 方法是长时间运行的操作或流式传输操作:否。
- 此方法的过滤条件:
protoPayload.methodName="google.cloud.apigateway.v1.ApiGatewayService.ListApiConfigs"
ListApis
- 方法:
google.cloud.apigateway.v1.ApiGatewayService.ListApis