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

Latest commit

 

History

History
34 lines (24 loc) · 1.2 KB

extra-impersonation-headers.md

File metadata and controls

34 lines (24 loc) · 1.2 KB

Extra Impersonation Headers

kube-oidc-proxy has support for adding 'extra' headers to the impersonation user info. This can be useful for passing extra information onto the target server about the proxy or client. kube-oidc-proxy currently supports two configuration options.

Client IP

The following flag can be passed which will append the remote client IP as an extra header:

--extra-user-header-client-ip

Proxied requests will then contain the header Impersonate-Extra-Remote-Client-Ip: <REMOTE_ADDR> where <REMOTE_ADDR> is the address of the source connection of the request. Note that this IP address may not be the real client IP address when the request is being proxied. If the X-Forwarded-For header is present in the request then the value will be used as the client address.

Extra User Headers

The following flag accepts a number of key value pairs that will be added as extra impersonation headers with proxied requests. This flag accepts a number of key value pairs, separated by commas, where a single key may have multiple values:

--extra-user-headers=key1=foo,key2=bar,key1=bar

Proxied requests will then contain the headers

Impersonate-Extra-Key1: foo,bar Impersonate-Extra-Key2: foo