Deployment using 'docker' command
Last updated
Last updated
This is an Alpha feature which is not fully supported
Use this option to deploy a single docker image containing CloudGuard WAF with a managed reverse proxy.
It is possible to manage the reverse proxy server by yourself. Read the instructions further in this document to see the changes in deployment instructions.
Linux machine with:
Docker installed (or similar, compatible container runtime)
Root permissions
Note - package file and folder names contain the name appsec - short for "Application Security" provided by CloudGuard WAF.
As part of your CI, use the checkpoint/cloudguard-appsec-standalone registry to pull the unified NGINX and Nano-Agent image or use the following command:
Make sure you obtain the <token> from the Enforcement Profile page, Authentication section. you will need it during agent deployment.
Run the agent with this command after replacing <token> with the copied token from previous step and removing unneeded optional parameters:
Unique Parameters explanation:
For debugging purpose it is possible to activate an SSH server within the docker container by using the following parameters when running the docker. For security reasons, it is NOT recommended to use this option in production.
--ssh-enable --ssh-user <username> --ssh-hash <hash>
The hash of you password can be calculated like this:
openssl passwd -6 -salt <user-salt> ClearTextPassword
-6 indicates SHA-512
<user-salt> is to randomize the encryption
Deploy the unified container.
To make sure that it is running, run: docker ps
.
Following the steps above, the agent will install and connect automatically.
Run the following command to check the status:
CloudGuard AppSec web portal should also display a successful connection message:
It is possible to have only security aspects managed centrally and manage nginx.conf and other config files by yourself.
There is no need to add the upsteam URL for each Web application asset, because you will configure it yourself.
When creating a new Docker profile, make sure to select the option "I want to manage NGINX myself not via this management"
Run the agent with this command after replacing <token> with the copied token from previous step and removing unneeded optional parameters:
Note the addition of the --nginx-self-managed
parameter in the end of the command.
Similar to managed Reverse proxy installation, almost all "-v"
parameters and the –e https_proxy
parameter are optional, except for the path to persistent location for nginx server conf files.
For more info on each parameter see table above.
To configure SSL certificates follow this guide for NGINX.
Parameter | Description | Required? |
---|---|---|
-v=/appsec/etc/certs:/etc/certs/
Map persistent storage path for certificates to /etc/certs of the container. Note: We recommend using /appsec/etc/certs and refer to it in our documentation for storing certificates.
Yes for managed Reverse Proxy. If the web server uses only HTTP there is no need for this parameter. When managing Reverse Proxy by yourself, map the certificates according to your own deployment design.
-v=<path to persistent location for nginx server conf files>:/etc/nginx/conf.d/
Map persistent storage path for NGINX configuration files.
Yes when using the "unmanaged option". In this option the external persistent path is the means to locally manage the NGINX.
-v=<path to persistent location for agent config>:/etc/cp/conf
-v=<path to persistent location for agent data files>:/etc/cp/data
-v=<path to persistent location for agent debugs and logs>:/var/log/nano_agent
Map persistent storage path for agent files. Can be useful for debugging purposes if a container is no longer available.
No
-e https_proxy
Configure a proxy server for outbound traffic, if applicable.
No. Needed only in the specific case of outbound traffic through a proxy server.
-p <host health-check port>:8117
Expose an external port for health checks
Yes
-p <host http port>:80
Expose an external port for incoming HTTP traffic
Yes
-p <host SSL port:443]
Expose an external port for incoming HTTPS traffic
Yes If the web server uses only HTTP do not use this parameter.