密钥管理服务 (KMS)
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
工作负载位置 |
仅限组织的工作负载
|
审核日志源 |
|
接受审核的操作 |
|
API 服务器
日志类型:控制平面。
包含审核信息的日志条目中的字段 |
审核元数据 |
审核字段名称 |
值 |
用户或服务身份 |
user |
例如,
"user":{
"groups":["system:authenticated"],
"username":"fop-platform-admin@example.com"
}
|
目标
(调用 API 的字段和值)
|
objectRef |
"objectRef":{
"resource":"aeadkeys",
"apiGroup":"kms.gdc.goog",
"apiVersion":"v1",
"namespace":"kms-test1"
}
|
操作
(包含所执行操作的字段)
|
verb |
例如,
"verb": "create"
|
活动时间戳 |
requestReceivedTimestamp |
例如,
"requestReceivedTimestamp":"2022-12-08T03:59:20.025703Z"
|
操作来源 |
sourceIPs |
例如,
"sourceIPs":[
"10.200.0.7"
]
|
结果 |
responseStatus |
例如,
"responseStatus": {
"metadata": {},
"code": 200
}
|
其他字段 |
不适用 |
不适用 |
日志示例
{
"user":{
"groups":["system:authenticated"],
"username":"fop-platform-admin@example.com"
},
"auditID":"bec33328-b4ba-431e-96a2-9bbb77666478",
"_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-wxw7t",
"stage":"RequestReceived",
"_gdch_cluster":"org-1-admin",
"userAgent":"kubectl/v1.25.4 (linux/amd64) kubernetes/872a965",
"kind":"Event",
"level":"Metadata",
"stageTimestamp":"2022-12-08T03:59:20.025703Z",
"requestReceivedTimestamp":"2022-12-08T03:59:20.025703Z",
"objectRef":{
"resource":"aeadkeys",
"apiGroup":"kms.gdc.goog",
"apiVersion":"v1",
"namespace":"kms-test1"
},
"sourceIPs":[
"10.200.0.7"
],
"apiVersion":"audit.k8s.io/v1",
"requestURI":"/apis/kms.gdc.goog/v1/namespaces/kms-test1/aeadkeys?fieldManager=kubectl-client-side-apply&fieldValidation=Strict",
"verb":"create",
"_gdch_service_name":"apiserver"
}
Istio
日志类型:数据平面。
包含审核信息的日志条目中的字段 |
审核元数据 |
审核字段名称 |
值 |
用户或服务身份 |
username |
例如,
"username":"fop-platform-admin@example.com"
|
目标
(调用 API 的字段和值)
|
resource |
"resource":{
"node_name":"sidecar~10.253.166.144~kms-backend-84f5c4f4c7-ncl4d.kms-system~kms-system.svc.cluster.local",
"cluster_name":"kms-backend.kms-system",
"zone_name":"europe-west4-b",
"log_name":"otel_envoy_accesslog"
}
|
操作
(包含所执行操作的字段)
|
path |
例如,
"path":"/goog.gdc.kms.v1.CryptoOperationsService/Encrypt"
|
活动时间戳 |
start_time |
例如,
"start_time":"2022-12-08T04:03:33.859Z"
|
操作来源 |
x_forwarded_for |
例如,
"x_forwarded_for":"10.253.165.123"
|
结果 |
response_code |
例如,
"response_code":"200"
|
其他字段 |
不适用 |
不适用 |
日志示例
{
"response_code":"200",
"response_code_details":"via_upstream",
"response_flags":"-",
"route_name":"default",
"severity_number":0,
"severity_text":"",
"start_time":"2022-12-08T04:03:33.859Z",
"_gdch_service_name":"istio",
"upstream_host":"10.253.166.144:8080",
"upstream_local_address":"127.0.0.6:54383",
"user_agent":"grpc-go/1.49.0",
"_gdch_service_tenant":"platform-obs",
"username":"fop-platform-admin@example.com",
"x_envoy_upstream_service_time":"104",
"x_forwarded_for":"10.253.165.123",
"x_goog_api_client":"-",
"x_request_id":"c11cbf94-765d-440d-9d36-56654d93d834",
"authority":"kms.org-1.zone1.google.gdch.test",
"bytes_received":"32756",
"body":{},
"upstream_transport_failure_reason":"-",
"bytes_sent":"0",
"downstream_local_address":"10.253.166.144:8080",
"downstream_remote_address":"10.253.165.123:0",
"duration":"318",
"method":"POST",
"observed_time_unix_nano":0,
"protocol":"HTTP/2",
"requested_server_name":"outbound_.8080_._.kms-backend.kms-system.svc.cluster.local",
"_gdch_namespace":"istio-system",
"path":"/goog.gdc.kms.v1.CryptoOperationsService/Encrypt",
"connection_termination_details":"-",
"time_unix_nano":1670472213859570944,
"upstream_cluster":"inbound|8080||",
"resource":{
"node_name":"sidecar~10.253.166.144~kms-backend-84f5c4f4c7-ncl4d.kms-system~kms-system.svc.cluster.local",
"cluster_name":"kms-backend.kms-system",
"zone_name":"europe-west4-b",
"log_name":"otel_envoy_accesslog"
},
"_gdch_cluster":"org-1-admin",
"_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-cr9h7"
}
服务器
日志类型:数据平面。
包含审核信息的日志条目中的字段 |
审核元数据 |
审核字段名称 |
值 |
用户或服务身份 |
message.user.identity |
例如,
"message":{"user":"{"identity":"fop-platform-admin@example.com"}}"
|
目标
(调用 API 的字段和值)
|
_gdch_service_name |
"_gdch_service_name":"kms-backend"
|
操作
(包含所执行操作的字段)
|
message.action |
例如,
"message":"{"action":"/goog.gdc.kms.v1.CryptoOperationsService/Encrypt"}"
|
活动时间戳 |
time |
例如,
"time":"2022-12-08T04:25:32.676604174Z"
|
操作来源 |
_gdch_cluster |
例如,
"_gdch_cluster":"org-1-admin"
|
结果 |
message.response |
例如,
"message":"{"response":"OK"}"
|
其他字段 |
message.description 字段包含完整的日志消息。 |
如需了解详情,请参阅示例日志。 |
日志示例
{
"pri":"46",
"time":"2023-05-30T20:58:25Z",
"host":"kms-backend-9dd54b666-jfp5v",
"ident":"/kms_bin",
"pid":"1",
"msgid":"audit-log",
"extradata":"-",
"message":"{\"time\":\"2023-08-01T18:04:00.458810232Z\",\"auditID\":\"6f848640-8af1-4659-b9c9-a358d19bea5f\",\"user\":{\"identity\":\"fop-platform-admin@example.com\"},\"resource\":\"namespaces/testnamespace/aeadKeys/testcryptokey\",\"action\":\"/goog.gdc.kms.v1.CryptoOperationsService/Decrypt\",\"description\":\"{\"duration_ms\":202}\",\"userAgent\":\"grpc-go/1.55.0\",\"response\":\"OK\",\"_gdch_service\":\"kms\"}",
"_gdch_org_name":"org-1",
"_gdch_org_id":"org-1.zone1.google.gdch.test",
"_gdch_cluster":"org-1-admin",
"_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-5lq2g",
"_gdch_service_name":"kms-backend",
"_gdch_tenant_id":"platform-obs"
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-09-04。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThis document outlines audit log details for organization-only workloads, sourcing logs from Service Mesh Envoy access logs and Kubernetes audit logs.\u003c/p\u003e\n"],["\u003cp\u003eAudited operations encompass the API server (control plane), Istio (data plane), and server (data plane), each with distinct log formats and information.\u003c/p\u003e\n"],["\u003cp\u003eThe API server audit logs include user identity, target resource, action performed, event timestamp, action source, and outcome, all available in fields such as \u003ccode\u003euser\u003c/code\u003e, \u003ccode\u003eobjectRef\u003c/code\u003e, and \u003ccode\u003everb\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIstio audit logs capture details like username, target resource, action path, event start time, source IP, and response code, found in fields like \u003ccode\u003eusername\u003c/code\u003e, \u003ccode\u003eresource\u003c/code\u003e, \u003ccode\u003epath\u003c/code\u003e, \u003ccode\u003estart_time\u003c/code\u003e, and \u003ccode\u003eresponse_code\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eServer audit logs provide user identity, target service name, action performed, event time, source cluster, and outcome, with information located in fields like \u003ccode\u003emessage.user.identity\u003c/code\u003e, \u003ccode\u003e_gdch_service_name\u003c/code\u003e, \u003ccode\u003emessage.action\u003c/code\u003e, and \u003ccode\u003emessage.response\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Key Management Service (KMS)\n\nAPI server\n----------\n\nLog type: Control plane.\n\n**Example log** \n\n {\n \"user\":{\n \"groups\":[\"system:authenticated\"],\n \"username\":\"fop-platform-admin@example.com\"\n },\n \"auditID\":\"bec33328-b4ba-431e-96a2-9bbb77666478\",\n \"_gdch_fluentbit_pod\":\"anthos-audit-logs-forwarder-wxw7t\",\n \"stage\":\"RequestReceived\",\n \"_gdch_cluster\":\"org-1-admin\",\n \"userAgent\":\"kubectl/v1.25.4 (linux/amd64) kubernetes/872a965\",\n \"kind\":\"Event\",\n \"level\":\"Metadata\",\n \"stageTimestamp\":\"2022-12-08T03:59:20.025703Z\",\n \"requestReceivedTimestamp\":\"2022-12-08T03:59:20.025703Z\",\n \"objectRef\":{\n \"resource\":\"aeadkeys\",\n \"apiGroup\":\"kms.gdc.goog\",\n \"apiVersion\":\"v1\",\n \"namespace\":\"kms-test1\"\n },\n \"sourceIPs\":[\n \"10.200.0.7\"\n ],\n \"apiVersion\":\"audit.k8s.io/v1\",\n \"requestURI\":\"/apis/kms.gdc.goog/v1/namespaces/kms-test1/aeadkeys?fieldManager=kubectl-client-side-apply&fieldValidation=Strict\",\n \"verb\":\"create\",\n \"_gdch_service_name\":\"apiserver\"\n }\n\nIstio\n-----\n\nLog type: Data plane.\n\n**Example log** \n\n {\n \"response_code\":\"200\",\n \"response_code_details\":\"via_upstream\",\n \"response_flags\":\"-\",\n \"route_name\":\"default\",\n \"severity_number\":0,\n \"severity_text\":\"\",\n \"start_time\":\"2022-12-08T04:03:33.859Z\",\n \"_gdch_service_name\":\"istio\",\n \"upstream_host\":\"10.253.166.144:8080\",\n \"upstream_local_address\":\"127.0.0.6:54383\",\n \"user_agent\":\"grpc-go/1.49.0\",\n \"_gdch_service_tenant\":\"platform-obs\",\n \"username\":\"fop-platform-admin@example.com\",\n \"x_envoy_upstream_service_time\":\"104\",\n \"x_forwarded_for\":\"10.253.165.123\",\n \"x_goog_api_client\":\"-\",\n \"x_request_id\":\"c11cbf94-765d-440d-9d36-56654d93d834\",\n \"authority\":\"kms.org-1.zone1.google.gdch.test\",\n \"bytes_received\":\"32756\",\n \"body\":{},\n \"upstream_transport_failure_reason\":\"-\",\n \"bytes_sent\":\"0\",\n \"downstream_local_address\":\"10.253.166.144:8080\",\n \"downstream_remote_address\":\"10.253.165.123:0\",\n \"duration\":\"318\",\n \"method\":\"POST\",\n \"observed_time_unix_nano\":0,\n \"protocol\":\"HTTP/2\",\n \"requested_server_name\":\"outbound_.8080_._.kms-backend.kms-system.svc.cluster.local\",\n \"_gdch_namespace\":\"istio-system\",\n \"path\":\"/goog.gdc.kms.v1.CryptoOperationsService/Encrypt\",\n \"connection_termination_details\":\"-\",\n \"time_unix_nano\":1670472213859570944,\n \"upstream_cluster\":\"inbound|8080||\",\n \"resource\":{\n \"node_name\":\"sidecar~10.253.166.144~kms-backend-84f5c4f4c7-ncl4d.kms-system~kms-system.svc.cluster.local\",\n \"cluster_name\":\"kms-backend.kms-system\",\n \"zone_name\":\"europe-west4-b\",\n \"log_name\":\"otel_envoy_accesslog\"\n },\n \"_gdch_cluster\":\"org-1-admin\",\n \"_gdch_fluentbit_pod\":\"anthos-audit-logs-forwarder-cr9h7\"\n }\n\nServer\n------\n\nLog type: Data plane.\n\n**Example log** \n\n {\n \"pri\":\"46\",\n \"time\":\"2023-05-30T20:58:25Z\",\n \"host\":\"kms-backend-9dd54b666-jfp5v\",\n \"ident\":\"/kms_bin\",\n \"pid\":\"1\",\n \"msgid\":\"audit-log\",\n \"extradata\":\"-\",\n \"message\":\"{\\\"time\\\":\\\"2023-08-01T18:04:00.458810232Z\\\",\\\"auditID\\\":\\\"6f848640-8af1-4659-b9c9-a358d19bea5f\\\",\\\"user\\\":{\\\"identity\\\":\\\"fop-platform-admin@example.com\\\"},\\\"resource\\\":\\\"namespaces/testnamespace/aeadKeys/testcryptokey\\\",\\\"action\\\":\\\"/goog.gdc.kms.v1.CryptoOperationsService/Decrypt\\\",\\\"description\\\":\\\"{\\\"duration_ms\\\":202}\\\",\\\"userAgent\\\":\\\"grpc-go/1.55.0\\\",\\\"response\\\":\\\"OK\\\",\\\"_gdch_service\\\":\\\"kms\\\"}\",\n \"_gdch_org_name\":\"org-1\",\n \"_gdch_org_id\":\"org-1.zone1.google.gdch.test\",\n \"_gdch_cluster\":\"org-1-admin\",\n \"_gdch_fluentbit_pod\":\"anthos-audit-logs-forwarder-5lq2g\",\n \"_gdch_service_name\":\"kms-backend\",\n \"_gdch_tenant_id\":\"platform-obs\"\n }"]]