akeyless-zero-trust-web-access

by akeyless.io

Helm chartv4.0.0App 3.0.0MPL-2.0Verified publisher

A Helm chart for Kubernetes that deploys akeyless-zero-trust-web-access

About this chart

Akeyless Zero Trust Web Access

Introduction

This chart bootstraps a Akeyless-Zero-Trust-Web-Access deployment on a Kubernetes cluster using the Helm package manager. This chart has been tested to work with NGINX Ingress and cert-manager.

Preparation

Network

When using Embedded browser session behind load balancer such as ELB, the session can be closed due to idle connection timeout, so its advise to increase it to a reasonable high value, or event unlimited.

e.g when running on AWS with ELB: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html?icmpid=docs_elb_console

Storage

To be able to download files to your local machine, the helm chart requires a storage class with ReadWriteMany access modes.
Since a storage class is more environment specific, you will need to provide one before proceeding. In addition, please provide 1 PersistentVolumes and reference those PVs under persistence section in the values.yaml file

e.g when running on AWS with EKS: https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html

For security reason, please limit the PersistentVolumes mount permissions to 0650, example:

   - dir_mode=0650
   - file_mode=0650

Single-node and multi-node clusters

Session recording needs the same /etc/shared volume on the dispatcher, the web workers and the media server.

  • Single-node clusters (k3s, Minikube, kind) can use a node-scoped provisioner such as local-path.
  • Clusters with more than one node need a ReadWriteMany storage class, for example NFS, AWS EFS, Azure Files, GCP Filestore or Longhorn. The media server runs on every node and mounts the shared volume.

Set the storage class in persistence.shareStorageVolume.storageClassName.

Session Recording (Optional)

ZTWA records browser sessions to video files (.mp4) and can upload them to S3 or S3-compatible storage. All recording settings are in the recording section of values.yaml.

Prerequisites

  1. Shared Volume: Configure persistence.shareStorageVolume with a ReadWriteMany PersistentVolumeClaim (for example NFS, Azure Files, EFS) so /etc/shared is mounted on the dispatcher, the web workers and the media server.
  2. Security Context: The chart sets securityContext.fsGroup: 10000 on the dispatcher and worker pods, so they can write to the shared volume. Without it, writes fail with permission denied.
  3. S3 Credentials (for upload): the chart never accepts plain credentials in values.yaml. Choose one of:
    • IAM roles (AWS IRSA, GKE Workload Identity), recommended for production. Leave recording.s3.existingSecretName empty so the dispatcher picks up the AWS default credential chain.
    • Kubernetes Secret: create the Secret out-of-band and reference it in recording.s3.existingSecretName. See "Kubernetes Secret" below.

Configuration

recording:
  # Record sessions on the media server
  enabled: true

  # Upload to S3 (done by the dispatcher)
  s3:
    enabled: true
    bucket: "my-ztwa-recordings"
    region: "us-east-1"
    # Optional: organize recordings in a prefix
    prefix: "recordings"
    # Optional: custom S3-compatible endpoint (MinIO, Wasabi, etc.)
    endpoint: ""
    # Optional: gzip the recordings before upload (reduces storage costs)
    compress: true
    # Server-side encryption
    sse:
      # type: "" (none), "sse-s3" (AES-256), or "sse-kms"
      type: "sse-s3"
      # kmsKeyId: optional KMS key ARN for sse-kms
      kmsKeyId: ""

persistence:
  shareStorageVolume:
    name: share-storage
    storageClassName: "efs-sc"  # Example: EFS storage class
    accessModes:
      - ReadWriteMany
    size: 10Gi

The render fails when recording.s3.enabled is true and recording.s3.bucket is empty, and when recording.enabled or recording.s3.enabled is true without persistence.shareStorageVolume.

Credentials, Kubernetes Secret: create the Secret out-of-band and reference it from values.yaml. The chart wires the dispatcher's RECORDING_S3_ACCESS_KEY_ID and RECORDING_S3_ACCESS_KEY_SECRET env vars to the Secret via secretKeyRef.

kubectl create secret generic ztwa-s3-credentials \
  --from-literal=access-key-id=<access-key-id> \
  --from-literal=secret-access-key=<secret-access-key>
recording:
  s3:
    existingSecretName: ztwa-s3-credentials
    # Override the keys inside the Secret if you used different field names:
    # accessKeyIdKey: access-key-id
    # secretAccessKeyKey: secret-access-key

Credentials, IAM roles (no Secret): leave recording.s3.existingSecretName unset. The dispatcher uses the AWS default credential chain, for example IRSA, an instance profile, or AWS_* env vars that dispatcher.env reads from a Secret with valueFrom.secretKeyRef. A plain value: in dispatcher.env puts the key in the Deployment spec. Use IAM roles in production, and the Secret when IAM is not available (on-prem, MinIO).

Upload Behavior and Limitations

  • Upload time: a recording is uploaded about 1 to 2 minutes after its session ends.
  • Recording Format: The media server writes each session as recordings/rec_*.mp4 on the shared volume, and the dispatcher uploads it as is.
  • Worker Recycle: When the liveness probe restarts a worker, the media server closes the recording with what it captured up to that point.
  • Storage: Ensure shared volume has sufficient capacity for concurrent sessions and upload backlog
  • Retention: Configure S3 lifecycle policies for long-term retention management

Troubleshooting

  • Permission Denied: check that the dispatcher pod has fsGroup: 10000 (the chart default).
  • No Recordings Created: Check recording.enabled, and that the MediaMTX pod mounts the shared volume. Its log shows a "recording" line per session (kubectl logs <mediamtx-pod>).
  • Upload Failures: Check dispatcher logs for S3 errors. Verify bucket/region/credentials. Test with aws s3 ls s3://<bucket> using the same credentials.
  • Truncated Sessions: When a worker is recycled mid-session, the media server closes the recording with what was captured, and the dispatcher uploads it as a valid, shorter .mp4.

Chromium Worker (chart 4.0.0+)

The web worker runs a Chromium-based browser (akeyless/zero-trust-web-worker). Key defaults:

  • Managed policies: Chrome Enterprise JSON in webWorker.config.policies. Use the Chrome schema (URLAllowlist, URLBlocklist and so on), not the Firefox policies.json format.
  • Ephemeral /config: an in-memory emptyDir, so no Chromium profile data stays after a pod restart.
  • /dev/shm: a 2Gi memory-backed emptyDir.

Upgrading from chart 3.x

  1. Rewrite any custom webWorker.config.policies from Firefox schema to Chrome Enterprise JSON.
  2. Review the worker pod spec changes (/config emptyDir, policy mount path) before rollout.
  3. Open the live view's network path. Browsers now get the video straight from a media server on each node, over UDP mediamtx.iceUDPPort (default 8189), on top of the dispatcher's port. Allow it from users' networks to every node that runs workers, or to the addresses in mediamtx.additionalHosts. There is no TCP fallback. The port is a hostPort, so the cluster's CNI must support hostPort, and two releases in one cluster need different ports. Namespaces under Pod Security baseline or restricted, and OpenShift's restricted SCC, refuse a hostPort, and there the media server does not start. Install into a namespace that allows it.
  4. Keep the supported layout: one dispatcher per worker pool, on the same node as its workers.
  5. Recording now comes from the media server, out of the live stream:
    • The 4 hour cap is gone. A session is recorded for its full length, in files of up to 24 hours.
    • The live view and the recording fail together.
    • The old recording quality, watchdog and webWorker.config.recording settings are removed and ignored.
    • A session hour takes about 0.15 to 0.25 GB, up to 0.9 GB with constant full screen motion. Size the shared volume and the S3 bucket for that.
    • The S3 object is now rec_<session>_<time>.mp4, without the worker name. A session longer than 24 hours makes more than one object.
    • Finished recordings wait in recordings/ on the shared volume. .mkv recordings an older worker left on the volume are uploaded as they are.
  6. A chart upgrade does not restart the media server, so live sessions survive it. To move a node's media server to the new version, delete its pod while no sessions run on that node.
  7. A proxy or ingress in front of the dispatcher must keep the browser's Host header. The live routes compare the browser's Origin with it, and answer 403 when they differ.
  8. Move your values to the 4.0.0 layout, see the next section.

Upgrading to the 4.0.0 values layout

Chart 4.0.0 reorders values.yaml: the ZTWA settings come first in config, then the Kubernetes settings shared by all workloads, then one section per service, then session recording in recording. The render fails when it finds a key from the old layout, and the error names the new key.

Upgrade with your values file (-f <values file>) or --reset-then-reuse-values. With --reuse-values, Helm keeps the old release values in place of the new chart defaults, and the render fails with a nil pointer error.

Old keyNew key
dispatcher.config.apiGatewayURLconfig.gatewayURL
dispatcher.config.apiGatewayCert.tlsCertsSecretNameconfig.gatewayCert.tlsExistingSecret
dispatcher.config.clusterName, allowedBastionUrls, allowedProxyUrls, allowedInternalAuth, disableSecureCookieThe same names under config
dispatcher.config.privilegedAccess.accessIDconfig.ztwaAuth.ztwaAccessID
dispatcher.config.privilegedAccess.accessKeyRemoved. Put the key in the Secret named in config.ztwaAuth.ztwaExistingSecret, under the key ztwa-access-key
dispatcher.config.privilegedAccess.allowedAccessIDsconfig.ztwaAuth.authorizedAccessIDs, now required
dispatcher.config.privilegedAccess.existingSecretNames.accessconfig.ztwaAuth.ztwaExistingSecret. The Secret now needs the key ztwa-access-key, and the access ID goes to config.ztwaAuth.ztwaAccessID
dispatcher.config.privilegedAccess.existingSecretNames.allowedIDsRemoved. Put the IDs in config.ztwaAuth.authorizedAccessIDs
dispatcher.config.cloudIdentity.typeconfig.ztwaAuth.ztwaAccessType
dispatcher.config.logForward, dispatcher.config.existingLogForwardSecretNameRemoved. Set the recording upload in recording.s3
dispatcher.config.recording (enabled, s3Bucket, s3Region, s3Prefix, s3Endpoint, compress, sseType, sseKmsKeyId)recording.s3 (enabled, bucket, region, prefix, endpoint, compress, sse.type, sse.kmsKeyId)
dispatcher.config.listOnlyCredentialsRemoved
sessionRecording.enabledrecording.enabled
sessionRecording.quality, sessionRecording.watchdogRemoved. The media server records the full screen
sessionRecording.upload.enabledrecording.s3.enabled
sessionRecording.upload.s3Bucket, s3Region, s3Prefix, s3Endpointrecording.s3.bucket, region, prefix, endpoint
sessionRecording.upload.existingSecretNames.s3recording.s3.existingSecretName
sessionRecording.upload.existingSecretNames.s3AccessKeyIdKey, s3SecretAccessKeyKeyrecording.s3.accessKeyIdKey, secretAccessKeyKey
sessionRecording.upload.compress, sse.type, sse.kmsKeyIdrecording.s3.compress, sse.type, sse.kmsKeyId
sessionRecording.upload.uploaderStatePath, dispatcher.config.recording.uploaderStatePathRemoved
dlpRemoved
webWorker.config.dispatcherDNSdispatcher.dispatcherDNS
HPA.webWorker.sessionTerminationGracePeriodSecondswebWorker.terminationGracePeriodSeconds
HPA.dispatcherRemoved. The chart runs one dispatcher per worker pool
dispatcher.initContainer, webProxy.initContainerRemoved. The dispatcher and the web proxy read their settings from env

When a field was set in both sessionRecording.upload and dispatcher.config.recording, keep the dispatcher.config.recording value. The old chart used that one.

The render also fails when:

  • config.ztwaAuth.ztwaAccessID is empty.
  • config.ztwaAuth.authorizedAccessIDs is empty, and AUTHORIZED_ACCESS_IDS is not set to a value in both dispatcher.env and webProxy.env. The dispatcher and the web proxy accept no user without them.
  • config.ztwaAuth.authorizedAccessIDs is set, and AUTHORIZED_ACCESS_IDS is also set in dispatcher.env or webProxy.env.
  • dispatcher.initContainer.imagePullSecrets or webProxy.initContainer.imagePullSecrets is set. Move it to dispatcher.image.imagePullSecrets or webProxy.image.imagePullSecrets.
  • config.ztwaAuth.ztwaAccessType is access_key and config.ztwaAuth.ztwaExistingSecret is not set.
  • config.ztwaAuth.ztwaAccessType is aws_iam, azure_ad or gcp and config.ztwaAuth.ztwaExistingSecret is set.

ZTWA Access Type (config.ztwaAuth.ztwaAccessType)

The dispatcher reads the secrets of the web targets with ztwaAccessID. ztwaAccessType sets the type of its auth method:

  • "" (default): auto detect, from ztwaExistingSecret or from the instance metadata service (IMDS).
  • access_key: API key. Needs ztwaExistingSecret, a Secret with the key ztwa-access-key.
  • aws_iam, azure_ad, gcp: cloud identity (AWS IAM, Azure AD, GCP). Set ztwaAccessID, not `zt

Deploy akeyless-zero-trust-web-access with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has akeyless-zero-trust-web-access 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 chartakeyless-zero-trust-web-access is pinned at v4.0.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