Skip to content

Commit

Permalink
feat: new configuration for Insights connection
Browse files Browse the repository at this point in the history
Add new configuration keys for connecting to the Insights services:
- their base URL
- the CA certificate/path to use to verify connections to them
- whether verify SSL connections to them

Signed-off-by: Pino Toscano <[email protected]>
  • Loading branch information
ptoscano committed Jul 11, 2024
1 parent 052d540 commit c131bd9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,21 @@ explanation of each key, with the type of its value:
fixture is returned. If not set, the value previous set in
`insights-client.conf` is not changed.

- `insights.base_url` (string)

The base URL to use for REST API calls to the various Insights services.

- `insights.ca_path` (boolean)

The default CA path/file to use for verifying the SSL connections to the
Insights services. To be able to use the system CA store, this setting must
be set to an empty string. Please note that this key is effectively used
only if `insights.insecure` is `true`.

- `insights.insecure` (boolean)

This specifies whether to disable the validation of the SSL certificate
of the Insights services.

[dynaconf]: https://www.dynaconf.com/ "Dynaconf"
[toml]: https://toml.io/ "TOML"
9 changes: 9 additions & 0 deletions pytest_client_tools/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ def __init__(self):
Validator("candlepin.environments", is_type_of=list),
Validator("insights.legacy_upload", is_type_of=bool),
Validator("insights.auto_update", is_type_of=bool),
Validator(
"insights.base_url",
default="https://cert-api.access.redhat.com/r/insights/platform",
),
Validator(
"insights.ca_path",
default="/etc/insights-client/cert-api.access.redhat.com.pem",
),
Validator("insights.insecure", is_type_of=bool, default=False),
)
self._settings.validators.validate()

Expand Down

0 comments on commit c131bd9

Please sign in to comment.