Connect Deployed Agents to SaaS Management Using Helm (K8s)

You can also connect to the SaaS Management using only Helm values. This is relevant e.g. in a GitOps scenario where you deploy also the Helm chart from your Git repo.

Instructions

When logged in to the open-appsec portal, click on Getting Started. You will see this page:

Follow these steps to connect your agents to the management:

Step 1: Confirm agent is deployed

Check the "I deployed an agent" box, the Central Management box will become enabled.

Step 2: Create a profile

The best-practice recommendation is to create an individual profile in the WebUI for each of your open-appsec deployments. Examples for "deployments" would be e.g.:

- K8s deployment using HELM or installation tool (consisting of one or multiple open-appsec agents) - redundant deployment using Docker on two or more virtual machines (each having it's own agent) protecting the same web assets - redundant embedded deployment on one or multiple redundant Linux machines protecting the same web assets Security-wise this makes sure that only policies for those assets which are protected by specific agents are enforced on those agents (by linking the Assets to only the relevant profile(s)), in addition to having a separate tokens per each deployment and all associated agents. In addition this approach provides the flexibility of being able to configure various settings available on profile-level individually per each deployment, if required.

In the Getting Started page, click Manage and choose Kubernetes Profile, you will get to the profile page:

Step 3: Select Subtype

In the "sub type" field select either NGINX or Kong depending on what kind of open-appsec agent/deployment you want to connect.

Step 4: Determine Management Master

Choose the relevant option to decide whether you want to edit assets and policies via the WebUI or locally in a declarative way (using CRDs or configuration files). If you choose a declarative option you can still view the configuration in the WebUI in read-only mode.

5. Enforce policy to confirm your choice

In the top-right of the WebUI click on "Enforce" to enforce the policy.

6. Copy the token from Profile

In the WebUI go to the Profile you created in the step above and copy the token.

7. Perform helm upgrade with adjusted Helm values

In order to connect to the management you need to run helm upgrade command as follows:

helm upgrade {open-appsec-helm-release-name} open-appsec-k8s-nginx-ingress-latest.tgz \
-n {open-appsec-namespace} \
--reuse-values \
--set appsec.mode="managed" \
--set appsec.agentToken={token}

Notes:

open-appsec-helm-release-name - replace with the name of the currently installed open-appsec-helm release, you can get this by using the following command which will show all currently installed helm releases helm list -A

open-appsec-namespace - replace with the namespace of your open-appsec deployment

token - replace with the token you copied from the Profile in the WebUI.

--reuse-values - This tells Helm to reuse all Helm values you configured when originally deploying the open-appsec helm chart. Note that when doing the Helm deployment declaratively from a central Git repo using some GitOps CD tool you need to replace this to specify explicitly all the specific Helm values you require.

Once you performed the instructions, after about two minutes, you will see a green notification bar in the Web UI. Your open-appsec agents are now connected to the management!

Last updated