You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: let the guarded HTTP client trust other CAs #790
foca.utils.http.GuardedClient always verifies TLS with requests' default bundle (certifi): it passes verify=True and sets trust_env = False, so REQUESTS_CA_BUNDLE is ignored. Apps that talk to backends behind a private certificate authority (e.g., a test setup with its own CA, or an internal WES/TES behind a company CA) can't use the guarded client without patching it.
proWES (prowes#174) works around it by wrapping the guarded adapter's send() to pass verify=<bundle> — this depends on FOCA internals (session.adapters, the verify=True convention).
What to do
Add a ca_bundle: str | None = None argument to GuardedClient (file or directory, as for requests; None = public CAs), passed as verify=ca_bundle in request(); never allow verify=False.
Pass it through fetch_json() and the registry reads, optionally.
Tests with a local TLS server and its own CA; docs.
Done when
GuardedClient(ca_bundle=...) verifies with that bundle only; a missing file fails before sending (RequestNotSent).
proWES can drop its _GuardedHttp wrapper (follow-up there).
Activity