harbor-scanner-aqua

by deployment-aqua

Helm chartv0.14.0App 0.14.0

Harbor scanner adapter for Aqua Enterprise scanner

About this chart

Harbor Scanner Aqua

Aqua Enterprise Scanner as a plug-in vulnerability scanner in the Harbor registry.

TL;DR;

$ helm repo add aqua https://helm.aquasec.com

Without TLS

$ helm install harbor-scanner-aqua aqua/harbor-scanner-aqua \
    --namespace harbor \
    --set aqua.version=$AQUA_VERSION \
    --set aqua.registry.server=registry.aquasec.com \
    --set aqua.registry.username=$AQUA_REGISTRY_USERNAME \
    --set aqua.registry.password=$AQUA_REGISTRY_PASSWORD \
    --set scanner.aqua.username=$AQUA_CONSOLE_USERNAME \
    --set scanner.aqua.password=$AQUA_CONSOLE_PASSWORD \
    --set scanner.aqua.host=http://csp-console-svc.aqua:8080

With TLS

  1. Generate certificate and private key files:
    $ openssl genrsa -out tls.key 2048
    $ openssl req -new -x509 \
        -key tls.key \
        -out tls.crt \
        -days 365 \
        -subj /CN=harbor-scanner-aqua.harbor
    
  2. Install the harbor-scanner-aqua chart:
    $ helm install harbor-scanner-aqua aqua/harbor-scanner-aqua \
        --namespace harbor \
        --set service.port=8443 \
        --set scanner.api.tlsEnabled=true \
        --set scanner.api.tlsCertificate="`cat tls.crt`" \
        --set scanner.api.tlsKey="`cat tls.key`" \
        --set aqua.version=$AQUA_VERSION \
        --set aqua.registry.server=registry.aquasec.com \
        --set aqua.registry.username=$AQUA_REGISTRY_USERNAME \
        --set aqua.registry.password=$AQUA_REGISTRY_PASSWORD \
        --set scanner.aqua.username=$AQUA_CONSOLE_USERNAME \
        --set scanner.aqua.password=$AQUA_CONSOLE_PASSWORD \
        --set scanner.aqua.host=http://csp-console-svc.aqua:8080
    

Introduction

This chart bootstraps a scanner adapter deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.12+
  • Helm 2.11+ or Helm 3+
  • Add Aqua chart repository:
    $ helm repo add aqua https://helm.aquasec.com
    

Installing the Chart

To install the chart with the release name my-release:

$ helm install my-release aqua/harbor-scanner-aqua

The command deploys scanner adapter on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

The following table lists the configurable parameters of the scanner adapter chart and their default values.

ParameterDescriptionDefault
aqua.versionThe version of Aqua Enterprise that the adapter operates against5.0
aqua.registry.serverAqua Docker registry serverregistry.aquasec.com
aqua.registry.usernameAqua Docker registry usernameN/A
aqua.registry.passwordAqua Docker registry passwordN/A
scanner.image.registryImage registrydocker.io
scanner.image.repositoryImage nameaquasec/harbor-scanner-aqua
scanner.image.tagImage tag{TAG_NAME}
scanner.image.pullPolicyImage pull policyIfNotPresent
scanner.logLevelThe log level of trace, debug, info, warn, warning, error, fatal or panic. The standard logger logs entries with that level or anything above itinfo
scanner.aqua.usernameAqua management console username (required)N/A
scanner.aqua.passwordAqua management console password (required)N/A
scanner.aqua.hostAqua management console addresshttp://csp-console-svc.aqua:8080
scanner.aqua.registryThe name of the Harbor registry configured in Aqua management consoleHarbor
scanner.aqua.scannerCLINoVerifyThe flag passed to scannercli to skip verifying TLS certificatesfalse
scanner.aqua.scannerCLIShowNegligibleThe flag passed to scannercli to show negligible/unknown severity vulnerabilitiestrue
scanner.aqua.scannerCLIOverrideRegistryCredentialsThe flag to enable passing --robot-username and --robot-password flags to the scannercli executable binaryfalse
scanner.aqua.scannerCLIDirectCCThe flag passed to scannercli to contact CyberCenter directly (rather than through the Aqua server)false
scanner.aqua.scannerCLIRegisterImagesThe flag to determine whether images are registered in Aqua management console: Never - skips registration; Compliant - registers only compliant images; Always - registers compliant and non-compliant images.Never
scanner.aqua.reportsDirDirectory to save temporary scan reports/var/lib/scanner/reports
scanner.aqua.useImageTagThe flag to determine whether the image tag or digest is used in the image reference passed to scannerclifalse
scanner.api.tlsEnabledThe flag to enable or disable TLS for HTTPtrue
scanner.api.tlsCertificateThe absolute path to the x509 certificate file
scanner.api.tlsKeyThe absolute path to the x509 private key file
scanner.api.readTimeoutThe maximum duration for reading the entire request, including the body15s
scanner.api.writeTimeoutThe maximum duration before timing out writes of the response15s
scanner.api.idleTimeoutThe maximum amount of time to wait for the next request when keep-alives are enabled60s
scanner.store.redisNamespaceThe namespace for keys in the Redis storeharbor.scanner.aqua:store
scanner.store.redisScanJobTTLThe time to live for persisting scan jobs and associated scan reports1h
scanner.redis.poolURLThe server URI for the Redis storeredis://harbor-harbor-redis:6379
scanner.redis.poolMaxActiveThe max number of connections allocated by the pool for the Redis store5
scanner.redis.poolMaxIdleThe max number of idle connections in the pool for the Redis store5
scanner.redis.poolpIdleTimeoutThe duration after which idle connections to the Redis server are closed. If the value is zero, then idle connections are not closed.5m
scanner.redis.poolConnectionTimeoutThe timeout for connecting to the Redis server1s
scanner.redis.poolReadTimeoutThe timeout for reading a single Redis command reply1s
scanner.redis.poolWriteTimeoutThe timeout for writing a single Redis command

Deploy harbor-scanner-aqua with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has harbor-scanner-aqua 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 chartharbor-scanner-aqua is pinned at v0.14.0 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