Skip to content

feat: let the guarded HTTP client trust other CAs #790

Closed

Description

@uniqueg

Problem

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

  1. added
    priority: medium
    status: triage
    type: feature
    workload: hours
    on Nov 18, 2026
  2. added
    status: in progress
    and removed
    status: triage
    on Nov 18, 2026
  3. self-assigned this
    on Nov 18, 2026
  4. moved this from Backlog to In progress in ELIXIR On-Cloud: Low Priorityon Nov 18, 2026
  5. moved this from In progress to In review in ELIXIR On-Cloud: Low Priorityon Nov 18, 2026
  6. removed
    status: in progress
    on Nov 18, 2026
  7. added this to the v0.23.0 milestone on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: mediumtype: featureworkload: hours

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions