Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #93438 from tallclair/audit-ips
Browse files Browse the repository at this point in the history
Document the sources for the sourceIPs audit log field

Kubernetes-commit: 0bbb617412e6c281e3a1ab9512457b86f8e2f20d
  • Loading branch information
k8s-publishing-bot committed Mar 29, 2022
2 parents d39da46 + 237dd38 commit 625cf21
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/apis/audit/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ type Event struct {
// +optional
ImpersonatedUser *authnv1.UserInfo
// Source IPs, from where the request originated and intermediate proxies.
// The source IPs are listed from (in order):
// 1. X-Forwarded-For request header IPs
// 2. X-Real-Ip header, if not present in the X-Forwarded-For list
// 3. The remote address for the connection, if it doesn't match the last
// IP in the list up to here (X-Forwarded-For or X-Real-Ip).
// Note: All but the last IP can be arbitrarily set by the client.
// +optional
SourceIPs []string
// UserAgent records the user agent string reported by the client.
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/audit/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pkg/apis/audit/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ type Event struct {
// +optional
ImpersonatedUser *authnv1.UserInfo `json:"impersonatedUser,omitempty" protobuf:"bytes,7,opt,name=impersonatedUser"`
// Source IPs, from where the request originated and intermediate proxies.
// The source IPs are listed from (in order):
// 1. X-Forwarded-For request header IPs
// 2. X-Real-Ip header, if not present in the X-Forwarded-For list
// 3. The remote address for the connection, if it doesn't match the last
// IP in the list up to here (X-Forwarded-For or X-Real-Ip).
// Note: All but the last IP can be arbitrarily set by the client.
// +optional
SourceIPs []string `json:"sourceIPs,omitempty" protobuf:"bytes,8,rep,name=sourceIPs"`
// UserAgent records the user agent string reported by the client.
Expand Down

0 comments on commit 625cf21

Please sign in to comment.