git.iko.soy/typeable/oauth2-proxy
on master help sign in
doc: add changelog and migration guide for v7.14.0 alpha config changes

Signed-off-by: Jan Larwig <jan@larwig.com>

commit34c2712c99f0aef23240a276e9f7f6775269689f authorJan Larwig <jan@larwig.com> dateThu 15 Jan 2026, 11:46 (9 months ago) parent3124bf7
5 files changed+386−25
CHANGELOG.md+46−1 docs/docs/configuration/alpha_config.md+85−6 docs/docs/configuration/alpha_config.md.tmpl+85−6 docs/versioned_docs/version-7.14.x/configuration/alpha_config.md+85−6 docs/versioned_docs/version-7.14.x/configuration/alpha_config.md.tmpl+85−6
CHANGELOG.md+46−1
@@ -12,18 +12,63 @@
1212
1313## Release Highlights
1414
15+- 🕵️‍♀️ Vulnerabilities have been addressed
16+ - [CVE-2025-61729](https://access.redhat.com/security/cve/cve-2025-61729)
17+ - [CVE-2025-61727](https://access.redhat.com/security/cve/cve-2025-61727)
18+ - [CVE-2025-47914](https://access.redhat.com/security/cve/cve-2025-47914)
19+ - [CVE-2025-58181](https://access.redhat.com/security/cve/cve-2025-58181)
20+- 🗂️ Alpha Config YAML parsing revamped using mapstructure with custom decoders
21+- 🐛 Squashed some bugs
22+
1523## Important Notes
1624
25+This release introduces a breaking change for Alpha Config users and moves us significantly
26+closer to removing legacy configuration parameters, making the codebase of OAuth2 Proxy more
27+future proof and extensible.
28+
29+From v7.14.0 onward, header injection sources must be explicitly nested. If you
30+previously relied on squashed fields, update to the new structure before upgrading:
31+
32+```yaml
33+# before v7.14.0
34+injectRequestHeaders:
35+- name: X-Forwarded-User
36+ values:
37+ - claim: user
38+- name: X-Custom-Secret-header
39+ values:
40+ - value: my-super-secret
41+
42+# v7.14.0 and later
43+injectRequestHeaders:
44+- name: X-Forwarded-User
45+ values:
46+ - claimSource:
47+ claim: user
48+- name: X-Custom-Secret-header
49+ values:
50+ - secretSource:
51+ value: my-super-secret
52+```
53+
54+We are committed to Semantic Versioning and usually avoid breaking changes without a major version release.
55+Advancing Alpha Config toward its Beta stage required this exception, and even for the Alpha Config we try
56+to keep breaking changes in v7 to a minium. Thank you for understanding the need for this step to prepare
57+the project for future maintainability and future improvements like structured logging.
58+
1759## Breaking Changes
1860
61+- Alpha Config: header injection no longer supports squashed claim/secret sources; they must now be set explicitly (see example above).
62+
1963## Changes since v7.13.0
2064
21−- [#3290](https://github.com/oauth2-proxy/oauth2-proxy/pull/3290) fix: WebSocket proxy to respect PassHostHeader setting (@UnsignedLong)
65+- [#2628](https://github.com/oauth2-proxy/oauth2-proxy/pull/2628) feat(structured config): revamp of yaml parsing using mapstructure decoder and custom decoders (@tuunit)
2266- [#3197](https://github.com/oauth2-proxy/oauth2-proxy/pull/3197) fix: NewRemoteKeySet is not using DefaultHTTPClient (@rsrdesarrollo / @tuunit)
2367- [#3292](https://github.com/oauth2-proxy/oauth2-proxy/pull/3292) chore(deps): upgrade gomod and bump to golang v1.25.5 (@tuunit)
2468- [#3304](https://github.com/oauth2-proxy/oauth2-proxy/pull/3304) fix: added conditional so default is not always set and env vars are honored fixes 3303 (@pixeldrew)
2569- [#3264](https://github.com/oauth2-proxy/oauth2-proxy/pull/3264) fix: more aggressively truncate logged access_token (@MartinNowak / @tuunit)
2670- [#3267](https://github.com/oauth2-proxy/oauth2-proxy/pull/3267) fix: Session refresh handling in OIDC provider (@gysel)
71+- [#3290](https://github.com/oauth2-proxy/oauth2-proxy/pull/3290) fix: WebSocket proxy to respect PassHostHeader setting (@UnsignedLong)
2772
2873# V7.13.0
2974
docs/docs/configuration/alpha_config.md+85−6
@@ -24,17 +24,56 @@ When using alpha configuration, your config file will look something like below:
2424upstreams:
2525 - id: ...
2626 ...: ...
27−injectRequestHeaders:
28− - name: ...
27+providers:
28+ - id: ...
2929 ...: ...
30+cookie:
31+ secret: ...
32+ ...: ...
33+injectRequestHeaders:
34+ - secretSource:
35+ ...: ...
3036injectResponseHeaders:
31− - name: ...
32− ...: ...
37+ - claimSource:
38+ ...: ...
3339```
3440
3541Please browse the [reference](#configuration-reference) below for the structure
3642of the new configuration format.
3743
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+
3877## Using Alpha Configuration
3978
4079To use the new **alpha** configuration, generate a YAML file based on the format
@@ -67,9 +106,9 @@ the new config.
67106oauth2-proxy --alpha-config ./path/to/new/config.yaml --config ./path/to/existing/config.cfg
68107```
69108
70−## Using ENV variables in the alpha configuration
109+### How to use environment variables
71110
72−The alpha package supports the use of environment variables in place of yaml keys, allowing sensitive values to be pulled from somewhere other than the yaml file.
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.
73112When using environment variables, your yaml will look like this:
74113
75114```yaml
@@ -81,6 +120,46 @@ When using environment variables, your yaml will look like this:
81120Where CLIENT_SECRET is an environment variable.
82121More information and available patterns can be found [here](https://github.com/a8m/envsubst#docs)
83122
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+
84163## Removed options
85164
86165The following flags/options and their respective environment variables are no
docs/docs/configuration/alpha_config.md.tmpl+85−6
@@ -24,17 +24,56 @@ When using alpha configuration, your config file will look something like below:
2424upstreams:
2525 - id: ...
2626 ...: ...
27−injectRequestHeaders:
28− - name: ...
27+providers:
28+ - id: ...
2929 ...: ...
30+cookie:
31+ secret: ...
32+ ...: ...
33+injectRequestHeaders:
34+ - secretSource:
35+ ...: ...
3036injectResponseHeaders:
31− - name: ...
32− ...: ...
37+ - claimSource:
38+ ...: ...
3339```
3440
3541Please browse the [reference](#configuration-reference) below for the structure
3642of the new configuration format.
3743
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+
3877## Using Alpha Configuration
3978
4079To use the new **alpha** configuration, generate a YAML file based on the format
@@ -67,9 +106,9 @@ the new config.
67106oauth2-proxy --alpha-config ./path/to/new/config.yaml --config ./path/to/existing/config.cfg
68107```
69108
70−## Using ENV variables in the alpha configuration
109+### How to use environment variables
71110
72−The alpha package supports the use of environment variables in place of yaml keys, allowing sensitive values to be pulled from somewhere other than the yaml file.
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.
73112When using environment variables, your yaml will look like this:
74113
75114```yaml
@@ -81,6 +120,46 @@ When using environment variables, your yaml will look like this:
81120Where CLIENT_SECRET is an environment variable.
82121More information and available patterns can be found [here](https://github.com/a8m/envsubst#docs)
83122
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+
84163## Removed options
85164
86165The following flags/options and their respective environment variables are no
docs/versioned_docs/version-7.14.x/configuration/alpha_config.md+85−6
@@ -24,17 +24,56 @@ When using alpha configuration, your config file will look something like below:
2424upstreams:
2525 - id: ...
2626 ...: ...
27−injectRequestHeaders:
28− - name: ...
27+providers:
28+ - id: ...
2929 ...: ...
30+cookie:
31+ secret: ...
32+ ...: ...
33+injectRequestHeaders:
34+ - secretSource:
35+ ...: ...
3036injectResponseHeaders:
31− - name: ...
32− ...: ...
37+ - claimSource:
38+ ...: ...
3339```
3440
3541Please browse the [reference](#configuration-reference) below for the structure
3642of the new configuration format.
3743
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+
3877## Using Alpha Configuration
3978
4079To use the new **alpha** configuration, generate a YAML file based on the format
@@ -67,9 +106,9 @@ the new config.
67106oauth2-proxy --alpha-config ./path/to/new/config.yaml --config ./path/to/existing/config.cfg
68107```
69108
70−## Using ENV variables in the alpha configuration
109+### How to use environment variables
71110
72−The alpha package supports the use of environment variables in place of yaml keys, allowing sensitive values to be pulled from somewhere other than the yaml file.
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.
73112When using environment variables, your yaml will look like this:
74113
75114```yaml
@@ -81,6 +120,46 @@ When using environment variables, your yaml will look like this:
81120Where CLIENT_SECRET is an environment variable.
82121More information and available patterns can be found [here](https://github.com/a8m/envsubst#docs)
83122
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+
84163## Removed options
85164
86165The following flags/options and their respective environment variables are no
docs/versioned_docs/version-7.14.x/configuration/alpha_config.md.tmpl+85−6
@@ -24,17 +24,56 @@ When using alpha configuration, your config file will look something like below:
2424upstreams:
2525 - id: ...
2626 ...: ...
27−injectRequestHeaders:
28− - name: ...
27+providers:
28+ - id: ...
2929 ...: ...
30+cookie:
31+ secret: ...
32+ ...: ...
33+injectRequestHeaders:
34+ - secretSource:
35+ ...: ...
3036injectResponseHeaders:
31− - name: ...
32− ...: ...
37+ - claimSource:
38+ ...: ...
3339```
3440
3541Please browse the [reference](#configuration-reference) below for the structure
3642of the new configuration format.
3743
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+
3877## Using Alpha Configuration
3978
4079To use the new **alpha** configuration, generate a YAML file based on the format
@@ -67,9 +106,9 @@ the new config.
67106oauth2-proxy --alpha-config ./path/to/new/config.yaml --config ./path/to/existing/config.cfg
68107```
69108
70−## Using ENV variables in the alpha configuration
109+### How to use environment variables
71110
72−The alpha package supports the use of environment variables in place of yaml keys, allowing sensitive values to be pulled from somewhere other than the yaml file.
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.
73112When using environment variables, your yaml will look like this:
74113
75114```yaml
@@ -81,6 +120,46 @@ When using environment variables, your yaml will look like this:
81120Where CLIENT_SECRET is an environment variable.
82121More information and available patterns can be found [here](https://github.com/a8m/envsubst#docs)
83122
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+
84163## Removed options
85164
86165The following flags/options and their respective environment variables are no