git.iko.soy/typeable/oauth2-proxy
on master help sign in
doc: fix config validation formatting (#3386)

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

commitda9123f740d570374df9bf36ea66d3b94f712284 authorJan Larwig <jan@larwig.com> dateMon 23 Mar 2026, 16:05 (6 months ago) parent7bc4b5e
2 files changed+74−74
docs/docs/configuration/overview.md+37−37 docs/versioned_docs/version-7.15.x/configuration/overview.md+37−37
docs/docs/configuration/overview.md+37−37
@@ -72,43 +72,6 @@ An example [oauth2-proxy.cfg](https://github.com/oauth2-proxy/oauth2-proxy/blob/
7272| `--config-test` | test configuration and exit (for CI/CD validation) |
7373| `--version` | print version string |
7474
75−## Configuration Validation
76−
77−The `--config-test` flag validates your configuration file without starting the proxy server. This is useful for:
78−- **CI/CD pipelines**: Pre-deployment validation
79−- **Configuration management**: Testing before applying changes
80−- **Debugging**: Verifying syntax and required fields
81−
82−### Usage
83−
84−```bash
85−# Test legacy config
86−oauth2-proxy --config /etc/oauth2-proxy.cfg --config-test
87−
88−# Test alpha config
89−oauth2-proxy --config /etc/core.cfg --alpha-config /etc/alpha.yaml --config-test
90−
91−# CI/CD pre-deployment check
92−# Returns with exit code 1 if any validation errors occur
93−oauth2-proxy --config new-config.cfg --config-test
94−```
95−
96−### Exit Codes
97−
98−- **0**: Configuration is valid ✅
99−- **1**: Configuration is invalid (errors printed to stderr) ❌
100−
101−### Validation Coverage
102−
103−The `--config-test` flag performs the **same comprehensive validation** as normal startup, including:
104−- Required fields (client ID, client secret, cookie secret, etc.)
105−- Syntax validation (TOML/YAML parsing)
106−- Provider configuration
107−- Upstream server definitions
108−- Session store connectivity (e.g., Redis network checks if configured)
109−
110−**Note**: Cannot be combined with `--convert-config-to-alpha`.
111−
11275### General Provider Options
11376
11477Provider specific options can be found on their respective subpages.
@@ -305,6 +268,43 @@ Provider specific options can be found on their respective subpages.
305268| flag: `--upstream-timeout`<br/>toml: `upstream_timeout` | duration | maximum amount of time the server will wait for a response from the upstream | 30s |
306269| flag: `--upstream`<br/>toml: `upstreams` | string \| list | the http url(s) of the upstream endpoint, file:// paths for static files or `static://<status_code>` for static response. Routing is based on the path | |
307270
271+## Configuration Validation
272+
273+The `--config-test` flag validates your configuration file without starting the proxy server. This is useful for:
274+- **CI/CD pipelines**: Pre-deployment validation
275+- **Configuration management**: Testing before applying changes
276+- **Debugging**: Verifying syntax and required fields
277+
278+### Usage
279+
280+```bash
281+# Test legacy config
282+oauth2-proxy --config /etc/oauth2-proxy.cfg --config-test
283+
284+# Test alpha config
285+oauth2-proxy --config /etc/core.cfg --alpha-config /etc/alpha.yaml --config-test
286+
287+# CI/CD pre-deployment check
288+# Returns with exit code 1 if any validation errors occur
289+oauth2-proxy --config new-config.cfg --config-test
290+```
291+
292+### Exit Codes
293+
294+- **0**: Configuration is valid ✅
295+- **1**: Configuration is invalid (errors printed to stderr) ❌
296+
297+### Validation Coverage
298+
299+The `--config-test` flag performs the **same comprehensive validation** as normal startup, including:
300+- Required fields (client ID, client secret, cookie secret, etc.)
301+- Syntax validation (TOML/YAML parsing)
302+- Provider configuration
303+- Upstream server definitions
304+- Session store connectivity (e.g., Redis network checks if configured)
305+
306+**Note**: Cannot be combined with `--convert-config-to-alpha`.
307+
308308## Upstreams Configuration
309309
310310`oauth2-proxy` supports having multiple upstreams, and has the option to pass requests on to HTTP(S) servers, unix socket or serve static files from the file system.
docs/versioned_docs/version-7.15.x/configuration/overview.md+37−37
@@ -72,43 +72,6 @@ An example [oauth2-proxy.cfg](https://github.com/oauth2-proxy/oauth2-proxy/blob/
7272| `--config-test` | test configuration and exit (for CI/CD validation) |
7373| `--version` | print version string |
7474
75−## Configuration Validation
76−
77−The `--config-test` flag validates your configuration file without starting the proxy server. This is useful for:
78−- **CI/CD pipelines**: Pre-deployment validation
79−- **Configuration management**: Testing before applying changes
80−- **Debugging**: Verifying syntax and required fields
81−
82−### Usage
83−
84−```bash
85−# Test legacy config
86−oauth2-proxy --config /etc/oauth2-proxy.cfg --config-test
87−
88−# Test alpha config
89−oauth2-proxy --config /etc/core.cfg --alpha-config /etc/alpha.yaml --config-test
90−
91−# CI/CD pre-deployment check
92−# Returns with exit code 1 if any validation errors occur
93−oauth2-proxy --config new-config.cfg --config-test
94−```
95−
96−### Exit Codes
97−
98−- **0**: Configuration is valid ✅
99−- **1**: Configuration is invalid (errors printed to stderr) ❌
100−
101−### Validation Coverage
102−
103−The `--config-test` flag performs the **same comprehensive validation** as normal startup, including:
104−- Required fields (client ID, client secret, cookie secret, etc.)
105−- Syntax validation (TOML/YAML parsing)
106−- Provider configuration
107−- Upstream server definitions
108−- Session store connectivity (e.g., Redis network checks if configured)
109−
110−**Note**: Cannot be combined with `--convert-config-to-alpha`.
111−
11275### General Provider Options
11376
11477Provider specific options can be found on their respective subpages.
@@ -305,6 +268,43 @@ Provider specific options can be found on their respective subpages.
305268| flag: `--upstream-timeout`<br/>toml: `upstream_timeout` | duration | maximum amount of time the server will wait for a response from the upstream | 30s |
306269| flag: `--upstream`<br/>toml: `upstreams` | string \| list | the http url(s) of the upstream endpoint, file:// paths for static files or `static://<status_code>` for static response. Routing is based on the path | |
307270
271+## Configuration Validation
272+
273+The `--config-test` flag validates your configuration file without starting the proxy server. This is useful for:
274+- **CI/CD pipelines**: Pre-deployment validation
275+- **Configuration management**: Testing before applying changes
276+- **Debugging**: Verifying syntax and required fields
277+
278+### Usage
279+
280+```bash
281+# Test legacy config
282+oauth2-proxy --config /etc/oauth2-proxy.cfg --config-test
283+
284+# Test alpha config
285+oauth2-proxy --config /etc/core.cfg --alpha-config /etc/alpha.yaml --config-test
286+
287+# CI/CD pre-deployment check
288+# Returns with exit code 1 if any validation errors occur
289+oauth2-proxy --config new-config.cfg --config-test
290+```
291+
292+### Exit Codes
293+
294+- **0**: Configuration is valid ✅
295+- **1**: Configuration is invalid (errors printed to stderr) ❌
296+
297+### Validation Coverage
298+
299+The `--config-test` flag performs the **same comprehensive validation** as normal startup, including:
300+- Required fields (client ID, client secret, cookie secret, etc.)
301+- Syntax validation (TOML/YAML parsing)
302+- Provider configuration
303+- Upstream server definitions
304+- Session store connectivity (e.g., Redis network checks if configured)
305+
306+**Note**: Cannot be combined with `--convert-config-to-alpha`.
307+
308308## Upstreams Configuration
309309
310310`oauth2-proxy` supports having multiple upstreams, and has the option to pass requests on to HTTP(S) servers, unix socket or serve static files from the file system.