조직 (ORG)

Google Distributed Cloud(GDC) 에어 갭 어플라이언스의 조직(ORG) 감사 로그를 사용하면 루트 관리자 클러스터 워크로드 전반에서 Kubernetes 리소스 모델(KRM) API 작업을 추적할 수 있습니다. Kubernetes 감사 로그는 조직 요청에 대한 호출자 ID, 대상 요청 URI, 작업 동사, 타임스탬프, 소스 IP 주소, 응답 상태, 승인 주석을 기록합니다.

워크로드 위치

루트 전용 워크로드

감사 로그 소스

Kubernetes 감사 로그

감사 대상 작업

KRM API 관리 영역에서 작업 수행

KRM API 관리 영역에서 작업 수행

감사 정보가 포함된 로그 항목의 필드
감사 메타데이터 감사 필드 이름 값
사용자 또는 서비스 ID user

예를 들면 다음과 같습니다.

"user":{"uid": "253b9e2f-fde2-4e37-ae7b-36a55d57aafb", "username": "system:serviceaccount: gatekeeper-system: gatekeeper-admin", "extra": {"authentication.kubernet es.io/pod-name": [ "gatekeeper-audit-7fd7bc5d97-x9x8b"], "authentication.kubernetes.io/pod-uid":["e62eaabc-2530-4c36-b793-a98b42c061eb"]}, "groups":["system: serviceaccounts", "system: serviceacc ounts: gatekeeper-system", "system: authenticated"]}

대상

(API를 호출하는 필드 및 값)

requestURI

예를 들면 다음과 같습니다.

"requestURI":"/apis/resourcemanager.gdc.goog/v1"

작업

(수행된 작업이 포함된 필드)

verb "verb":"list"
이벤트 타임스탬프 requestReceivedTimestamp

예를 들면 다음과 같습니다.

"requestReceivedTimestamp":"2022-12-06T23:05:22.586546Z"

조치 소스 sourceIPs

예를 들면 다음과 같습니다.

"sourceIPs":["10.200.0.4"]

결과 responseStatus

예를 들면 다음과 같습니다.

"responseStatus":{"code":200, "metadata":{}}

기타 필드 annotations

예를 들면 다음과 같습니다.

"annotations":{"authorization.k8s.io/decision": "allow","authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"gatekeeper-manager-rolebinding\" of ClusterRole \"gatekeeper-manager-role\" to ServiceAccount \"gatekeeper-admin/gatekeeper-system\""}

예시 로그

{
   "userAgent":"gatekeeper/v3.7.0 (linux/amd64) 3ba8e93/2021-11-15T20:59:44Z",
   "sourceIPs":[
      "10.200.0.4"
   ],
   "objectRef":{
      "apiGroup":"resourcemanager.gdc.goog",
      "resource":"organizations",
      "apiVersion":"v1alpha1"
   },
   "stageTimestamp":"2022-12-06T23:05:22.590986Z",
   "kind":"Event",
   "apiVersion":"audit.k8s.io/v1",
   "level":"Metadata",
   "auditID":"38da3a00-47b8-424f-8d63-d89258e2043e",
   "requestReceivedTimestamp":"2022-12-06T23:05:22.586546Z",
   "verb":"list",
   "_gdch_cluster":"root-admin",
   "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-2j85z",
   "stage":"ResponseComplete",
   "responseStatus":{
      "code":200,
      "metadata":{}
   },
   "user":{
      "uid":"253b9e2f-fde2-4e37-ae7b-36a55d57aafb",
      "username":"system:serviceaccount:gatekeeper-system:gatekeeper-admin",
      "extra":{
         "authentication.kubernet es.io/pod-name":[
            "gatekeeper-audit-7fd7bc5d97-x9x8b"
         ],
         "authentication.kubernetes.io/pod-uid":[
            "e62eaabc-2530-4c36-b793-a98b42c061eb"
         ]
      },
      "groups":[
         "system:serviceaccounts",
         "system:serviceaccounts:gatekeeper-system",
         "system: authenticated"
      ]
   },
   "requestURI":"/apis/resourcemanager.gdc.goog/v1alpha1/organizations?limit=500",
   "annotations":{
      "authorization.k8s.io/decision":"allow",
      "authorization.k8s.io/reason":"RBAC: allowed by ClusterRoleBinding \"gatekeeper-manager-rolebinding\" of ClusterRole \"gatekeeper-manager-role\" to ServiceAccount \"gatekeeper-admin/gatekeeper-system\""
   },
   "_gdch_service_name":"apiserver"
}