Skip to content

Commit 718be3d

Browse files
committed
Updated documentation accordingly
1 parent 6cb764f commit 718be3d

6 files changed

Lines changed: 37 additions & 18 deletions

File tree

docs/config.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,11 @@ <h2 id="action">Action</h2>
261261
<h2 id="authenticationconfiguration">AuthenticationConfiguration</h2>
262262
<p>Authentication configuration.</p>
263263
<table>
264+
<colgroup>
265+
<col style="width: 26%"/>
266+
<col style="width: 23%"/>
267+
<col style="width: 50%"/>
268+
</colgroup>
264269
<thead>
265270
<tr class="header">
266271
<th>Field</th>
@@ -280,26 +285,31 @@ <h2 id="authenticationconfiguration">AuthenticationConfiguration</h2>
280285
<td/>
281286
</tr>
282287
<tr class="odd">
288+
<td>skip_for_health_probes</td>
289+
<td>boolean</td>
290+
<td>Skip authorization for readiness and liveness probes</td>
291+
</tr>
292+
<tr class="even">
283293
<td>k8s_cluster_api</td>
284294
<td>string</td>
285295
<td/>
286296
</tr>
287-
<tr class="even">
297+
<tr class="odd">
288298
<td>k8s_ca_cert_path</td>
289299
<td>string</td>
290300
<td/>
291301
</tr>
292-
<tr class="odd">
302+
<tr class="even">
293303
<td>jwk_config</td>
294304
<td/>
295305
<td/>
296306
</tr>
297-
<tr class="even">
307+
<tr class="odd">
298308
<td>api_key_config</td>
299309
<td/>
300310
<td/>
301311
</tr>
302-
<tr class="odd">
312+
<tr class="even">
303313
<td>rh_identity_config</td>
304314
<td/>
305315
<td/>

docs/config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Authentication configuration.
7272
|-------|------|-------------|
7373
| module | string | |
7474
| skip_tls_verification | boolean | |
75+
| skip_for_health_probes | boolean | Skip authorization for readiness and liveness probes |
7576
| k8s_cluster_api | string | |
7677
| k8s_ca_cert_path | string | |
7778
| jwk_config | | |

docs/openapi.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4891,6 +4891,12 @@
48914891
"title": "Skip Tls Verification",
48924892
"default": false
48934893
},
4894+
"skip_for_health_probes": {
4895+
"type": "boolean",
4896+
"title": "Skip authentication for probes",
4897+
"description": "Skip authentication for readiness and liveness probes",
4898+
"default": false
4899+
},
48944900
"k8s_cluster_api": {
48954901
"anyOf": [
48964902
{
@@ -8858,4 +8864,4 @@
88588864
}
88598865
}
88608866
}
8861-
}
8867+
}

src/models/config.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -944,10 +944,10 @@ class AuthenticationConfiguration(ConfigurationBase):
944944
skip_tls_verification: bool = False
945945

946946
# LCORE-694: Config option to skip authorization for readiness and liveness probe
947-
skip_for_readiness_probe: bool = Field(
947+
skip_for_health_probes: bool = Field(
948948
False,
949-
title="Skip authentication for probes",
950-
description="Skip authentication for readiness and liveness probes",
949+
title="Skip authorization for probes",
950+
description="Skip authorization for readiness and liveness probes",
951951
)
952952
k8s_cluster_api: Optional[AnyHttpUrl] = None
953953
k8s_ca_cert_path: Optional[FilePath] = None
@@ -1525,7 +1525,9 @@ class Configuration(ConfigurationBase):
15251525
)
15261526

15271527
authentication: AuthenticationConfiguration = Field(
1528-
default_factory=AuthenticationConfiguration,
1528+
default_factory=lambda: AuthenticationConfiguration(
1529+
skip_for_health_probes=False
1530+
),
15291531
title="Authentication configuration",
15301532
description="Authentication configuration",
15311533
)

tests/unit/models/config/test_authentication_configuration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ def test_authentication_configuration() -> None:
3232
auth_config = AuthenticationConfiguration(
3333
module=AUTH_MOD_NOOP,
3434
skip_tls_verification=False,
35-
skip_for_readiness_probe=False,
35+
skip_for_health_probes=False,
3636
k8s_ca_cert_path=None,
3737
k8s_cluster_api=None,
3838
)
3939
assert auth_config is not None
4040
assert auth_config.module == AUTH_MOD_NOOP
4141
assert auth_config.skip_tls_verification is False
42-
assert auth_config.skip_for_readiness_probe is False
42+
assert auth_config.skip_for_health_probes is False
4343
assert auth_config.k8s_ca_cert_path is None
4444
assert auth_config.k8s_cluster_api is None
4545
assert auth_config.rh_identity_config is None
@@ -314,15 +314,15 @@ def test_authentication_configuration_skip_readiness_probe() -> None:
314314
authentication=AuthenticationConfiguration(
315315
module=AUTH_MOD_K8S,
316316
skip_tls_verification=True,
317-
skip_for_readiness_probe=True,
317+
skip_for_health_probes=True,
318318
k8s_ca_cert_path="tests/configuration/server.crt",
319319
k8s_cluster_api=None,
320320
),
321321
)
322322
assert cfg.authentication is not None
323323
assert cfg.authentication.module == AUTH_MOD_K8S
324324
assert cfg.authentication.skip_tls_verification is True
325-
assert cfg.authentication.skip_for_readiness_probe is True
325+
assert cfg.authentication.skip_for_health_probes is True
326326
assert cfg.authentication.k8s_ca_cert_path == Path("tests/configuration/server.crt")
327327
assert cfg.authentication.k8s_cluster_api is None
328328

tests/unit/models/config/test_dump_configuration.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def test_dump_configuration(tmp_path: Path) -> None:
152152
"authentication": {
153153
"module": "noop",
154154
"skip_tls_verification": False,
155-
"skip_for_readiness_probe": False,
155+
"skip_for_health_probes": False,
156156
"k8s_ca_cert_path": None,
157157
"k8s_cluster_api": None,
158158
"jwk_config": None,
@@ -462,7 +462,7 @@ def test_dump_configuration_with_quota_limiters(tmp_path: Path) -> None:
462462
"authentication": {
463463
"module": "noop",
464464
"skip_tls_verification": False,
465-
"skip_for_readiness_probe": False,
465+
"skip_for_health_probes": False,
466466
"k8s_ca_cert_path": None,
467467
"k8s_cluster_api": None,
468468
"jwk_config": None,
@@ -678,7 +678,7 @@ def test_dump_configuration_with_quota_limiters_different_values(
678678
"authentication": {
679679
"module": "noop",
680680
"skip_tls_verification": False,
681-
"skip_for_readiness_probe": False,
681+
"skip_for_health_probes": False,
682682
"k8s_ca_cert_path": None,
683683
"k8s_cluster_api": None,
684684
"jwk_config": None,
@@ -874,7 +874,7 @@ def test_dump_configuration_byok(tmp_path: Path) -> None:
874874
"authentication": {
875875
"module": "noop",
876876
"skip_tls_verification": False,
877-
"skip_for_readiness_probe": False,
877+
"skip_for_health_probes": False,
878878
"k8s_ca_cert_path": None,
879879
"k8s_cluster_api": None,
880880
"jwk_config": None,
@@ -1059,7 +1059,7 @@ def test_dump_configuration_pg_namespace(tmp_path: Path) -> None:
10591059
"authentication": {
10601060
"module": "noop",
10611061
"skip_tls_verification": False,
1062-
"skip_for_readiness_probe": False,
1062+
"skip_for_health_probes": False,
10631063
"k8s_ca_cert_path": None,
10641064
"k8s_cluster_api": None,
10651065
"jwk_config": None,

0 commit comments

Comments
 (0)