This commit is contained in:
ptux
2021-11-20 00:22:52 +09:00
parent 497a07f5f5
commit 3a7107afb1
@@ -11,47 +11,38 @@ Kubernetesの監査はクラスタ内の一連の行動を記録するセキュ
監査により、クラスタ管理者は以下の質問に答えることができます: 監査により、クラスタ管理者は以下の質問に答えることができます:
- what happened? - 何が起きたのか?
- when did it happen? - いつ起こったのか?
- who initiated it? - 誰がそれを始めたのか?
- on what did it happen? - 何のために起こったのか?
- where was it observed? - それはどこで観察されましたか?
- from where was it initiated? - それはどこから始まったのか?
- to where was it going? - それはどこへ向かっていたのか?
<!-- body --> <!-- body -->
Audit records begin their lifecycle inside the 監査記録は、そのライフサイクルを
[kube-apiserver](/docs/reference/command-line-tools-reference/kube-apiserver/) [kube-apiserver](/docs/reference/command-line-tools-reference/kube-apiserver/)コンポーネントの中で始まります。
component. Each request on each stage 各リクエストは、その実行の各段階でその実行の各段階で、監査イベントが生成されます。
of its execution generates an audit event, which is then pre-processed according to ポリシーに従って前処理され、バックエンドに書き込まれます。 ポリシーが何を記録するかを決定しを決定し、
a certain policy and written to a backend. The policy determines what's recorded バックエンドがその記録を永続化します。現在のバックエンドの実装はログファイルやWebhookなどがあります。
and the backends persist the records. The current backend implementations
include logs files and webhooks.
Each request can be recorded with an associated _stage_. The defined stages are: 各リクエストは関連する _stage_ で記録されます。
定義されたステージは以下の通りです:
- `RequestReceived` - The stage for events generated as soon as the audit - `RequestReceived` - 監査ハンドラーがリクエストを受信すると同時に生成されるイベントのステージ。
handler receives the request, and before it is delegated down the handler つまり、ハンドラーチェーンに委譲される前に生成されるイベントのステージです。
chain. - `ResponseStarted` - レスポンスヘッダーが送信された後、レスポンスボディが送信される前のステージです。
- `ResponseStarted` - Once the response headers are sent, but before the このステージは長時間実行されるリクエスト(watchなど)でのみ発生します。
response body is sent. This stage is only generated for long-running requests - `ResponseComplete` - レスポンスボディの送信が完了して、それ以上のバイトは送信されません。
(e.g. watch). - `Panic` - パニックが起きたときに発生するイベント。
- `ResponseComplete` - The response body has been completed and no more bytes
will be sent.
- `Panic` - Events generated when a panic occurred.
{{< note >}} {{< note >}}
The configuration of an [Audit Event configuration](/docs/reference/config-api/apiserver-audit.v1/#audit-k8s-io-v1-Event)の設定は[Event](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#event-v1-core)API オブジェクトとは異なります。
[Audit Event configuration](/docs/reference/config-api/apiserver-audit.v1/#audit-k8s-io-v1-Event)
is different from the
[Event](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#event-v1-core)
API object.
{{< /note >}} {{< /note >}}
The audit logging feature increases the memory consumption of the API server 監査ログ機能は、リクエストごとに監査に必要なコンテキストが保存されるため、APIサーバーのメモリ消費量が増加します。
because some context required for auditing is stored for each request. メモリの消費量は、監査ログ機能の設定によって異なります。
Memory consumption depends on the audit logging configuration.
## Audit policy ## Audit policy