diff --git a/README.md b/README.md index ea87816..bbb9ac6 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ $ install-cp-nano-agent.sh --install --hybrid_mode $ install-cp-nano-service-http-transaction-handler.sh --install $ install-cp-nano-attachment-registration-manager.sh --install ``` -You can add the ```--token ``` and ```--email ``` options to the first command, to get a token follow [documentation](https://docs.openappsec.io/getting-started/using-the-web-ui-saas/connect-deployed-agents-to-saas-management-k8s-and-linux). +You can add the ```--token ``` and ```--email ``` and ```registered_server``` options to the first command, to get a token follow [documentation](https://docs.openappsec.io/getting-started/using-the-web-ui-saas/connect-deployed-agents-to-saas-management-k8s-and-linux). For Docker: follow [documentation](https://docs.openappsec.io/getting-started/start-with-docker) @@ -142,11 +142,11 @@ To run a Nano-Agent as a container the following steps are required: 2. If you are planning to manage the agent using the open-appsec UI, then make sure to obtain an agent token from the Management Portal and Enforce. 3. Run the agent with the following command (where -e https_proxy parameter is optional): -`docker run -d --name=agent-container --ipc=host -v=:/etc/cp/conf -v=:/etc/cp/data -v=:/var/log/nano_agent -e https_proxy= -it /cp-nano-agent [--token | --standalone]` +`docker run -d --name=agent-container --ipc=host -v=:/etc/cp/conf -v=:/etc/cp/data -v=:/var/log/nano_agent -e https_proxy= -e registered_server= -it /cp-nano-agent [--token | --standalone]` Example: ```bash - $ docker run -d --name=agent-container --ipc=host -v=/home/admin/agent/conf:/etc/cp/conf -v=/home/admin/agent/data:/etc/cp/data -v=/home/admin/agent/logs:/var/log/nano_agent –e https_proxy=user:password@1.2.3.4:8080 -it agent-docker /cp-nano-agent --standalone + $ docker run -d --name=agent-container --ipc=host -v=/home/admin/agent/conf:/etc/cp/conf -v=/home/admin/agent/data:/etc/cp/data -v=/home/admin/agent/logs:/var/log/nano_agent –e https_proxy=user:password@1.2.3.4:8080 -e registered_server='nginx' -it agent-docker /cp-nano-agent --standalone $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1e67f2abbfd4 agent-docker "/cp-nano-agent --hybrid-mode" 1 minute ago Up 1 minute agent-container @@ -155,6 +155,13 @@ CONTAINER ID IMAGE COMMAND CREATED Note that you are not required to use a token from the Management Portal if you are managing your security policy locally. However, you are required to use the --standalone flag in such cases. In addition, the volumes in the command are mandatory only if you wish to have persistency upon restart/upgrade/crash of the agent and its re-execution. Lastly, --ipc=host argument is mandatory in order for the agent to have access to shared memory with a protected attachment (NGINX server). + Supported registered_server are: + - NGINX + - Kong + - KongLua + - APISIX + - Envoy + 4. Create or replace the NGINX container using the [Attachment Repository](https://github.com/openappsec/attachment). This will run a docker container using the agent docker image.