Skip to main content

Flex Agent wizard installation and configuration

Use this workflow to ensure you have all the steps covered for installing and configuring the Flex Agent.

The Flex Agent lets you install and configure multiple agents from one package without having to specify specific languages. Using the wizard is the simplest way to deploy new agents.

You can also use the Flex Agent to upgrade deployed agents.

Before you begin

Make sure you have everything you need before you start.

  • The agent will need to be able to reach your Contrast instance. It can be a local/on-premise instance or a hosted instance. A proxy can be configured if the environment has limited network access.

  • Understand the order of precedence

  • Supported languages: .NET, Java, Node.js, Python, and PHP

  • Supported operating system: Linux

  • You will also need access to a command line interface (with a chosen directory for downloading the agent) and your organization's instance of Contrast

Start the Flex Agent wizard

  • Open the agent wizard:

    • Northstar: From the left navigation, select Administration > Agent management. Then, select Add agent at the top of the view.

    • Contrast: Use either of these options:

      • From the header, select Add New and then, select the Application card.

      • Select Administration > Agent management. Then, select Add agent at the top of the view.

Select installation method

  1. Under Select installation method, select On a server or VM or On Kubernetes.

  2. Under Select method to configure agent operator, select Helm charts (recommended) or Manifest.

  3. For Helm charts:

    1. Under Download and set up the values file, copy the displayed commands to create a values file. Skip this step if the operator is already installed.

      Note

      If you need a Helm chart with all possible Helm settings, you can generate a comprehensive YAML file in Northstar.

      If you have multiple agent keys, select the one you want to use. The full YAML file will not come with your agent key (tokenValue) inserted. If you decide to work with the full YAML file, ensure you copy your tokenValue and the values in the Download YAML code block displayed the wizard.

    2. Under Install and deploy Helm chart, copy the displayed commands to complete the configuration. Skip this step if the operator is already installed.

    3. Label namespaces to add AgentInjectors

      kubectl label namespace/<YourNamespaceName> agents.contrastsecurity.com/agent-injectors=true
    4. Under Label deployments, use the displayed commands to label your deployments.

  4. For Manifest:

    1. Under Install operator, copy the displayed commands to install the Contrast agent operator.

    2. Under Configure operator, copy the displayed commands to configure the Contrast agent operator.

      If you have multiple agent keys, select the one you want to use.

      Note

      If you need a Kubernetes secret containing the necessary connection keys to authenticate to Contrast, you can download the YAML file in Northstar.

      The Secret must be deployed into the same namespace as the ClusterAgentConnection entity.

      Run the command displayed in the wizard to apply the secrets.yaml file.

    3. Create or download the clusterAgentConnection.yaml file. Run the command displayed in the wizard to apply the configuration file.

    4. Under Configure injector, copy or download the clusterAgentInjector.yaml.

    5. Label your namespaces to add AgentInjectors

      kubectl label namespace/<YourNamespaceName> agents.contrastsecurity.com/agent-injectors=true
    6. Under Label the deployments, use the displayed commands to label your deployments.

    7. Optionally, under Configure agent (optional), copy the displayed commands to configure these entities.

Verify the agent deployment

  1. Restart your application after you install the Flex Agent.

  2. Interact with your application as you normally would. For example, interact with your application's web interface or send API commands.

  3. Select View agent activity.

  4. Verify that you see the name of your application in the list.

  5. Select servers in the header.

  6. Verify that you see the name of your local server in the list.

Flex Agent logging

For troubleshooting purposes, you can increase injector logging levels. To do so, add the environment variable CONTRAST_FLEX_INJECTOR_LOG_LEVEL=TRACE to your application start command. Adding this variable globally results in overly verbose logging.

See also

Install Flex Agent manually

Update agents with Flex Agent