Skip to content

Decision: HTTP transport #9

Closed

Description

@somethingwithproof

Context

Every provider call goes through one transport. Cacti 1.2.31 requires ext-openssl but not ext-curl, and core already uses PHP's HTTPS stream wrapper in call_remote_data_collector(). The transport must verify certificates, refuse redirects, enforce connect and total timeouts and a response size cap, and expose status and headers.

Options

  • HTTPS stream wrapper with a stream context (proposed). No new extension; needs allow_url_fopen; headers through $http_response_header; size cap by chunked reads.
  • ext-curl. Mature and precise; an extension Cacti does not require, so check_config must refuse without it.
  • Raw stream_socket_client() with a minimal HTTP/1.1 client. No extension or ini requirement; the plugin owns an HTTP parser.

Decision criteria and owner

Decided by the transport spike (#24). Needed before milestone 2.

Outcome

Not decided. The outcome will be recorded here and under docs/decisions/.

References

Dependencies

Activity

  1. added
    type: decisionA choice between options that needs a recorded outcome
    area: transportOutbound HTTPS, allowlists, retries, and limits
    area: securityTrust boundaries, permissions, and secret safety
    priority: blockerStops its milestone until resolved
    on Nov 14, 2026
  2. somethingwithproof commented on Nov 15, 2026

    @somethingwithproof
    OwnerAuthor

    Decided in ADR 0009: HTTPS through stream_socket_client() with a small HTTP/1.1 reader, no allow_url_fopen and no ext-curl.

    The spike ran 27 cases against the stream wrapper, the socket client, and ext-curl on PHP 8.2 and 8.4. The socket client met all 54 checks. The stream wrapper cannot bound total time or header size and returns malformed or truncated chunked bodies as data; ext-curl is missing from stock Debian and Ubuntu installs, and libcurl 8.14.1 accepted conflicting Content-Length. Closed by #80.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compatibilityCacti, PHP, and extension supportarea: securityTrust boundaries, permissions, and secret safetyarea: transportOutbound HTTPS, allowlists, retries, and limitsphase: 0 researchMilestone 1 researchpriority: blockerStops its milestone until resolvedstatus: needs-evidenceDepends on a milestone 1 research resulttype: decisionA choice between options that needs a recorded outcome

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions