kube-oidc-proxy is a reverse proxy to authenticate users to Kubernetes API servers with Open ID Connect Authentication.
Usage:
kube-oidc-proxy [flags]
Kube-OIDC-Proxy flags:
--disable-impersonation (Alpha) Disable the impersonation of authenticated requests. All authenticated requests will be forwarded as is.
--extra-user-header-client-ip (Alpha) If enabled, proxied requests will include the extra user header 'Impersonate-Extra-Remote-Client-IP: <REMOTE_ADDR>' where <REMOTE_ADDR> will contain the remote address of the source of the request.
--extra-user-headers stringToStringSlice (Alpha) A list of key value pairs of extra user headers to pass with proxied requests as part of the impersonated request. A single key can hold multiple values. (default [])
--flush-interval duration Specifies the interval to flush request bodies. If 0ms, no periodic flushing is done. A negative value means to flush immediately after each write. Streaming requests such as 'kubectl exec' will ignore this option and flush immediately. (default 50ms)
-P, --readiness-probe-port int Port to expose readiness probe. (default 8080)
--token-passthrough (Alpha) Requests with Bearer tokens that fail OIDC validation are tried against the API server using the Token Review endpoint. If successful, the request is sent on as is, with no impersonation.
--token-passthrough-audiences strings (Alpha) List of the identifiers that the resource server presented with the token identifies as. The resource server will verify that non OIDC tokens are intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver. Only used when --token-passthrough is also enabled.
OIDC flags:
--oidc-ca-file string The OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file, otherwise the host's root CA set will be used
--oidc-client-id string The client ID for the OpenID Connect client.
--oidc-groups-claim string If provided, the name of a custom OpenID Connect claim for specifying user groups. The claim value is expected to be a string or array of strings.
--oidc-groups-prefix string If provided, all groups will be prefixed with this value to prevent conflicts with other authentication strategies.
--oidc-issuer-url string The URL of the OpenID issuer, only HTTPS scheme will be accepted.
--oidc-required-claim mapStringString A key=value pair that describes a required claim in the ID Token. If set, the claim is verified to be present in the ID Token with a matching value. Repeat this flag to specify multiple claims.
--oidc-signing-algs strings Comma-separated list of allowed JOSE asymmetric signing algorithms. JWTs with a 'alg' header value not in this list will be rejected. Values are defined by RFC 7518 https://tools.ietf.org/html/rfc7518#section-3.1. (default [RS256])
--oidc-username-claim string The OpenID claim to use as the username. Note that claims other than the default ('sub') is not guaranteed to be unique and immutable (default "sub")
--oidc-username-prefix string If provided, all usernames will be prefixed with this value. If not provided, username claims other than 'email' are prefixed by the issuer URL to avoid clashes. To skip any prefixing, provide the value '-'.
Secure Serving flags:
--bind-address ip The IP address on which to listen for the --secure-port port. The associated interface(s) must be reachable by the rest of the cluster, and by CLI/web clients. If blank or an unspecified address (0.0.0.0 or ::), all interfaces and IP address families will be used. (default 0.0.0.0)
--cert-dir string The directory where the TLS certs are located. If --tls-cert-file and --tls-private-key-file are provided, this flag will be ignored. (default "/var/run/kubernetes")
--disable-http2-serving If true, HTTP2 serving will be disabled [default=false]
--http2-max-streams-per-connection int The limit that the server gives to clients for the maximum number of streams in an HTTP/2 connection. Zero means to use golang's default.
--permit-address-sharing If true, SO_REUSEADDR will be used when binding the port. This allows binding to wildcard IPs like 0.0.0.0 and specific IPs in parallel, and it avoids waiting for the kernel to release sockets in TIME_WAIT state. [default=false]
--permit-port-sharing If true, SO_REUSEPORT will be used when binding the port, which allows more than one instance to bind on the same address and port. [default=false]
--secure-port int The port on which to serve HTTPS with authentication and authorization. It cannot be switched off with 0. (default 6443)
--tls-cert-file string File containing the default x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If HTTPS serving is enabled, and --tls-cert-file and --tls-private-key-file are not provided, a self-signed certificate and key are generated for the public address and saved to the directory specified by --cert-dir.
--tls-cipher-suites strings Comma-separated list of cipher suites for the server. If omitted, the default Go cipher suites will be used.
Preferred values: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256.
Insecure values: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_RC4_128_SHA.
--tls-curve-preferences int32Slice Comma-separated list of numeric Go crypto/tls CurveID values, as the allowed key exchange mechanisms for the server. The supported values depend on the Go version used. See https://pkg.go.dev/crypto/tls#CurveID for values supported for each Go version. The order of the list is ignored, and key exchange mechanisms are chosen by Go from this list using an internal preference order. If omitted, the default Go curves will be used. (default [])
--tls-min-version string Minimum TLS version supported. Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13
--tls-private-key-file string File containing the default x509 private key matching --tls-cert-file.
--tls-sni-cert-key namedCertKey A pair of x509 certificate and private key file paths, optionally suffixed with a list of domain patterns which are fully qualified domain names, possibly with prefixed wildcard segments. The domain patterns also allow IP addresses, but IPs should only be used if the apiserver has visibility to the IP address requested by a client. If no domain patterns are provided, the names of the certificate are extracted. Non-wildcard matches trump over wildcard matches, explicit domain patterns trump over extracted names. For multiple key/certificate pairs, use the --tls-sni-cert-key multiple times. Examples: "example.crt,example.key" or "foo.crt,foo.key:*.foo.com,foo.com". (default [])
Audit flags:
--audit-log-batch-buffer-size int The size of the buffer to store events before batching and writing. Only used in batch mode. (default 10000)
--audit-log-batch-max-size int The maximum size of a batch. Only used in batch mode. (default 1)
--audit-log-batch-max-wait duration The amount of time to wait before force writing the batch that hadn't reached the max size. Only used in batch mode.
--audit-log-batch-throttle-burst int Maximum number of requests sent at the same moment if ThrottleQPS was not utilized before. Only used in batch mode.
--audit-log-batch-throttle-enable Whether batching throttling is enabled. Only used in batch mode.
--audit-log-batch-throttle-qps float32 Maximum average number of batches per second. Only used in batch mode.
--audit-log-compress If set, the rotated log files will be compressed using gzip.
--audit-log-format string Format of saved audits. "legacy" indicates 1-line text format for each event. "json" indicates structured json format. Known formats are legacy,json. (default "json")
--audit-log-maxage int The maximum number of days to retain old audit log files based on the timestamp encoded in their filename. Setting a value of 0 means old audit log files are not removed based on age. (default 366)
--audit-log-maxbackup int The maximum number of old audit log files to retain. Setting a value of 0 will mean there's no restriction on the number of files. (default 100)
--audit-log-maxsize int The maximum size in megabytes of the audit log file before it gets rotated. Setting to 0 disables rotation (not recommended). (default 100)
--audit-log-mode string Strategy for sending audit events. Blocking indicates sending events should block server responses. Batch causes the backend to buffer and write events asynchronously. Known modes are batch,blocking,blocking-strict. (default "blocking")
--audit-log-path string If set, all requests coming to the apiserver will be logged to this file. '-' means standard out.
--audit-log-truncate-enabled Whether event and batch truncating is enabled.
--audit-log-truncate-max-batch-size int Maximum size of the batch sent to the underlying backend. Actual serialized size can be several hundreds of bytes greater. If a batch exceeds this limit, it is split into several batches of smaller size. (default 10485760)
--audit-log-truncate-max-event-size int Maximum size of the audit event sent to the underlying backend. If the size of an event is greater than this number, first request and response are removed, and if this doesn't reduce the size enough, event is discarded. (default 102400)
--audit-log-version string API group and version used for serializing audit events written to log. (default "audit.k8s.io/v1")
--audit-policy-file string Path to the file that defines the audit policy configuration.
--audit-webhook-batch-buffer-size int The size of the buffer to store events before batching and writing. Only used in batch mode. (default 10000)
--audit-webhook-batch-max-size int The maximum size of a batch. Only used in batch mode. (default 400)
--audit-webhook-batch-max-wait duration The amount of time to wait before force writing the batch that hadn't reached the max size. Only used in batch mode. (default 30s)
--audit-webhook-batch-throttle-burst int Maximum number of requests sent at the same moment if ThrottleQPS was not utilized before. Only used in batch mode. (default 15)
--audit-webhook-batch-throttle-enable Whether batching throttling is enabled. Only used in batch mode. (default true)
--audit-webhook-batch-throttle-qps float32 Maximum average number of batches per second. Only used in batch mode. (default 10)
--audit-webhook-config-file string Path to a kubeconfig formatted file that defines the audit webhook configuration.
--audit-webhook-initial-backoff duration The amount of time to wait before retrying the first failed request. (default 10s)
--audit-webhook-mode string Strategy for sending audit events. Blocking indicates sending events should block server responses. Batch causes the backend to buffer and write events asynchronously. Known modes are batch,blocking,blocking-strict. (default "batch")
--audit-webhook-truncate-enabled Whether event and batch truncating is enabled.
--audit-webhook-truncate-max-batch-size int Maximum size of the batch sent to the underlying backend. Actual serialized size can be several hundreds of bytes greater. If a batch exceeds this limit, it is split into several batches of smaller size. (default 10485760)
--audit-webhook-truncate-max-event-size int Maximum size of the audit event sent to the underlying backend. If the size of an event is greater than this number, first request and response are removed, and if this doesn't reduce the size enough, event is discarded. (default 102400)
--audit-webhook-version string API group and version used for serializing audit events written to webhook. (default "audit.k8s.io/v1")
Client flags:
--as-uid string UID to impersonate for the operation.
--as-user-extra stringArray User extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--disable-compression If true, opt-out of response compression for all requests to the server
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kube-client-burst int Sets the burst on the app kubernetes client, this will configure throttling on requests sent to the apiserver(If not set, it will use client default ones)
--kube-client-qps float32 Sets the QPS on the app kubernetes client, this will configure throttling on requests sent to the apiserver (If not set, it will use client default ones)
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
-n, --namespace string If present, the namespace scope for this CLI request
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
-s, --server string The address and port of the Kubernetes API server
--tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
Misc flags:
-h, --help help for kube-oidc-proxy
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
-v, --v Level number for the log level verbosity
--version Print version information and quit
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging (only works for the default text log format)
Options (83)
| Option | Description | Source |
|---|---|---|
--disable-impersonation | (Alpha) Disable the impersonation of authenticated requests. | help |
--extra-user-header-client-ip | (Alpha) If enabled, proxied requests will include the extra user header 'Impersonate-Extra-Remote-Client-IP: <REMOTE_ADDR>' where <REMOTE_ADDR> will contain the remote address of the source of the… | help |
--extra-user-headers stringToStringSlice | (Alpha) A list of key value pairs of extra user headers to pass with proxied requests as part of the impersonated request. | help |
--flush-interval duration | Specifies the interval to flush request bodies. | help |
-P, --readiness-probe-port int | Port to expose readiness probe. | help |
--token-passthrough | (Alpha) Requests with Bearer tokens that fail OIDC validation are tried against the API server using the Token Review endpoint. | help |
--token-passthrough-audiences strings | (Alpha) List of the identifiers that the resource server presented with the token identifies as. | help |
--oidc-ca-file string | The OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file, otherwise the host's root CA set will be used | help |
--oidc-client-id string | The client ID for the OpenID Connect client. | help |
--oidc-groups-claim string | If provided, the name of a custom OpenID Connect claim for specifying user groups. | help |
--oidc-groups-prefix string | If provided, all groups will be prefixed with this value to prevent conflicts with other authentication strategies. | help |
--oidc-issuer-url string | The URL of the OpenID issuer, only HTTPS scheme will be accepted. | help |
--oidc-required-claim mapStringString | A key=value pair that describes a required claim in the ID Token. | help |
--oidc-signing-algs strings | Comma-separated list of allowed JOSE asymmetric signing algorithms. | help |
--oidc-username-claim string | The OpenID claim to use as the username. | help |
--oidc-username-prefix string | If provided, all usernames will be prefixed with this value. | help |
--bind-address ip | The IP address on which to listen for the --secure-port port. | help |
--cert-dir string | The directory where the TLS certs are located. | help |
--disable-http2-serving | If true, HTTP2 serving will be disabled [default=false] | help |
--http2-max-streams-per-connection int | The limit that the server gives to clients for the maximum number of streams in an HTTP/2 connection. | help |
--permit-address-sharing | If true, SO_REUSEADDR will be used when binding the port. | help |
--permit-port-sharing | If true, SO_REUSEPORT will be used when binding the port, which allows more than one instance to bind on the same address and port. | help |
--secure-port int | The port on which to serve HTTPS with authentication and authorization. | help |
--tls-cert-file string | File containing the default x509 Certificate for HTTPS. | help |
--tls-cipher-suites strings | Comma-separated list of cipher suites for the server. | help |
--tls-curve-preferences int32Slice | Comma-separated list of numeric Go crypto/tls CurveID values, as the allowed key exchange mechanisms for the server. | help |
--tls-min-version string | Minimum TLS version supported. | help |
--tls-private-key-file string | File containing the default x509 private key matching --tls-cert-file. | help |
--tls-sni-cert-key namedCertKey | A pair of x509 certificate and private key file paths, optionally suffixed with a list of domain patterns which are fully qualified domain names, possibly with prefixed wildcard segments. | help |
--audit-log-batch-buffer-size int | The size of the buffer to store events before batching and writing. | help |
--audit-log-batch-max-size int | The maximum size of a batch. | help |
--audit-log-batch-max-wait duration | The amount of time to wait before force writing the batch that hadn't reached the max size. | help |
--audit-log-batch-throttle-burst int | Maximum number of requests sent at the same moment if ThrottleQPS was not utilized before. | help |
--audit-log-batch-throttle-enable | Whether batching throttling is enabled. | help |
--audit-log-batch-throttle-qps float32 | Maximum average number of batches per second. | help |
--audit-log-compress | If set, the rotated log files will be compressed using gzip. | help |
--audit-log-format string | Format of saved audits. | help |
--audit-log-maxage int | The maximum number of days to retain old audit log files based on the timestamp encoded in their filename. | help |
--audit-log-maxbackup int | The maximum number of old audit log files to retain. | help |
--audit-log-maxsize int | The maximum size in megabytes of the audit log file before it gets rotated. | help |
--audit-log-mode string | Strategy for sending audit events. | help |
--audit-log-path string | If set, all requests coming to the apiserver will be logged to this file. | help |
--audit-log-truncate-enabled | Whether event and batch truncating is enabled. | help |
--audit-log-truncate-max-batch-size int | Maximum size of the batch sent to the underlying backend. | help |
--audit-log-truncate-max-event-size int | Maximum size of the audit event sent to the underlying backend. | help |
--audit-log-version string | API group and version used for serializing audit events written to log. | help |
--audit-policy-file string | Path to the file that defines the audit policy configuration. | help |
--audit-webhook-batch-buffer-size int | The size of the buffer to store events before batching and writing. | help |
--audit-webhook-batch-max-size int | The maximum size of a batch. | help |
--audit-webhook-batch-max-wait duration | The amount of time to wait before force writing the batch that hadn't reached the max size. | help |
--audit-webhook-batch-throttle-burst int | Maximum number of requests sent at the same moment if ThrottleQPS was not utilized before. | help |
--audit-webhook-batch-throttle-enable | Whether batching throttling is enabled. | help |
--audit-webhook-batch-throttle-qps float32 | Maximum average number of batches per second. | help |
--audit-webhook-config-file string | Path to a kubeconfig formatted file that defines the audit webhook configuration. | help |
--audit-webhook-initial-backoff duration | The amount of time to wait before retrying the first failed request. | help |
--audit-webhook-mode string | Strategy for sending audit events. | help |
--audit-webhook-truncate-enabled | Whether event and batch truncating is enabled. | help |
--audit-webhook-truncate-max-batch-size int | Maximum size of the batch sent to the underlying backend. | help |
--audit-webhook-truncate-max-event-size int | Maximum size of the audit event sent to the underlying backend. | help |
--audit-webhook-version string | API group and version used for serializing audit events written to webhook. | help |
--as-uid string | UID to impersonate for the operation. | help |
--as-user-extra stringArray | User extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key. | help |
--certificate-authority string | Path to a cert file for the certificate authority | help |
--client-certificate string | Path to a client certificate file for TLS | help |
--client-key string | Path to a client key file for TLS | help |
--cluster string | The name of the kubeconfig cluster to use | help |
--context string | The name of the kubeconfig context to use | help |
--disable-compression | If true, opt-out of response compression for all requests to the server | help |
--insecure-skip-tls-verify | If true, the server's certificate will not be checked for validity. | help |
--kube-client-burst int | Sets the burst on the app kubernetes client, this will configure throttling on requests sent to the apiserver(If not set, it will use client default ones) | help |
--kube-client-qps float32 | Sets the QPS on the app kubernetes client, this will configure throttling on requests sent to the apiserver (If not set, it will use client default ones) | help |
--kubeconfig string | Path to the kubeconfig file to use for CLI requests. | help |
-n, --namespace string | If present, the namespace scope for this CLI request | help |
--request-timeout string | The length of time to wait before giving up on a single server request. | help |
-s, --server string | The address and port of the Kubernetes API server | help |
--tls-server-name string | Server name to use for server certificate validation. | help |
--token string | Bearer token for authentication to the API server | help |
--user string | The name of the kubeconfig user to use | help |
-h, --help | help for kube-oidc-proxy | help |
--log-flush-frequency duration | Maximum number of seconds between log flushes (default 5s) | help |
-v, --v Level | number for the log level verbosity | help |
--version | Print version information and quit | help |
--vmodule moduleSpec | comma-separated list of pattern=N settings for file-filtered logging (only works for the default text log format) | help |