scanner

by deployment-aqua

Helm chartv2022.4.15App 2022.4Apache-2.0

A Helm chart for the Aqua Scanner CLI component

About this chart

Aqua Security Scanner Helm Chart

These are Helm charts for installation and maintenance of Aqua Container Security Platform Scanner CLI.

Contents

  • Aqua Security Scanner Helm Chart
    • Contents
    • Prerequisites
      • Container Registry Credentials
      • Scanner User Credentials
    • Installing the Chart
      • Installing Aqua Scanner from Helm Private Repository
      • (Optional) Configure SSL communication with Aqua Server
      • (Optional) Configure mTLS communication with offline Aqua CyberCenter in air-gap environment
    • Configurable Variables
      • Scanner
    • Issues and feedback

Prerequisites

Container Registry Credentials

Link

Scanner User Credentials

Before installing scanner chart the recommendation is to create user with scanning permissions, Link to documentations

Installing the Chart

Follow the steps in this section for production grade deployments. You can either clone aqua-helm git repo or you can add our helm private repository (https://helm.aquasec.com)

Installing Aqua Scanner from Helm Private Repository

  • Add Aqua Helm Repository
helm repo add aqua-helm https://helm.aquasec.com
helm repo update
  • Check for available chart versions either from Changelog or by running the below command
helm search repo aqua-helm/scanner --versions
  • Install Aqua
helm upgrade --install --namespace aqua scanner aqua-helm/scanner --set imageCredentials.username=<>,imageCredentials.password=<>,user=<>,password=<>,scannerToken=<>

(Optional) Configure SSL communication with Aqua Server

To enable SSL communication from the Scanner to the Aqua Server. Perform these steps:

  1. enable serverSSL.enabled to true in values.yaml or use --set 'serverSSL.enabled=true' for inline argument

  2. You need to encode the certificate into base64 for server.crt using this command:

    cat <file-name> | base64 | tr -d '\n'
    
  3. Provide the certificates previously obtained in the fields of the serverSSL.serverSSLCert in values.yaml or use --set serverSSL.serverSSLCert=<cert base64 value>

(Optional) Configure mTLS communication with offline Aqua CyberCenter in air-gap environment

  1. To establish mTLS with offline cyberCenter, create secret using the below command kubectl create secret generic aqua-grpc-scanner --from-file=<rootCA.crt> --from-file=<aqua_scanner.crt> --from-file=<aqua_scanner.key> -n aqua
  2. Enable cyberCenter.mtls.enabled to true in values.yaml
  3. Add previously created secret name cyberCenter.mtls.secretName in values.yaml
  4. Add respective certificate file names to cyberCenter.mtls.publicKey_fileName, cyberCenter.mtls.privateKey_fileName, cyberCenter.mtls.rootCA_fileName(Add rootCA if certs are self-signed)

AQUA_PRIVATE_KEY, AQUA_PUBLIC_KEY, AQUA_ROOT_CA(if using self-signed certs), OFFLINE_CC_MTLS_ENABLE in scanner_configmap.yaml and uncomment aqua-grpc-scanner certs volume mount and volumes block from scanner-deployment.yaml file before applying the kubectl commands.

Before installing scanner chart the recommendation is to create user with scanning permissions, Link to documentations

Configurable Variables

The following table lists the configurable parameters of the Console and Enforcer charts with their default values.

Scanner

ParameterDescriptionDefaultMandatory
imageCredentials.createEnables to create image credentialsfalseNO
imageCredentials.nameIf imageCredentials.create is enabled sets imageCredentials nameNO
imageCredentials.registryThe registry that the credentials will be created for. mandatory if imageCredentials.create is enabledregistry.aquasec.comNO
imageCredentials.usernameThe username for the registry mandatory if imageCredentials.create is enabledNO
imageCredentials.passwordThe password for the registry mandatory if imageCredentials.create is enabledNO
dockerSocket.mountBoolean parameter if to mount docker socketunsetNO
dockerSocket.pathDocker socket path/var/run/docker.sockNO
platformSpecify the Kubernetes (k8s) platform acronym, allowed values are: aks, eks, gke, openshift, tkg, tkgi, k8s, rancher, gs, k3s, mke.unsetYES
directCC.enabledScanner talk to the cyberCenter directlyyesNO
serviceAccount.createEnable to create serviceAccount if not exist in the KubernetesfalseNO
serviceAccount.nameKubernetes service-account name either existing one or new name if create is enabledaqua-saYES
serviceAccount.attachImagePullSecretAttach image pull secret to created service accounttrue
server.schemeScheme for server to connecthttpNO
server.serviceNameService name for server to connectaqua-console-svcYES
server.portService port for server to connect8080YES
serverSSl.enableTo establish SSL communication with Aqua ServerfalseNO
serverSSl.createSecretChange to false if you're using existing server certificate secrettrueYES if serverSSl.enable is set to true
serverSSL.secretNameSecret name for the SSL certscanner-web-certYES if serverSSl.enable is set to true
serverSSL.cert_fileIf serverSSL createSecret enable to true, add base64 value of the the server public certificate or add filename of certificate if loading from custom secretNillYES if serverSSl.enable is set to true
cyberCenter.mtls.enabledIf require secure channel communicationfalseNO
cyberCenter.mtls.secretNameCertificates secret namenilNO
cyberCenter.mtls.publicKey_fileNameFilename of the public key eg: aqua_scanner.crtnilYES if cyberCenter.mtls.enabled is set to true
cyberCenter.mtls.privateKey_fileNameFilename of the private key eg: aqua_scanner.keynilYES if cyberCenter.mtls.enabled is set to true
cyberCenter.mtls.rootCA_fileNameFilename of the rootCA, if using self-signed certificates eg: rootCA.crtnilNO if using self-signed certificates for mTLS
image.repositoryThe docker image name to usescannerYES
image.tagThe image tag to use.2022.4YES
image.pullPolicyThe kubernetes image pull policy.IfNotPresentNO
userScanner usernameunsetYES
passwordScanner passwordunsetYES
nameOverrideScanner nameaqua-scannerNO
`s

Deploy scanner with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has scanner on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartscanner is pinned at v2022.4.15 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply