金鑰管理服務 (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"
}
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間: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"]],["上次更新時間: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 }"]]