@@ -0,0 +1,637 @@
1+---
2+id: alpha-config
3+title: Alpha Configuration
4+---
5+
6+:::warning
7+This page contains documentation for alpha features.
8+We reserve the right to make breaking changes to the features detailed within this page with no notice.
9+
10+Options described in this page may be changed, removed, renamed or moved without prior warning.
11+Please beware of this before you use alpha configuration options.
12+:::
13+
14+This page details a set of **alpha** configuration options in a new format.
15+Going forward we are intending to add structured configuration in YAML format to
16+replace the existing TOML based configuration file and flags.
17+
18+Below is a reference for the structure of the configuration, with
19+[AlphaOptions](#alphaoptions) as the root of the configuration.
20+
21+When using alpha configuration, your config file will look something like below:
22+
23+```yaml
24+upstreams:
25+ - id: ...
26+ ...: ...
27+providers:
28+ - id: ...
29+ ...: ...
30+cookie:
31+ secret: ...
32+ ...: ...
33+injectRequestHeaders:
34+ - secretSource:
35+ ...: ...
36+injectResponseHeaders:
37+ - claimSource:
38+ ...: ...
39+```
40+
41+Please browse the [reference](#configuration-reference) below for the structure
42+of the new configuration format.
43+
44+# Migration Guide
45+
46+This section details breaking changes and migration steps for moving to the new
47+alpha configuration format.
48+
49+## Migrating header injections in v7.14.0
50+
51+From v7.14.0 onward, header injection sources must be explicitly nested. If you
52+previously relied on squashed fields, update to the new structure before
53+upgrading:
54+
55+```yaml
56+# before v7.14.0
57+injectRequestHeaders:
58+- name: X-Forwarded-User
59+ values:
60+ - claim: user
61+- name: X-Custom-Secret-header
62+ values:
63+ - value: my-super-secret
64+
65+# v7.14.0 and later
66+injectRequestHeaders:
67+- name: X-Forwarded-User
68+ values:
69+ - claimSource:
70+ claim: user
71+- name: X-Custom-Secret-header
72+ values:
73+ - secretSource:
74+ value: my-super-secret
75+```
76+
77+## Using Alpha Configuration
78+
79+To use the new **alpha** configuration, generate a YAML file based on the format
80+described in the [reference](#configuration-reference) below.
81+
82+Provide the path to this file using the `--alpha-config` flag.
83+
84+:::note
85+When using the `--alpha-config` flag, some options are no longer available.
86+See [removed options](#removed-options) below for more information.
87+:::
88+
89+### Converting configuration to the new structure
90+
91+Before adding the new `--alpha-config` option, start OAuth2 Proxy using the
92+`convert-config-to-alpha` flag to convert existing configuration to the new format.
93+
94+```bash
95+oauth2-proxy --convert-config-to-alpha --config ./path/to/existing/config.cfg
96+```
97+
98+This will convert any options supported by the new format to YAML and print the
99+new configuration to `STDOUT`.
100+
101+Copy this to a new file, remove any options from your existing configuration
102+noted in [removed options](#removed-options) and then start OAuth2 Proxy using
103+the new config.
104+
105+```bash
106+oauth2-proxy --alpha-config ./path/to/new/config.yaml --config ./path/to/existing/config.cfg
107+```
108+
109+### How to use environment variables
110+
111+The alpha package supports the use of environment variables in place of yaml values, allowing sensitive data to be pulled from somewhere other than the yaml file.
112+When using environment variables, your yaml will look like this:
113+
114+```yaml
115+ providers:
116+ - provider: azure
117+ clientSecret: ${CLIENT_SECRET}
118+ ...
119+```
120+Where CLIENT_SECRET is an environment variable.
121+More information and available patterns can be found [here](https://github.com/a8m/envsubst#docs)
122+
123+### How to inject custom headers
124+
125+Configure `injectRequestHeaders` and `injectResponseHeaders` in alpha config YAML.
126+
127+```yaml
128+injectRequestHeaders:
129+ - name: "X-User-Email"
130+ values:
131+ - claimSource:
132+ claim: "email" # extract the email claim contents from the id token
133+ - name: "X-Static-Secret"
134+ values:
135+ # secrets need to be encoded with base64 when directly in the yaml config but will be send decoded
136+ - secretSource:
137+ value: "c3VwZXItc2VjcmV0"
138+ - name: "X-Static-File-Secret"
139+ - secretSource:
140+ fromFile: "/path/to/my/secret"
141+ - name: "X-Static-Env-Secret"
142+ - secretSource:
143+ value: "${MY_SECRET_ENV}" # content still needs to be base64 encoded
144+injectResponseHeaders:
145+ # Following will result in a header "Authorization: Basic <user:password> (encoded)"
146+ - name: "Authorization"
147+ values:
148+ - claimSource:
149+ claim: user
150+ prefix: "Basic "
151+ basicAuthPassword:
152+ value: c3VwZXItc2VjcmV0LXBhc3N3b3Jk # base64 encoded password
153+```
154+
155+**Value sources:**
156+* `claimSource` - `claim` (session claims either from id token or from profile URL)
157+* `secretSource` - `value` (base64), `fromFile` (file path)
158+
159+**Request option:** `preserveRequestValue: true` retains existing header values
160+
161+**Incompatibility:** Remove legacy flags `pass-user-headers`, `set-xauthrequest`
162+
163+## Removed options
164+
165+The following flags/options and their respective environment variables are no
166+longer available when using alpha configuration:
167+
168+<!-- Legacy Upstream FlagSet -->
169+- `flush-interval`/`flush_interval`
170+- `pass-host-header`/`pass_host_header`
171+- `proxy-websockets`/`proxy_websockets`
172+- `ssl-upstream-insecure-skip-verify`/`ssl_upstream_insecure_skip_verify`
173+- `upstream`/`upstreams`
174+
175+<!-- Legacy Headers FlagSet -->
176+- `pass-basic-auth`/`pass_basic_auth`
177+- `pass-access-token`/`pass_access_token`
178+- `pass-user-headers`/`pass_user_headers`
179+- `pass-authorization-header`/`pass_authorization_header`
180+- `set-basic-auth`/`set_basic_auth`
181+- `set-xauthrequest`/`set_xauthrequest`
182+- `set-authorization-header`/`set_authorization_header`
183+- `prefer-email-to-user`/`prefer_email_to_user`
184+- `basic-auth-password`/`basic_auth_password`
185+- `skip-auth-strip-headers`/`skip_auth_strip_headers`
186+
187+<!-- Legacy provider FlagSet -->
188+- `client-id`/`client_id`
189+- `client-secret`/`client_secret`, and `client-secret-file`/`client_secret_file`
190+- `provider`
191+- `provider-display-name`/`provider_display_name`
192+- `provider-ca-file`/`provider_ca_files`
193+- `login-url`/`login_url`
194+- `redeem-url`/`redeem_url`
195+- `profile-url`/`profile_url`
196+- `resource`
197+- `validate-url`/`validate_url`
198+- `scope`
199+- `prompt`
200+- `approval-prompt`/`approval_prompt`
201+- `acr-values`/`acr_values`
202+- `user-id-claim`/`user_id_claim`
203+- `allowed-group`/`allowed_groups`
204+- `allowed-role`/`allowed_roles`
205+- `jwt-key`/`jwt_key`
206+- `jwt-key-file`/`jwt_key_file`
207+- `pubjwk-url`/`pubjwk_url`
208+
209+and all provider-specific options, i.e. any option whose name includes `oidc`,
210+`azure`, `bitbucket`, `github`, `gitlab`, `google` or `keycloak`. Attempting to
211+use any of these options via flags or via config when `--alpha-config` is
212+set will result in an error.
213+
214+:::important
215+You must remove these options before starting OAuth2 Proxy with `--alpha-config`
216+:::
217+
218+## Configuration Reference
219+
220+<!--- THIS FILE IS AUTOGENERATED!!! DO NOT EDIT!!! -->
221+
222+### ADFSOptions
223+
224+(**Appears on:** [Provider](#provider))
225+
226+
227+
228+| Field | Type | Description |
229+| ----- | ---- | ----------- |
230+| `skipScope` | _bool_ | Skip adding the scope parameter in login request<br/>Default value is 'false' |
231+
232+### AlphaOptions
233+
234+AlphaOptions contains alpha structured configuration options.
235+Usage of these options allows users to access alpha features that are not
236+available as part of the primary configuration structure for OAuth2 Proxy.
237+
238+:::warning
239+The options within this structure are considered alpha.
240+They may change between releases without notice.
241+:::
242+
243+| Field | Type | Description |
244+| ----- | ---- | ----------- |
245+| `upstreamConfig` | _[UpstreamConfig](#upstreamconfig)_ | UpstreamConfig is used to configure upstream servers.<br/>Once a user is authenticated, requests to the server will be proxied to<br/>these upstream servers based on the path mappings defined in this list. |
246+| `injectRequestHeaders` | _[[]Header](#header)_ | InjectRequestHeaders is used to configure headers that should be added<br/>to requests to upstream servers.<br/>Headers may source values from either the authenticated user's session<br/>or from a static secret value. |
247+| `injectResponseHeaders` | _[[]Header](#header)_ | InjectResponseHeaders is used to configure headers that should be added<br/>to responses from the proxy.<br/>This is typically used when using the proxy as an external authentication<br/>provider in conjunction with another proxy such as NGINX and its<br/>auth_request module.<br/>Headers may source values from either the authenticated user's session<br/>or from a static secret value. |
248+| `server` | _[Server](#server)_ | Server is used to configure the HTTP(S) server for the proxy application.<br/>You may choose to run both HTTP and HTTPS servers simultaneously.<br/>This can be done by setting the BindAddress and the SecureBindAddress simultaneously.<br/>To use the secure server you must configure a TLS certificate and key. |
249+| `metricsServer` | _[Server](#server)_ | MetricsServer is used to configure the HTTP(S) server for metrics.<br/>You may choose to run both HTTP and HTTPS servers simultaneously.<br/>This can be done by setting the BindAddress and the SecureBindAddress simultaneously.<br/>To use the secure server you must configure a TLS certificate and key. |
250+| `providers` | _[Providers](#providers)_ | Providers is used to configure your provider. **Multiple-providers is not<br/>yet working.** [This feature is tracked in<br/>#925](https://github.com/oauth2-proxy/oauth2-proxy/issues/926) |
251+
252+### AzureOptions
253+
254+(**Appears on:** [Provider](#provider))
255+
256+
257+
258+| Field | Type | Description |
259+| ----- | ---- | ----------- |
260+| `tenant` | _string_ | Tenant directs to a tenant-specific or common (tenant-independent) endpoint<br/>Default value is 'common' |
261+| `graphGroupField` | _string_ | GraphGroupField configures the group field to be used when building the groups list from Microsoft Graph<br/>Default value is 'id' |
262+
263+### BitbucketOptions
264+
265+(**Appears on:** [Provider](#provider))
266+
267+
268+
269+| Field | Type | Description |
270+| ----- | ---- | ----------- |
271+| `team` | _string_ | Team sets restrict logins to members of this team |
272+| `repository` | _string_ | Repository sets restrict logins to user with access to this repository |
273+
274+### ClaimSource
275+
276+(**Appears on:** [HeaderValue](#headervalue))
277+
278+ClaimSource allows loading a header value from a claim within the session
279+
280+| Field | Type | Description |
281+| ----- | ---- | ----------- |
282+| `claim` | _string_ | Claim is the name of the claim in the session that the value should be<br/>loaded from. Available claims: `access_token` `id_token` `created_at`<br/>`expires_on` `refresh_token` `email` `user` `groups` `preferred_username`. |
283+| `prefix` | _string_ | Prefix is an optional prefix that will be prepended to the value of the<br/>claim if it is non-empty. |
284+| `basicAuthPassword` | _[SecretSource](#secretsource)_ | BasicAuthPassword converts this claim into a basic auth header.<br/>Note the value of claim will become the basic auth username and the<br/>basicAuthPassword will be used as the password value. |
285+
286+### GitHubOptions
287+
288+(**Appears on:** [Provider](#provider))
289+
290+
291+
292+| Field | Type | Description |
293+| ----- | ---- | ----------- |
294+| `org` | _string_ | Org sets restrict logins to members of this organisation |
295+| `team` | _string_ | Team sets restrict logins to members of this team |
296+| `repo` | _string_ | Repo sets restrict logins to collaborators of this repository |
297+| `token` | _string_ | Token is the token to use when verifying repository collaborators<br/>it must have push access to the repository |
298+| `users` | _[]string_ | Users allows users with these usernames to login<br/>even if they do not belong to the specified org and team or collaborators |
299+
300+### GitLabOptions
301+
302+(**Appears on:** [Provider](#provider))
303+
304+
305+
306+| Field | Type | Description |
307+| ----- | ---- | ----------- |
308+| `group` | _[]string_ | Group sets restrict logins to members of this group |
309+| `projects` | _[]string_ | Projects restricts logins to members of these projects |
310+
311+### GoogleOptions
312+
313+(**Appears on:** [Provider](#provider))
314+
315+
316+
317+| Field | Type | Description |
318+| ----- | ---- | ----------- |
319+| `group` | _[]string_ | Groups sets restrict logins to members of this Google group |
320+| `adminEmail` | _string_ | AdminEmail is the Google admin to impersonate for api calls |
321+| `serviceAccountJson` | _string_ | ServiceAccountJSON is the path to the service account json credentials |
322+| `useApplicationDefaultCredentials` | _bool_ | UseApplicationDefaultCredentials is a boolean whether to use Application Default Credentials instead of a ServiceAccountJSON |
323+| `targetPrincipal` | _string_ | TargetPrincipal is the Google Service Account used for Application Default Credentials |
324+| `useOrganizationID` | _bool_ | UseOrganizationId indicates whether to use the organization ID as the UserName claim |
325+| `adminAPIUserScope` | _string_ | admin scope needed for fetching user organization information from admin api, can be one of cloud, user or defaults to readonly |
326+
327+### Header
328+
329+(**Appears on:** [AlphaOptions](#alphaoptions))
330+
331+Header represents an individual header that will be added to a request or
332+response header.
333+
334+| Field | Type | Description |
335+| ----- | ---- | ----------- |
336+| `name` | _string_ | Name is the header name to be used for this set of values.<br/>Names should be unique within a list of Headers. |
337+| `preserveRequestValue` | _bool_ | PreserveRequestValue determines whether any values for this header<br/>should be preserved for the request to the upstream server.<br/>This option only applies to injected request headers.<br/>Defaults to false (headers that match this header will be stripped). |
338+| `InsecureSkipHeaderNormalization` | _bool_ | InsecureSkipHeaderNormalization disables normalizing the header name<br/>According to RFC 7230 Section 3.2 there aren't any rules about<br/>capitalization of header names, but the standard practice is to use<br/>Title-Case (e.g. X-Forwarded-For). By default, header names will be<br/>normalized to Title-Case and any incoming headers that match will be<br/>treated as the same header. Additionally underscores (_) in header names<br/>will be converted to dashes (-) when normalizing.<br/>Defaults to false (header names will be normalized). |
339+| `values` | _[[]HeaderValue](#headervalue)_ | Values contains the desired values for this header |
340+
341+### HeaderValue
342+
343+(**Appears on:** [Header](#header))
344+
345+HeaderValue represents a single header value and the sources that can
346+make up the header value
347+
348+| Field | Type | Description |
349+| ----- | ---- | ----------- |
350+| `value` | _[]byte_ | Value expects a base64 encoded string value. |
351+| `fromEnv` | _string_ | FromEnv expects the name of an environment variable. |
352+| `fromFile` | _string_ | FromFile expects a path to a file containing the secret value. |
353+| `claim` | _string_ | Claim is the name of the claim in the session that the value should be<br/>loaded from. Available claims: `access_token` `id_token` `created_at`<br/>`expires_on` `refresh_token` `email` `user` `groups` `preferred_username`. |
354+| `prefix` | _string_ | Prefix is an optional prefix that will be prepended to the value of the<br/>claim if it is non-empty. |
355+| `basicAuthPassword` | _[SecretSource](#secretsource)_ | BasicAuthPassword converts this claim into a basic auth header.<br/>Note the value of claim will become the basic auth username and the<br/>basicAuthPassword will be used as the password value. |
356+
357+### KeycloakOptions
358+
359+(**Appears on:** [Provider](#provider))
360+
361+
362+
363+| Field | Type | Description |
364+| ----- | ---- | ----------- |
365+| `groups` | _[]string_ | Group enables to restrict login to members of indicated group |
366+| `roles` | _[]string_ | Role enables to restrict login to users with role (only available when using the keycloak-oidc provider) |
367+
368+### LoginGovOptions
369+
370+(**Appears on:** [Provider](#provider))
371+
372+
373+
374+| Field | Type | Description |
375+| ----- | ---- | ----------- |
376+| `jwtKey` | _string_ | JWTKey is a private key in PEM format used to sign JWT, |
377+| `jwtKeyFile` | _string_ | JWTKeyFile is a path to the private key file in PEM format used to sign the JWT |
378+| `pubjwkURL` | _string_ | PubJWKURL is the JWK pubkey access endpoint |
379+
380+### LoginURLParameter
381+
382+(**Appears on:** [Provider](#provider))
383+
384+LoginURLParameter is the configuration for a single query parameter that
385+can be passed through from the `/oauth2/start` endpoint to the IdP login
386+URL. The "default" option specifies the default value or values (if any)
387+that will be passed to the IdP for this parameter, and "allow" is a list
388+of options for ways in which this parameter can be set or overridden via
389+the query string to `/oauth2/start`.
390+If _only_ a default is specified and no "allow" then the parameter is
391+effectively fixed - the default value will always be used and anything
392+passed to the start URL will be ignored. If _only_ "allow" is specified
393+but no default then the parameter will only be passed on to the IdP if
394+the caller provides it, and no value will be sent otherwise.
395+
396+Examples:
397+
398+# A parameter whose value is fixed
399+
400+```
401+name: organization
402+default:
403+- myorg
404+```
405+
406+A parameter that is not passed by default, but may be set to one of a
407+fixed set of values
408+
409+```
410+name: prompt
411+allow:
412+- value: login
413+- value: consent
414+- value: select_account
415+```
416+
417+A parameter that is passed by default but may be overridden by one of
418+a fixed set of values
419+
420+```
421+name: prompt
422+default: ["login"]
423+allow:
424+- value: consent
425+- value: select_account
426+```
427+
428+A parameter that may be overridden, but only by values that match a
429+regular expression. For example to restrict `login_hint` to email
430+addresses in your organization's domain:
431+
432+```
433+name: login_hint
434+allow:
435+- pattern: '^[^@]*@example\.com$'
436+# this allows at most one "@" sign, and requires "example.com" domain.
437+```
438+
439+Note that the YAML rules around exactly which characters are allowed
440+and/or require escaping in different types of string literals are
441+convoluted. For regular expressions the single quoted form is simplest
442+as backslash is not considered to be an escape character. Alternatively
443+use the "chomped block" format `|-`:
444+
445+```
446+ - pattern: |-
447+ ^[^@]*@example\.com$
448+
449+```
450+
451+The hyphen is important, a `|` block would have a trailing newline
452+character.
453+
454+| Field | Type | Description |
455+| ----- | ---- | ----------- |
456+| `name` | _string_ | Name specifies the name of the query parameter. |
457+| `default` | _[]string_ | _(Optional)_ Default specifies a default value or values that will be<br/>passed to the IdP if not overridden. |
458+| `allow` | _[[]URLParameterRule](#urlparameterrule)_ | _(Optional)_ Allow specifies rules about how the default (if any) may be<br/>overridden via the query string to `/oauth2/start`. Only<br/>values that match one or more of the allow rules will be<br/>forwarded to the IdP. |
459+
460+### MicrosoftEntraIDOptions
461+
462+(**Appears on:** [Provider](#provider))
463+
464+
465+
466+| Field | Type | Description |
467+| ----- | ---- | ----------- |
468+| `allowedTenants` | _[]string_ | AllowedTenants is a list of allowed tenants. In case of multi-tenant apps, incoming tokens are<br/>issued by different issuers and OIDC issuer verification needs to be disabled.<br/>When not specified, all tenants are allowed. Redundant for single-tenant apps<br/>(regular ID token validation matches the issuer). |
469+| `federatedTokenAuth` | _bool_ | FederatedTokenAuth enable oAuth2 client authentication with federated token projected<br/>by Entra Workload Identity plugin, instead of client secret. |
470+
471+### OIDCOptions
472+
473+(**Appears on:** [Provider](#provider))
474+
475+
476+
477+| Field | Type | Description |
478+| ----- | ---- | ----------- |
479+| `issuerURL` | _string_ | IssuerURL is the OpenID Connect issuer URL<br/>eg: https://accounts.google.com |
480+| `insecureAllowUnverifiedEmail` | _bool_ | InsecureAllowUnverifiedEmail prevents failures if an email address in an id_token is not verified<br/>default set to 'false' |
481+| `insecureSkipIssuerVerification` | _bool_ | InsecureSkipIssuerVerification skips verification of ID token issuers. When false, ID Token Issuers must match the OIDC discovery URL<br/>default set to 'false' |
482+| `insecureSkipNonce` | _bool_ | InsecureSkipNonce skips verifying the ID Token's nonce claim that must match<br/>the random nonce sent in the initial OAuth flow. Otherwise, the nonce is checked<br/>after the initial OAuth redeem & subsequent token refreshes.<br/>default set to 'true'<br/>Warning: In a future release, this will change to 'false' by default for enhanced security. |
483+| `skipDiscovery` | _bool_ | SkipDiscovery allows to skip OIDC discovery and use manually supplied Endpoints<br/>default set to 'false' |
484+| `jwksURL` | _string_ | JwksURL is the OpenID Connect JWKS URL<br/>eg: https://www.googleapis.com/oauth2/v3/certs |
485+| `publicKeyFiles` | _[]string_ | PublicKeyFiles is a list of paths pointing to public key files in PEM format to use<br/>for verifying JWT tokens |
486+| `emailClaim` | _string_ | EmailClaim indicates which claim contains the user email,<br/>default set to 'email' |
487+| `groupsClaim` | _string_ | GroupsClaim indicates which claim contains the user groups<br/>default set to 'groups' |
488+| `userIDClaim` | _string_ | UserIDClaim indicates which claim contains the user ID<br/>default set to 'email' |
489+| `audienceClaims` | _[]string_ | AudienceClaim allows to define any claim that is verified against the client id<br/>By default `aud` claim is used for verification. |
490+| `extraAudiences` | _[]string_ | ExtraAudiences is a list of additional audiences that are allowed<br/>to pass verification in addition to the client id. |
491+
492+### Provider
493+
494+(**Appears on:** [Providers](#providers))
495+
496+Provider holds all configuration for a single provider
497+
498+| Field | Type | Description |
499+| ----- | ---- | ----------- |
500+| `clientID` | _string_ | ClientID is the OAuth Client ID that is defined in the provider<br/>This value is required for all providers. |
501+| `clientSecret` | _string_ | ClientSecret is the OAuth Client Secret that is defined in the provider<br/>This value is required for all providers. |
502+| `clientSecretFile` | _string_ | ClientSecretFile is the name of the file<br/>containing the OAuth Client Secret, it will be used if ClientSecret is not set. |
503+| `keycloakConfig` | _[KeycloakOptions](#keycloakoptions)_ | KeycloakConfig holds all configurations for Keycloak provider. |
504+| `azureConfig` | _[AzureOptions](#azureoptions)_ | AzureConfig holds all configurations for Azure provider. |
505+| `microsoftEntraIDConfig` | _[MicrosoftEntraIDOptions](#microsoftentraidoptions)_ | MicrosoftEntraIDConfig holds all configurations for Entra ID provider. |
506+| `ADFSConfig` | _[ADFSOptions](#adfsoptions)_ | ADFSConfig holds all configurations for ADFS provider. |
507+| `bitbucketConfig` | _[BitbucketOptions](#bitbucketoptions)_ | BitbucketConfig holds all configurations for Bitbucket provider. |
508+| `githubConfig` | _[GitHubOptions](#githuboptions)_ | GitHubConfig holds all configurations for GitHubC provider. |
509+| `gitlabConfig` | _[GitLabOptions](#gitlaboptions)_ | GitLabConfig holds all configurations for GitLab provider. |
510+| `googleConfig` | _[GoogleOptions](#googleoptions)_ | GoogleConfig holds all configurations for Google provider. |
511+| `oidcConfig` | _[OIDCOptions](#oidcoptions)_ | OIDCConfig holds all configurations for OIDC provider<br/>or providers utilize OIDC configurations. |
512+| `loginGovConfig` | _[LoginGovOptions](#logingovoptions)_ | LoginGovConfig holds all configurations for LoginGov provider. |
513+| `id` | _string_ | ID should be a unique identifier for the provider.<br/>This value is required for all providers. |
514+| `provider` | _[ProviderType](#providertype)_ | Type is the OAuth provider<br/>must be set from the supported providers group,<br/>otherwise 'Google' is set as default |
515+| `name` | _string_ | Name is the providers display name<br/>if set, it will be shown to the users in the login page. |
516+| `caFiles` | _[]string_ | CAFiles is a list of paths to CA certificates that should be used when connecting to the provider.<br/>If not specified, the default Go trust sources are used instead |
517+| `useSystemTrustStore` | _bool_ | UseSystemTrustStore determines if your custom CA files and the system trust store are used<br/>If set to true, your custom CA files and the system trust store are used otherwise only your custom CA files. |
518+| `loginURL` | _string_ | LoginURL is the authentication endpoint |
519+| `loginURLParameters` | _[[]LoginURLParameter](#loginurlparameter)_ | LoginURLParameters defines the parameters that can be passed from the start URL to the IdP login URL |
520+| `authRequestResponseMode` | _string_ | AuthRequestResponseMode defines the response mode to request during authorization request |
521+| `redeemURL` | _string_ | RedeemURL is the token redemption endpoint |
522+| `profileURL` | _string_ | ProfileURL is the profile access endpoint |
523+| `skipClaimsFromProfileURL` | _bool_ | SkipClaimsFromProfileURL allows to skip request to Profile URL for resolving claims not present in id_token<br/>default set to 'false' |
524+| `resource` | _string_ | ProtectedResource is the resource that is protected (Azure AD and ADFS only) |
525+| `validateURL` | _string_ | ValidateURL is the access token validation endpoint |
526+| `scope` | _string_ | Scope is the OAuth scope specification |
527+| `allowedGroups` | _[]string_ | AllowedGroups is a list of restrict logins to members of this group |
528+| `code_challenge_method` | _string_ | The code challenge method |
529+| `backendLogoutURL` | _string_ | URL to call to perform backend logout, `{id_token}` would be replaced by the actual `id_token` if available in the session |
530+
531+### ProviderType
532+#### (`string` alias)
533+
534+(**Appears on:** [Provider](#provider))
535+
536+ProviderType is used to enumerate the different provider type options
537+Valid options are: adfs, azure, bitbucket, digitalocean facebook, github,
538+gitlab, google, keycloak, keycloak-oidc, linkedin, login.gov, nextcloud
539+and oidc.
540+
541+### Providers
542+
543+#### ([[]Provider](#provider) alias)
544+
545+(**Appears on:** [AlphaOptions](#alphaoptions))
546+
547+The provider can be selected using the `provider` configuration value, or
548+set in the [`providers` array using
549+AlphaConfig](https://oauth2-proxy.github.io/oauth2-proxy/configuration/alpha-config#providers).
550+However, [**the feature to implement multiple providers is not
551+complete**](https://github.com/oauth2-proxy/oauth2-proxy/issues/926).
552+
553+### SecretSource
554+
555+(**Appears on:** [ClaimSource](#claimsource), [HeaderValue](#headervalue), [TLS](#tls))
556+
557+SecretSource references an individual secret value.
558+Only one source within the struct should be defined at any time.
559+
560+| Field | Type | Description |
561+| ----- | ---- | ----------- |
562+| `value` | _[]byte_ | Value expects a base64 encoded string value. |
563+| `fromEnv` | _string_ | FromEnv expects the name of an environment variable. |
564+| `fromFile` | _string_ | FromFile expects a path to a file containing the secret value. |
565+
566+### Server
567+
568+(**Appears on:** [AlphaOptions](#alphaoptions))
569+
570+Server represents the configuration for an HTTP(S) server
571+
572+| Field | Type | Description |
573+| ----- | ---- | ----------- |
574+| `bindAddress` | _string_ | BindAddress is the address on which to serve traffic.<br/>Leave blank or set to "-" to disable. |
575+| `secureBindAddress` | _string_ | SecureBindAddress is the address on which to serve secure traffic.<br/>Leave blank or set to "-" to disable. |
576+| `tls` | _[TLS](#tls)_ | TLS contains the information for loading the certificate and key for the<br/>secure traffic and further configuration for the TLS server. |
577+
578+### TLS
579+
580+(**Appears on:** [Server](#server))
581+
582+TLS contains the information for loading a TLS certificate and key
583+as well as an optional minimal TLS version that is acceptable.
584+
585+| Field | Type | Description |
586+| ----- | ---- | ----------- |
587+| `key` | _[SecretSource](#secretsource)_ | Key is the TLS key data to use.<br/>Typically this will come from a file. |
588+| `cert` | _[SecretSource](#secretsource)_ | Cert is the TLS certificate data to use.<br/>Typically this will come from a file. |
589+| `minVersion` | _string_ | MinVersion is the minimal TLS version that is acceptable.<br/>E.g. Set to "TLS1.3" to select TLS version 1.3 |
590+| `cipherSuites` | _[]string_ | CipherSuites is a list of TLS cipher suites that are allowed.<br/>E.g.:<br/>- TLS_RSA_WITH_RC4_128_SHA<br/>- TLS_RSA_WITH_AES_256_GCM_SHA384<br/>If not specified, the default Go safe cipher list is used.<br/>List of valid cipher suites can be found in the [crypto/tls documentation](https://pkg.go.dev/crypto/tls#pkg-constants). |
591+
592+### URLParameterRule
593+
594+(**Appears on:** [LoginURLParameter](#loginurlparameter))
595+
596+URLParameterRule represents a rule by which query parameters
597+passed to the `/oauth2/start` endpoint are checked to determine whether
598+they are valid overrides for the given parameter passed to the IdP's
599+login URL. Either Value or Pattern should be supplied, not both.
600+
601+| Field | Type | Description |
602+| ----- | ---- | ----------- |
603+| `value` | _string_ | A Value rule matches just this specific value |
604+| `pattern` | _string_ | A Pattern rule gives a regular expression that must be matched by<br/>some substring of the value. The expression is _not_ automatically<br/>anchored to the start and end of the value, if you _want_ to restrict<br/>the whole parameter value you must anchor it yourself with `^` and `$`. |
605+
606+### Upstream
607+
608+(**Appears on:** [UpstreamConfig](#upstreamconfig))
609+
610+Upstream represents the configuration for an upstream server.
611+Requests will be proxied to this upstream if the path matches the request path.
612+
613+| Field | Type | Description |
614+| ----- | ---- | ----------- |
615+| `id` | _string_ | ID should be a unique identifier for the upstream.<br/>This value is required for all upstreams. |
616+| `path` | _string_ | Path is used to map requests to the upstream server.<br/>The closest match will take precedence and all Paths must be unique.<br/>Path can also take a pattern when used with RewriteTarget.<br/>Path segments can be captured and matched using regular experessions.<br/>Eg:<br/>- `^/foo$`: Match only the explicit path `/foo`<br/>- `^/bar/$`: Match any path prefixed with `/bar/`<br/>- `^/baz/(.*)$`: Match any path prefixed with `/baz` and capture the remaining path for use with RewriteTarget |
617+| `rewriteTarget` | _string_ | RewriteTarget allows users to rewrite the request path before it is sent to<br/>the upstream server (for an HTTP/HTTPS upstream) or mapped to the filesystem<br/>(for a `file:` upstream).<br/>Use the Path to capture segments for reuse within the rewrite target.<br/>Eg: With a Path of `^/baz/(.*)`, a RewriteTarget of `/foo/$1` would rewrite<br/>the request `/baz/abc/123` to `/foo/abc/123` before proxying to the<br/>upstream server. Or if the upstream were `file:///app`, a request for<br/>`/baz/info.html` would return the contents of the file `/app/foo/info.html`. |
618+| `uri` | _string_ | The URI of the upstream server. This may be an HTTP(S) server of a File<br/>based URL. It may include a path, in which case all requests will be served<br/>under that path.<br/>Eg:<br/>- http://localhost:8080<br/>- https://service.localhost<br/>- https://service.localhost/path<br/>- file://host/path<br/>If the URI's path is "/base" and the incoming request was for "/dir",<br/>the upstream request will be for "/base/dir". |
619+| `insecureSkipTLSVerify` | _bool_ | InsecureSkipTLSVerify will skip TLS verification of upstream HTTPS hosts.<br/>This option is insecure and will allow potential Man-In-The-Middle attacks<br/>between OAuth2 Proxy and the upstream server.<br/>Defaults to false. |
620+| `static` | _bool_ | Static will make all requests to this upstream have a static response.<br/>The response will have a body of "Authenticated" and a response code<br/>matching StaticCode.<br/>If StaticCode is not set, the response will return a 200 response. |
621+| `staticCode` | _int_ | StaticCode determines the response code for the Static response.<br/>This option can only be used with Static enabled. |
622+| `flushInterval` | _duration_ | FlushInterval is the period between flushing the response buffer when<br/>streaming response from the upstream.<br/>Defaults to 1 second. |
623+| `passHostHeader` | _bool_ | PassHostHeader determines whether the request host header should be proxied<br/>to the upstream server.<br/>Defaults to true. |
624+| `proxyWebSockets` | _bool_ | ProxyWebSockets enables proxying of websockets to upstream servers<br/>Defaults to true. |
625+| `timeout` | _duration_ | Timeout is the maximum duration the server will wait for a response from the upstream server.<br/>Defaults to 30 seconds. |
626+| `disableKeepAlives` | _bool_ | DisableKeepAlives disables HTTP keep-alive connections to the upstream server.<br/>Defaults to false. |
627+
628+### UpstreamConfig
629+
630+(**Appears on:** [AlphaOptions](#alphaoptions))
631+
632+UpstreamConfig is a collection of definitions for upstream servers.
633+
634+| Field | Type | Description |
635+| ----- | ---- | ----------- |
636+| `proxyRawPath` | _bool_ | ProxyRawPath will pass the raw url path to upstream allowing for urls<br/>like: "/%2F/" which would otherwise be redirected to "/" |
637+| `upstreams` | _[[]Upstream](#upstream)_ | Upstreams represents the configuration for the upstream servers.<br/>Requests will be proxied to this upstream if the path matches the request path. |