Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 18fa393

Browse files
committed
Adds documentation for extra impersonation headers
Signed-off-by: JoshVanL <[email protected]>
1 parent 9724e2f commit 18fa393

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ go_lint: $(BINDIR)/golangci-lint ## lint golang code for problems
7676
clean: ## clean up created files
7777
rm -rf \
7878
$(BINDIR) \
79-
pkg/mocks/authenticator.go \
80-
demo/bin \
81-
test/e2e/framework/issuer/bin
79+
$(CURDIR)/pkg/mocks/authenticator.go \
80+
$(CURDIR)/demo/bin \
81+
$(CURDIR)/test/e2e/framework/issuer/bin \
82+
$(CURDIR)/test/e2e/framework/fake-apiserver/bin
8283

8384
verify: depend verify_boilerplate go_fmt go_vet go_lint ## verify code and mod
8485

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ users:
128128
## Configuration
129129
- [Token Passthrough](./docs/tasks/token-passthrough.md)
130130
- [No Impersonation](./docs/tasks/no-impersonation.md)
131+
- [Extra Impersonations Headers](./docs/tasks/extra-impersonation-headers.md)
131132

132133
## Development
133134
*NOTE*: building kube-oidc-proxy requires Go version 1.12 or higher.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Extra Impersonation Headers
2+
3+
kube-oidc-proxy has support for adding 'extra' headers to the impersonation user
4+
info. This can be useful for passing extra information onto the target server
5+
about the proxy or client. kube-oidc-proxy currently supports two configuration
6+
options.
7+
8+
# Client IP
9+
10+
The following flag can be passed which will append the remote client IP as an
11+
extra header:
12+
13+
`--extra-user-header-client-ip`
14+
15+
Proxied requests will then contain the header
16+
`Impersonate-Extra-Remote-Client-Ip: <REMOTE_ADDR>` where `<REMOTE_ADDR>` is
17+
the address of the client that made the request.
18+
19+
# Extra User Headers
20+
21+
The following flag accepts a number of key value pairs that will be added as
22+
extra impersonation headers with proxied requests. This flag accepts a number of
23+
key value pairs, separated by commas, where a single key may have multiple
24+
values:
25+
26+
`--extra-user-headers=key1=foo,key2=bar,key1=bar`
27+
28+
Proxied requests will then contain the headers
29+
30+
`Impersonate-Extra-Key1: foo,bar`
31+
`Impersonate-Extra-Key2: foo`

0 commit comments

Comments
 (0)