Along with agent worker and direct connection runtimes, you can use an agent proxy runtime to provide a network path for services in Foundry to access systems within your network that are not accessible over the Internet. Agent proxies allow applications in Foundry to operate as if they are connecting to a source over the Internet, and they can be configured with multiple agents to allow for alternating maintenance windows that prevent downtime. Follow the guide below to configure and manage an agent proxy.
You must set up an agent to use the agent proxy, but no additional configuration is required. The same agent may be used as both an agent worker and agent proxy, based on the selection made when assigning it to a specific source.
Select the agent proxy runtime option when creating a new source in Data Connection. This is currently only available when configuring the REST API source type.
To ensure that the agent proxy runtime only has access to required resources, a number of security controls are available.
Security controls are either mandatory and cannot be disabled, or optional and are not enabled by default.
The following security control configurations are available:
Security control | Required? | Description |
---|---|---|
Source configuration enforcement | Yes | Traffic over the agent proxy will always be limited to the hostname(s) and port(s) configured on the source that is assigned to use the agent proxy. |
Agent allowlist (Foundry) | Optional | You may choose to configure an allowlist stored in Foundry and enforced upstream of traffic being sent to the agent. This control can only be modified by an Owner of the agent resource in Foundry. |
Agent allowlist (local file) | Optional | You may choose to configure an allowlist stored on the agent host, which will be enforced by the agent process running inside your network. This control can only be modified with SSH access to the agent host and is enforced by the agent software. |
Agent host firewall | Optional | We strongly recommend configuring host-level firewall controls to ensure that your agents are only able to communicate with the target systems you want them to be able to reach. This control is entirely independent from Foundry and provides an extra layer of security. |
The hostname and port in the URL defined on the source restricts access to only that hostname and port when connecting to the agent proxy. Attempts to connect to any other hostname or port will result in a HTTP 403 (Unauthorized) response code from the proxy.
By limiting connections to only what the source is configured for, this control prevents unauthorized connections when importing and using a connection in code.
If only this security control is used, ensure that any users able to assign an agent to a particular source are also trusted to connect to any system that is reachable from the agent host.
To ensure that an agent can only talk to a limited set of IP addresses or CIDR blocks, an allowlist can be configured within Foundry to limit the connectivity for a specific agent, regardless of the sources to which the agent is assigned.
To configure this, navigate to Agent settings, then toggle the Advanced option in the the Manage Configuration section. In the YAML file, add a block for agentProxyConfiguration
at the same indentation level as the security
block.
Add a list of CIDR blocks with ports to which the agent is allowed to connect. For example:
Copied!1 2 3 4 5 6 7
agentProxyConfiguration: allowListedCidrs: - cidrBlock: '192.168.1.1/32' port: 7000 endPort: 9000 - cidrBlock: '192.168.2.2/24' port: 443
The same configuration used for an agent allowlist in Foundry can also be set in a file on the agent host itself, preventing users in Foundry from editing the configuration.
To do this follow these steps:
agentProxyConfig
in the same directory as the root folder of the agent installation (the same folder as magritte-bootvisor-<version>
).agentProxyConfig
folder, create a file named agentProxyConfig.yml
.agentProxyConfig.yml
file and agentProxyConfig
folder must be created with the root user, and the file permissions must be set to prevent the agent from writing to this file or folder. The agent will not run the agent proxy feature if the agentProxyConfig.yml
file exists and is writeable, or if one of the parent directories is writeable by the agent.For example:
Copied!1 2 3 4 5 6
allowListedCidrs: - cidrBlock: '192.168.1.1/32' port: 7000 endPort: 9000 - cidrBlock: '192.168.2.2/24' port: 443
We strongly recommend configuring a firewall on the agent host to monitor and restrict network traffic to only destinations that are strictly necessary. The available firewall and monitoring options will depend on the Linux distribution you are using to run your agent, as well as your organization's security best practices.