keeper-gateway

by Keeper Security

Helm chartv0.2.5App 1.8.10MITVerified publisher

Keeper PAM Gateway - Remote access, secret rotation, and discovery for Keeper Security

About this chart

Keeper PAM Gateway

Deploy the Keeper PAM Gateway on Kubernetes for remote access, secret rotation, and discovery.

Quick Start

helm repo add keeper https://keeper-security.github.io/helm-charts
helm repo update
helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<base64-config-from-keeper>'

The gateway connects outbound to Keeper infrastructure. No Ingress or inbound ports needed.

Prerequisites

  • Kubernetes 1.25+
  • Keeper Enterprise account with the Privileged Access Manager add-on
  • Gateway config from the Keeper Vault: Secrets Manager > select your Application > Gateways tab > Provision Gateway > choose Docker > copy the Base64 Configuration

Installation

helm repo add keeper https://keeper-security.github.io/helm-charts
helm repo update
helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<base64-config>'

Using an Existing Secret

For production, store the gateway config in a Kubernetes Secret you manage separately (avoids exposing the config in shell history):

kubectl create namespace keeper-gateway
kubectl create secret generic gw-config \
  --from-literal=gateway-config='<base64-config>' -n keeper-gateway

helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway \
  --set gateway.acceptEula=Y \
  --set gateway.existingSecret=gw-config

Verify

kubectl get pods -n keeper-gateway
kubectl logs -n keeper-gateway -l app.kubernetes.io/name=keeper-gateway

Upgrade

helm upgrade keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway \
  --reuse-values

With the default strategy (Recreate), the existing pod is terminated before the new one starts. Active sessions will be disconnected. For zero-downtime upgrades, use RollingUpdate strategy with multiple replicas (see Multi-Instance Scaling).

Note: --set gateway.config passes the config through shell history and helm get values. For production, use gateway.existingSecret to keep the config in a Kubernetes Secret that you manage separately:

helm upgrade keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway \
  --set gateway.acceptEula=Y \
  --set gateway.existingSecret=gw-config

Common Configurations

Multi-Instance Scaling

Run multiple gateway instances for high availability and load distribution. See the Scaling and High Availability guide for setup instructions.

# Fixed number of replicas (no autoscaling)
helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<config>' \
  --set replicaCount=3 \
  --set strategy.type=RollingUpdate

# Or with autoscaling (HPA manages replica count automatically)
helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<config>' \
  --set strategy.type=RollingUpdate \
  --set autoscaling.enabled=true \
  --set autoscaling.minReplicas=2 \
  --set autoscaling.maxReplicas=5

KeeperAI Threat Detection

Use an LLM to monitor privileged sessions and flag suspicious commands in real time. See the KeeperAI documentation for details and supported providers.

helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<config>' \
  --set ai.enabled=true \
  --set ai.provider=openai \
  --set ai.model=gpt-4o-mini \
  --set ai.apiKey='<your-api-key>'

Supported providers include OpenAI, Anthropic, Azure OpenAI, Google AI, Vertex AI, AWS Bedrock, and any OpenAI-compatible endpoint (Ollama, vLLM, LM Studio, etc. via openai-generic).

For cloud-native authentication (AWS Bedrock with IRSA, Vertex AI with Workload Identity), use serviceAccount.annotations and ai.existingSecret or extraEnv instead of ai.apiKey.

Logging

The gateway supports multiple log levels and output formats. Structured logging formats are available in gateway 1.8.0+.

helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<config>' \
  --set logging.level=debug \
  --set logging.format=json

Supported levels: error, warning, info, debug (guacd also supports trace)

You can set log levels independently:

# Same level for both
--set logging.level=debug

# Different levels
--set logging.gatewayLevel=info \
--set logging.guacdLevel=trace

Supported formats: text, json, logfmt, cef, leef, rfc5424, rfc3164, gelf

See the Logging reference below for all options including syslog forwarding.

Note: Structured log formats (json, logfmt, cef, etc.) require gateway 1.8.0 or later. The chart's default appVersion already meets this; only override image.tag if you pin an older gateway image.

Demo / Playground Services

Deploy sample SSH, RDP, VNC, and MySQL containers alongside the gateway for testing and evaluation. These are disposable targets that the gateway can connect to, so you can try remote access, rotation, and discovery without setting up your own infrastructure.

Use the Keeper Vault "Provision Gateway" wizard with "Create with example records" checked, then plug in the generated config:

helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<config-from-wizard>' \
  --set demo.enabled=true

Individual services can be toggled on or off:

# Only SSH and MySQL
helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<config>' \
  --set demo.enabled=true \
  --set demo.rdp.enabled=false \
  --set demo.vnc.enabled=false \
  --set demo.sshKey.enabled=false

Available demo services:

ServiceImagePortDefault
demo.mysqlmysql/mysql-server:8.03306Enabled
demo.sshPasswordkeeper/playground-ssh2222Enabled
demo.sshKeykeeper/playground-ssh2222Enabled
demo.vnckeeper/playground-vnc-xfce5901Enabled
demo.rdpkeeper/playground-rdp-xfce3389Enabled

All demo passwords are configurable — override them with values from your Keeper Vault wizard output. See the Demo Services reference below.

Corporate Proxy / Custom CA Certificates

If your network uses SSL inspection (e.g., Zscaler or other corporate proxies), the gateway needs your organization's CA certificate to establish outbound connections.

helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<config>' \
  --set-file caCertificates.inline=./company-ca.pem

Or from a ConfigMap:

kubectl create configmap company-ca \
  --from-file=ca-certificates.crt=./company-ca.pem -n keeper-gateway

helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway \
  --set gateway.acceptEula=Y \
  --set gateway.config='<config>' \
  --set caCertificates.existingConfigMap=company-ca

Session Recordings Storage

Session recordings are encrypted (AES-256-GCM) and streamed to Keeper in real time as the session happens — recordings are never lost, even if the pod restarts. The gateway uses a temporary local directory as a buffer during streaming. On machines with limited disk space or when handling many concurrent sessions, you may want to attach a larger persistent volume for this buffer:

helm install keeper-gateway keeper/keeper-gateway \
  --namespace keeper-gateway --create-namespace \
  --set gateway.acceptEula=Y \
  --set gateway.config='<config>' \
  --set recordings.enabled=true \
  --set recordings.size=50Gi

Security Context

The gateway requires elevated privileges for two reasons:

  1. Startup: The entrypoint runs as root to install CA certificates and Python packages, then drops to the keeper-gw user before starting services.
  2. RBI sessions: CEF/Chromium requires Linux namespace isolation (unshare, mount, clone syscalls) for D-Bus sandboxing, which needs CAP_SYS_ADMIN and an unconfined seccomp profile.

The chart defaults to:

  • Capabilities: SYS_ADMIN, SYS_CHROOT, SETUID, SETGID
  • Seccomp: Unconfined
  • AppArmor: unconfined (legacy pod annotation on all clusters, plus native container appArmorProfile when rendering for Kubernetes 1.30+)

Do not set runAsNonRoot: true or runAsUser. If your cluster enforces Pod Security Standards, you may need an exemption for the gateway namespace.

Security Hardening (optional)

The default Unconfined profiles work on all clusters. For hardened deployments, you can install custom security profiles that allow only the specific syscalls CEF needs.

AppArmor (Debian/Ubuntu nodes only — RHEL, Rocky Linux, Amazon Linux do not use AppArmor):

# On each Debian/Ubuntu node where the gateway may run:
curl -O https://raw.githubusercontent.com/Keeper-Security/KeeperPAM/main/gateway/gateway-apparmor-profile
sudo apparmor_parser -r gateway-apparmor-profile
sudo cp gateway-apparmor-profile /etc/apparmor.d/

# Then in your Helm values:
appArmorProfile: "localhost/gateway-apparmor-profile"

The chart renders the legacy container.apparmor.security.kubernetes.io/gateway pod annotation for compatibility with Kubernetes versions before 1.30. When Helm renders against Kubernetes 1.30 or later, the same appArmorProfile value is also translated to the native container securityContext.appArmorProfile field. To verify that the profile is applied to the running gateway container:

kubectl exec -n keeper-gateway deploy/keeper-gateway -- cat /proc/1/attr/current

Seccomp (all node types):

# On each node, copy the custom seccomp profile to the kubelet directory:
curl -O https://raw.githubusercontent.com/Keeper-Security/KeeperPAM/main/gateway/docker-seccomp.json
sudo mkdir -p /var/lib/kubelet/seccomp/profiles
sudo cp docker-seccomp.json /var/lib/kubelet/seccomp/profiles/keeper-gateway.json

# Then in your Helm values:
securityContext:
  capabilities:
    add: [SYS_ADMIN, SYS_CHROOT, SETUID, SETGID]
  seccompProfile:
    type: Localhost
    localhostProfile: profiles/keeper-gateway.json

Tailscale sidecar (for private network access):

podAnnotations:
  tailscale-sidecar/restart: "enabled"
  tailscale_tag: "tag:keeper"
  tailscale_hostname: "keeper-gateway"

Configuration Reference

Gateway Configuration

These are the core settings to connect the gateway to Keeper.

ParameterDescriptionDefault
gateway.acceptEulaAccept EULA (required, must be "Y")""
gateway.configBase64-encoded gateway config from Keeper""
gateway.existingSecretUse a pre-created K8s secret instead of gateway.config""
gateway.existingSecretKeyKey within the existing secret"gateway-config"
gateway.awsKmsSecretNameLoad config from AWS Secrets Manager instead""

Image

ParameterDescriptionDefault
image.repositoryGateway image repositorykeeper/gateway
image.tagImage tag (defaults to chart appVersion)""
image.pullPolicyImage pull policyIfNotPresent
imagePullSecretsImage pull secrets for private registries[]

Logging

Control the verbosity and format of gateway logs.

ParameterDescriptionDefault
logging.levelLog level for both gateway and guacd: error, warning, info, debug"info"
logging.gatewayLevelOverride log level for the gateway service only"" (uses logging.level)
logging.guacdLevelOverride log level for guacd only (also supports trace)"" (uses logging.level)
logging.formatLog format: text, json, logfmt, cef, leef, rfc5424, rfc3164, gelf. Structured formats available in gateway 1.8.0+."text"
syslog.enabledForward logs to a syslog serverfalse
syslog.hostSyslog server hostname or IP""
syslog.portSyslog server port514
syslog.protoSyslog transport: tcp or udp"udp"

Health Check & Probes

Probes use the gateway's built-in keeper-gateway health-check CLI command, which runs inside the container and checks the actual gateway process health. The health check HTTP server binds to 127.0.0.1 (localhost only).

ParameterDescriptionDefault
healthCheck.enabledEnable the health check server and probestrue
healthCheck.portPort for the health check server (localhost only)8099
healthCheck.authTokenOptional Bearer token for the /health HTTP endpoint (for external monitoring tools)""
healthCheck.existingAuthTokenSecretUse a pre-created secret for the auth token""
`healt

Deploy keeper-gateway with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has keeper-gateway 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 chartkeeper-gateway is pinned at v0.2.5 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