Skip to content

feat(platform): call any HTTPS API from an automation step - #4735

Merged
yannickmonney merged 17 commits into
mainfrom
feat/automation-http-nodes
Oct 10, 2026
Merged

yannickmonney merged 17 commits into
mainfrom
feat/automation-http-nodes

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Automations can now call any HTTPS API without an agent step. The new http connector adds two node types: http.get reads, and http.send writes (POST/PUT/PATCH/DELETE) behind approval like every write. This is P9 slice S1 of the automations program.

Security model (connectors spec CONN-R15–R18; each rule has tests that fail when its protection is removed):

  • Every request goes through safeFetch: DNS is pinned per hop, and private and cloud metadata addresses are refused. HTTP steps call public HTTPS addresses only. TALE_ALLOW_PRIVATE_PROVIDER_HOSTS is deliberately not reused, because an operator who admitted a local model server never meant to let automation authors reach intranet hosts.
  • A step without a credential carries none, never the org's default credential.
  • A credentialed step stays under its credential's base URL:
    • a path is placed under it, and a full address must start with it;
    • a redirect may not leave the host, and an answer whose redirects ended outside the base is refused;
    • a redirect to another port drops the signing header, including a custom API key header (new safeFetch option sensitiveHeaders).
  • Authorization, Cookie and the API key header come only from the credential; a step that sets them is refused.
  • The answer keeps an allowlist of headers, and the credential's values are scrubbed from everything handed back, failures included.
  • Answers over 1 MB are refused.
  • Budget: 120 calls a minute per org (new rate rule automation:http) and 10 at once per server process.

Pre-existing gap fixed along the way: a connector step's credential field was accepted by the validator but never read. Every live run acted as the org's default credential. The stepper now passes the named credential to the connector door and to the credential check it runs before an approval (CONN-R19). The automation shim also keeps a connector's own failure cause instead of flattening it.

Credentials reuse the existing bearer, API-key and basic methods, plus two config fields (baseUrl, apiKeyHeader). There is no migration and no new settings kind. A connector can now declare credential: optional (shared connector schema).

Failures and checks (en/de/fr, plus de-CH where needed):

  • Ten run failure reasons: HTTP_STATUS, HTTP_TIMEOUT, HTTP_UNREACHABLE, HTTP_BLOCKED_HOST, HTTP_OFF_ORIGIN, HTTP_URL_INVALID, HTTP_HEADER_RESERVED, HTTP_TOO_LARGE, HTTP_NOT_JSON, HTTP_RATE_LIMITED.
  • Editor and save checks:
    • HTTP_URL_NOT_HTTPS (warning);
    • HTTP_SECRET_IN_URL and HTTP_HEADER_RESERVED (errors);
    • CREDENTIAL_UNKNOWN (warning, any connector), with optional-credential connectors no longer flagged as "not connected".

Contract 3.31.0: StepFailure.reason gains the HTTP reasons, OpenAPI is regenerated, and the MCP fingerprint and skill snapshot are updated.

Docs (en/de/fr):

  • a new page, "Call an API from an automation";
  • the HTTP node types and checks on the concepts page;
  • an HTTP row and its default-credential exception in the connectors overview;
  • the steps' own budget on the rate-limits page.

The connectors spec gains CONN-R15–R19, and the manual layer gains AUTO-F123–F126 plus an error-map row.

Divergences from the design:

  • okStatuses exists on both actions.
  • There is no per-run secret set; the native scrubs its credential's values itself.
  • Bodies over 1 MB are refused rather than cut, because safeFetch refuses.
  • Private hosts are never reachable.
  • The credential check is general and a warning, following the org-state rule.

Checks run locally:

  • Platform tsc and oxlint on changed files.
  • Server suites: connectors, engine, net, i18n, MCP, shared, automations, stepper, REST, OpenAPI, guards.
  • UI suites for automations and connector settings; shared tests and typecheck; the docs suite.
  • lint:manual, lint:links, format check and knip.

Not proven here: live calls against a real API. Boxes AUTO-F123–F126 cover them, and DNS rebinding is tested through the real client with a stubbed resolver. A docs screenshot for the new page is still owed.

A connector can now declare its credential optional. A call that names no
credential then carries none, rather than the organization's default one,
and its native backend decides what such a call may reach. A call that
names a credential acts as it, as before.
Two node types for calling any HTTPS API: http.get reads, http.send writes
and waits for approval like every write. A credential holds the API's base
URL and signs the request with a bearer token, an API key in a header or a
username and password; a call without one reaches public hosts only. Both
actions run on a native backend; their mocks answer deterministically.
A connector step's credential field was accepted but never read: every live
run acted as the organization's default credential. The stepper now hands
the named credential to the connector door and to the credential check it
runs before an approval, and the check passes a step that names none on a
connector that needs none. A connector refusal that knows its cause in the
run record's words keeps it, instead of reading as a failed connector.
Ten failure reasons for the HTTP connector, each explained in English,
German and French: the status the API answered, a timeout, an address that
could not be reached, is not allowed, lies outside the credential's base
URL or cannot be called at all, a header that belongs to the credential, an
answer too large or not JSON, and too many calls at once. They count as
connector failures. The contract moves to 3.31.0.
The HTTP connector's native backend. Every request goes through the
platform's outbound client, so DNS is pinned and private and cloud metadata
addresses are refused; plain http reaches only a private host the
deployment admits. A credentialed call stays under its credential's base
URL, redirects included, and the credential alone signs it: the step may
not set Authorization, Cookie or the API key header. Answers keep an
allowlist of headers, larger than 1 MB are refused, and the credential's
values are scrubbed from everything handed back. An organization's steps
make at most 120 calls a minute across the deployment and 10 at once per
server process.
The editor and every save now warn about a plain http address a call
without a credential would refuse, and refuse a credential written into the
address or an Authorization or Cookie header set by the step, each with its
explanation and fix in English, German and French. A templated value is
left to the run.
…oes not exist

The editor and every save now warn when a connector step names a
credential its connector does not hold in service, matched by id or by
name whatever its case, with the closest name it has. A step that names
its credential is judged by that name, and a connector whose credential is
optional no longer counts as one that needs connecting. The HTTP rows say
deployment where they said installation, as the other rows do.
Five rules, each with an example and the tests that hold it: a call
without a credential carries none and reaches public HTTPS hosts only, a
credentialed call stays under its base URL, only the credential signs and
nothing handed back carries it, the organization's HTTP calls are bounded,
and a connector step acts as the credential it names.
Four boxes: a call without a credential and its plain-http refusal, a
credentialed call that stays under its base URL and never shows its token,
a send that waits for approval and refuses a step's own Authorization
header, and a credential name that does not exist. The error map says how
to provoke each HTTP failure, and the automation register names what the
tests already own.
The switch that admits private model-provider hosts no longer admits them
for HTTP steps too: an operator who allowed a local model server never
meant to let automation authors call intranet hosts. An HTTP step calls
public HTTPS addresses only, and the failure and check texts say so.
A new page in English, German and French for the http.get and http.send
steps: their inputs and answer, signing in with a credential, what Tale
refuses, the organization's budget of calls, and every failure with what
happened. The concepts page names the two steps and their checks, the
connectors overview lists HTTP and its exception to the default
credential, and the rate limits page names the steps' own budget.
…another port

The outbound client dropped Authorization, Cookie and X-Api-Key on a hop
to another host or port, but not an API key header a credential names
itself. A caller now names more headers to drop the same way, and an HTTP
step names its signing header.
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