A machine-readable index of this documentation for AI agents is available at https://kubevela.io/llms.txt. Markdown versions of documentation pages are available by appending .md to their URLs.
Skip to main content
Version: v1.10

Outbound HTTP Protection

vela-core makes HTTP requests on behalf of Applications and definitions. From v1.10.10 it refuses requests to cloud metadata, link-local and loopback addresses, and bounds how long a request may take and how much it may read. This page explains what is refused, how to add to the denylist, the stricter modes, and the bounds.

Upgrading to v1.10.10

A request that worked before can now fail the step or the render. See What may fail after an upgrade before you upgrade.

What is protected​

The protection applies to every outbound HTTP request vela-core makes:

  • the request, webhook and notification workflow steps (HTTP notifications: DingTalk, Lark, Slack; email goes over SMTP and is not covered);
  • custom workflow steps that use vela/http or the vela/op HTTP actions (op.#HTTPDo, op.#HTTPGet, op.#HTTPPost, op.#HTTPPut, op.#HTTPDelete);
  • vela/http in component, trait and policy definitions;
  • Helm repository fetches and ref-objects URLs.

Addon registries are not fetched by vela-core: the vela CLI and VelaUX fetch them, so the deny list, the loopback refusal and the feature gates set on vela-core don't apply to vela addon enable or the VelaUX Addons page.

Destinations are checked in two places:

  1. When the connection opens. The check runs on the IP address the host name resolved to, so a host name that points at a refused address is refused too.
  2. On every redirect. A request is stopped at a redirect to a refused destination, and after at most 10 redirects.

A refused request fails with one of these errors, wrapped in the request's own error:

ErrorMeaning
blocked SSRF host: <host>The host name matches an entry in denyHosts.
blocked SSRF target: <ip>The destination address is denied: a denyCIDRs entry, an address that is always refused, or a private address while blockPrivateHTTPAddresses is on.

A workflow step that fails this way is retried with backoff, up to workflow.step.errorRetryTimes, like any other step error.

HTTP proxies are not used​

Guarded requests connect directly and ignore HTTP_PROXY, HTTPS_PROXY and NO_PROXY on the vela-core Deployment: a request sent through a proxy could reach a denied address that vela-core never sees. A cluster that reaches the internet only through a proxy can't reach Slack, webhooks or Helm repositories from vela-core; the request fails with a dial or timeout error, not an SSRF one. This is tracked in kubevela/kubevela#7685.

What is refused​

Always refused​

EntryCovers
metadata.google.internalGCP metadata server
169.254.0.0/16IPv4 link-local, including the AWS, Azure and GCP metadata address 169.254.169.254
fe80::/10IPv6 link-local
fd00:ec2::254AWS IPv6 metadata endpoint
100.100.100.200Alibaba Cloud metadata server
127.0.0.0/8, ::1Loopback
0.0.0.0/8, ::Unspecified address
64:ff9b:1::/48Local-use NAT64

An address under the well-known NAT64 prefix 64:ff9b::/96 is judged by the IPv4 address it carries, so 64:ff9b::a9fe:a9fe is refused like 169.254.169.254.

The metadata entries are built into the controller, and the chart also writes them to a default ConfigMap. Deleting that ConfigMap, or turning discovery off, does not remove them. There is no allowlist mode.

Destinations inside the cluster, such as a Service ClusterIP or *.svc.cluster.local, and public destinations stay allowed unless you deny them. blockPrivateHTTPAddresses refuses ClusterIPs too, since they are private addresses. To call a Service from a step, use its DNS name, not localhost.

Adding to the denylist​

vela-core reads every ConfigMap in its own namespace (vela-system by default) labelled config.oam.dev/type with the config template's name (workflow.httpDeny.configTemplateName, vela-core-http-deny by default), including the chart's default vela-core-http-deny-default, and adds their entries to the built-in ones. It watches them, so a change takes effect without a restart.

Create one with vela config create, which checks the entries before writing:

vela config create team-http-deny \
--template vela-core-http-deny \
--namespace vela-system \
'denyHosts={*.example.com,internal.example.net}' \
'denyCIDRs={198.51.100.0/24,203.0.113.7}'

Or write the ConfigMap yourself:

apiVersion: v1
kind: ConfigMap
metadata:
name: team-http-deny
namespace: vela-system
labels:
config.oam.dev/type: vela-core-http-deny # workflow.httpDeny.configTemplateName
data:
denyHosts: |
*.example.com
internal.example.net
denyCIDRs: |
198.51.100.0/24
203.0.113.7

denyHosts takes exact host names, IP addresses, and wildcards that start with *.; a wildcard matches subdomains but not the bare domain. denyCIDRs takes IP addresses and CIDR ranges. Each key holds one entry per line; blank lines and # comments are ignored.

caution

One invalid entry in any labelled ConfigMap rejects the whole set. A running controller logs failed to reload workflow HTTP deny ConfigMaps; keeping last good policy and ignores every change until it's fixed, and a controller that starts with it refuses to start (failed to initialize workflow HTTP deny ConfigMaps). Check the controller log after you edit a ConfigMap by hand.

Feature gates​

Two feature gates make the protection stricter. Both are off by default, and stay off on upgrade.

Helm valueController flagEffect
featureGates.blockPrivateHTTPAddresses--feature-gates=BlockPrivateHTTPAddresses=trueAlso refuses private addresses: RFC 1918 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and ULA (fc00::/7). This breaks calls to in-cluster Services, whose ClusterIPs are private, and to Helm repositories on private addresses.
featureGates.disableWorkflowHTTP--feature-gates=DisableWorkflowHTTP=trueTurns off HTTP from workflow steps. A step fails with workflow outbound HTTP is disabled by DisableWorkflowHTTP feature gate. vela/http in definitions and Helm fetches are not affected.
helm upgrade kubevela kubevela/vela-core -n vela-system -f <your values file> \
--set featureGates.blockPrivateHTTPAddresses=true

Timeouts and response size​

Every guarded request is bounded:

  • Timeout. A request that sets no timeout times out after 3s. On v1.10 the request, webhook and notification steps have no timeout parameter, so they always time out after 3s; an endpoint slower than that fails the step, and there is no way to raise it for these steps. A custom step can set request.timeout on op.#HTTPDo or vela/http: a Go duration with a unit, greater than 0 and at most workflow.http.maxTimeout (default 60s). A value without a unit, such as "30", fails the step with invalid timeout "30": time: missing unit in duration "30"; 0, a negative value or one over the maximum fails it with timeout <t> must be greater than 0 and at most <max>. vela/http in definitions has no timeout parameter and uses workflow.http.maxTimeout.
  • Response size. A response body over workflow.http.maxResponseBytes (default 1 MiB) fails with response body exceeds <n> bytes, rather than being cut short.

A request holds one of the controller's reconcile workers until it returns, so raise these with care.

Helm valueController flagDefault
workflow.http.maxTimeout--max-workflow-http-timeout60s
workflow.http.maxResponseBytes--max-workflow-http-response-bytes1048576

Chart values​

ValueDefaultDescription
workflow.httpDeny.configTemplateNamevela-core-http-denyName of the config template and value of the discovery label (--workflow-http-deny-config-template-name). An empty string turns discovery off and skips the template and the default ConfigMap; the built-in entries stay. Quote a name that YAML would read as a number, a boolean or null.
workflow.httpDeny.installConfigTemplatetrueInstall the config template vela config create --template uses.
workflow.httpDeny.defaultConfig.enabledtrueInstall the default denylist ConfigMap.
workflow.httpDeny.defaultConfig.namevela-core-http-deny-defaultName of the default ConfigMap.
workflow.httpDeny.defaultConfig.denyHostsmetadata.google.internalHost names in the default ConfigMap.
workflow.httpDeny.defaultConfig.denyCIDRsthe four metadata addresses aboveIP addresses and CIDR ranges in the default ConfigMap.
workflow.http.maxTimeout60sSee Timeouts and response size.
workflow.http.maxResponseBytes1048576See Timeouts and response size.

What may fail after an upgrade​

  • A call to a cloud metadata or link-local address, on purpose or through a host name that resolves to one. Search your Applications, WorkflowRuns and definitions for 169.254., metadata.google.internal, fd00:ec2::254 and 100.100.100.200.
  • Anything that reached the internet through HTTP_PROXY or HTTPS_PROXY; see HTTP proxies are not used.
  • A call to localhost, 127.0.0.1 or another loopback address, or to 0.0.0.0. Use the Service's DNS name.
  • A custom step's request.timeout of 0, negative, without a unit, or over workflow.http.maxTimeout.
  • A request, webhook or notification step whose endpoint takes longer than 3s to answer.
  • A response over workflow.http.maxResponseBytes.
  • A custom step whose tls_config names a Secret in another namespace; see HTTPDo.
  • A request step that gets an HTTP 400. The step fails on any status of 400 or above; before v1.10.10 a 400 passed. In return, a reply that isn't JSON no longer fails the step: responseBody holds the body as sent, and response is set only when the body is JSON.