Skip to content

Proxy setup for Waldur components

You can setup the proxy environment variables https_proxy, http_proxy and no_proxy for Waldur component containers. For this, please set values for the proxy.httpsProxy, proxy.httpProxy and proxy.noProxy variables in waldur/values.yaml file.

Example:

1
2
3
4
proxy:
  httpsProxy: "<https://proxy.example.com/">
  httpProxy: "<http://proxy.example.com/">
  noProxy: ".test"

Note: you can set variables separately, i.e. leave some of them blank:

1
2
3
4
proxy:
  httpsProxy: ""
  httpProxy: "<http://proxy.example.com/">
  noProxy: ".test"

In the previous example, the https_proxy env variable won't be present in the containers.

Remote Waldur (marketplace federation) behind a proxy

Waldur honours https_proxy, http_proxy and no_proxy when it calls a remote Waldur and when it downloads offering images from one. It first checks the remote's addresses against WALDUR_CORE["SUBNET_BLACKLIST"] (the chart's waldur.overrideSubnetBlacklist). It then opens a CONNECT <checked IP>:<port> tunnel through the proxy, for http:// remotes as well, instead of handing the hostname to the proxy, so the proxy never resolves the name itself. The proxy must therefore allow CONNECT to IP addresses on the remote's port: usually 443, plus 80 or other ports if remotes use plain http. A default squid configuration (http_access deny CONNECT !SSL_ports) refuses CONNECT to any port other than 443. With it, remotes on plain http or other ports fail with "The proxy refused the tunnel" until those ports are allowed.

If your proxy only allows CONNECT by hostname, set:

1
2
proxy:
  connectByHostname: true

This renders WALDUR_CORE["OUTBOUND_PROXY_CONNECT_BY_HOSTNAME"] = True. This is weaker. The address check still runs first, but the proxy's own name lookup and ACL then decide where the connection goes. The check no longer protects against DNS rebinding or internal names, so turn this on only if the proxy itself denies internal destinations.

Hosts listed in noProxy are connected to directly and are still checked. SOCKS proxies are not supported for these calls.

waldur.overrideSubnetBlacklist replaces the whole default list. A deployment that sets it keeps its own list and doesn't get later additions to the defaults, so compare it with the default in the Waldur configuration guide after upgrading.