Skip to content

Configurable TLS verification of the Egeria platform certificate - #530

Merged
dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:feat/configurable-ssl-verify
Nov 4, 2026
Merged

dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:feat/configurable-ssl-verify

Conversation

@dwolfson

@dwolfson dwolfson commented Nov 4, 2026

Copy link
Copy Markdown
Member

Summary

pyegeria has always created its httpx clients with verify=False (_globals.enable_ssl_check), so it never checked the Egeria platform's certificate. This PR makes that configurable, using the same layering as egeria_max_page_size:

Setting Env / .env config.json (Environment) Default
Verify the platform certificate PYEGERIA_SSL_VERIFY "Pyegeria SSL Verify" False
CA bundle (PEM) to trust instead of certifi's PYEGERIA_CA_BUNDLE "Pyegeria CA Bundle" empty
  • The default stays off, because the quickstart platforms use self-signed certificates.
  • Verification on with no bundle uses certifi (with the emSign G3 floor from 6.2.21).
  • Verification on with a bundle builds an SSLContext from that PEM file, so a self-signed platform can be verified with its own CA.
  • A bundle path that doesn't exist raises at import instead of silently falling back to unverified.
  • The clients read _globals.ssl_verify when they create a session, so programs can also set it in code. enable_ssl_check stays a bool.
  • Documented in config/README.md, with commented examples in config/env.

Test plan

  • New test_globals_ssl_verify.py: resolver, default, env on/off, CA bundle, env overriding config.json, and the value reaching httpx (12 tests)
  • micro-tests: 0 failed of 1799
  • Live, against a 6.3-SNAPSHOT quickstart: off connects; on refuses (CERTIFICATE_VERIFY_FAILED, self-signed); on with the platform's chain as the CA bundle connects
  • CI green

🤖 Generated with Claude Code

…ificate

pyegeria has always created its httpx clients with verify=False
(_globals.enable_ssl_check), so it never checked the Egeria platform's
certificate. It is now configurable, using the same layering as
egeria_max_page_size: PYEGERIA_SSL_VERIFY / PYEGERIA_CA_BUNDLE (env or
.env) override "Pyegeria SSL Verify" / "Pyegeria CA Bundle" under
Environment in config.json.

- Default stays off: the quickstart platforms use self-signed certificates.
- Verify on, no bundle: httpx checks against certifi, which has the
  emSign G3 floor from 6.2.21.
- Verify on with a bundle: an SSLContext that trusts that PEM file, e.g. the
  quickstart's own chain, to verify a self-signed platform.
- A bundle path that doesn't exist raises at import rather than silently
  falling back to unverified.

The three httpx client constructions read _globals.ssl_verify when a session
is created, so a program can also set it in code. enable_ssl_check stays a
bool for existing importers.

Verified live against a 6.3-SNAPSHOT quickstart platform: off connects;
on refuses with CERTIFICATE_VERIFY_FAILED (self-signed); on with the
platform's chain as the CA bundle connects. Micro-tests: 0 failed of 1799.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 5fbb984 into odpi:main Nov 4, 2026
6 checks passed
@dwolfson
dwolfson deleted the feat/configurable-ssl-verify branch November 4, 2026 22:14
dwolfson added a commit that referenced this pull request Nov 6, 2026
6.2.22 ships #530 (configurable TLS verification of the Egeria platform
certificate), #531 (overview metrics report unmeasured as None, not 0) and
#532 (native count switch no longer sticky, native counts honour the
client's time_out, count scope viewer/repository).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant