akeyless-zero-trust-web-access
by akeyless.io
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/sharedvolume 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
- Shared Volume: Configure
persistence.shareStorageVolumewith aReadWriteManyPersistentVolumeClaim (for example NFS, Azure Files, EFS) so/etc/sharedis mounted on the dispatcher, the web workers and the media server. - Security Context: The chart sets
securityContext.fsGroup: 10000on the dispatcher and worker pods, so they can write to the shared volume. Without it, writes fail with permission denied. - 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.existingSecretNameempty 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.
- IAM roles (AWS IRSA, GKE Workload Identity), recommended for production. Leave
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_*.mp4on 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,URLBlocklistand so on), not the Firefoxpolicies.jsonformat. - Ephemeral
/config: an in-memoryemptyDir, so no Chromium profile data stays after a pod restart. /dev/shm: a2Gimemory-backedemptyDir.
Upgrading from chart 3.x
- Rewrite any custom
webWorker.config.policiesfrom Firefox schema to Chrome Enterprise JSON. - Review the worker pod spec changes (
/configemptyDir, policy mount path) before rollout. - Open the live view's network path. Browsers now get the video straight from a media server on each node, over UDP
mediamtx.iceUDPPort(default8189), on top of the dispatcher's port. Allow it from users' networks to every node that runs workers, or to the addresses inmediamtx.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 Securitybaselineorrestricted, and OpenShift'srestrictedSCC, refuse a hostPort, and there the media server does not start. Install into a namespace that allows it. - Keep the supported layout: one dispatcher per worker pool, on the same node as its workers.
- 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.recordingsettings 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..mkvrecordings an older worker left on the volume are uploaded as they are.
- 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.
- A proxy or ingress in front of the dispatcher must keep the browser's
Hostheader. The live routes compare the browser'sOriginwith it, and answer 403 when they differ. - 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 key | New key |
|---|---|
dispatcher.config.apiGatewayURL | config.gatewayURL |
dispatcher.config.apiGatewayCert.tlsCertsSecretName | config.gatewayCert.tlsExistingSecret |
dispatcher.config.clusterName, allowedBastionUrls, allowedProxyUrls, allowedInternalAuth, disableSecureCookie | The same names under config |
dispatcher.config.privilegedAccess.accessID | config.ztwaAuth.ztwaAccessID |
dispatcher.config.privilegedAccess.accessKey | Removed. Put the key in the Secret named in config.ztwaAuth.ztwaExistingSecret, under the key ztwa-access-key |
dispatcher.config.privilegedAccess.allowedAccessIDs | config.ztwaAuth.authorizedAccessIDs, now required |
dispatcher.config.privilegedAccess.existingSecretNames.access | config.ztwaAuth.ztwaExistingSecret. The Secret now needs the key ztwa-access-key, and the access ID goes to config.ztwaAuth.ztwaAccessID |
dispatcher.config.privilegedAccess.existingSecretNames.allowedIDs | Removed. Put the IDs in config.ztwaAuth.authorizedAccessIDs |
dispatcher.config.cloudIdentity.type | config.ztwaAuth.ztwaAccessType |
dispatcher.config.logForward, dispatcher.config.existingLogForwardSecretName | Removed. 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.listOnlyCredentials | Removed |
sessionRecording.enabled | recording.enabled |
sessionRecording.quality, sessionRecording.watchdog | Removed. The media server records the full screen |
sessionRecording.upload.enabled | recording.s3.enabled |
sessionRecording.upload.s3Bucket, s3Region, s3Prefix, s3Endpoint | recording.s3.bucket, region, prefix, endpoint |
sessionRecording.upload.existingSecretNames.s3 | recording.s3.existingSecretName |
sessionRecording.upload.existingSecretNames.s3AccessKeyIdKey, s3SecretAccessKeyKey | recording.s3.accessKeyIdKey, secretAccessKeyKey |
sessionRecording.upload.compress, sse.type, sse.kmsKeyId | recording.s3.compress, sse.type, sse.kmsKeyId |
sessionRecording.upload.uploaderStatePath, dispatcher.config.recording.uploaderStatePath | Removed |
dlp | Removed |
webWorker.config.dispatcherDNS | dispatcher.dispatcherDNS |
HPA.webWorker.sessionTerminationGracePeriodSeconds | webWorker.terminationGracePeriodSeconds |
HPA.dispatcher | Removed. The chart runs one dispatcher per worker pool |
dispatcher.initContainer, webProxy.initContainer | Removed. 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.ztwaAccessIDis empty.config.ztwaAuth.authorizedAccessIDsis empty, andAUTHORIZED_ACCESS_IDSis not set to a value in bothdispatcher.envandwebProxy.env. The dispatcher and the web proxy accept no user without them.config.ztwaAuth.authorizedAccessIDsis set, andAUTHORIZED_ACCESS_IDSis also set indispatcher.envorwebProxy.env.dispatcher.initContainer.imagePullSecretsorwebProxy.initContainer.imagePullSecretsis set. Move it todispatcher.image.imagePullSecretsorwebProxy.image.imagePullSecrets.config.ztwaAuth.ztwaAccessTypeisaccess_keyandconfig.ztwaAuth.ztwaExistingSecretis not set.config.ztwaAuth.ztwaAccessTypeisaws_iam,azure_adorgcpandconfig.ztwaAuth.ztwaExistingSecretis 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:
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- 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.
- 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