Installation and setup of the Keeper Gateway
The Keeper Gateway is a service that is installed on any Docker, Linux or Windows machine in order to execute rotation, discovery, connection and tunneling. A single Gateway can be used to communicate with any target infrastructure, both on-prem and cloud. Typically, customers deploy a Keeper Gateway in each environment that is being managed.
The Keeper Gateway offers different feature capabilities based on the underlying operating system and hardware. We recommend using Docker on a Linux or Windows host with x86 CPUs for full feature support and ease of management.
Docker (Linux or Windows host w/ x86)
All features supported
Linux (RHEL 8, Rocky Linux 8)
All features supported
Docker (Linux host on ARM)
No Remote Browser Isolation
Linux Binary Install (Ubuntu, Debian)
No Remote Browser Isolation
Limited connection protocols
Windows Binary Install
No Remote Browser Isolation
No database connections
Note: EL9 which includes Rocky Linux 9 and RHEL 9 support is coming soon.
System requirements vary based on the number of simultaneous user sessions and the types of connections being established. As the volume of simultaneous connections grows, scaling CPU and memory resources becomes essential. In particular, remote browser isolation (RBI) launches a headless Chromium instance for each session. If you anticipate a high number of RBI sessions, ensure the system is scaled to meet these demands.
For a testing or sandbox a minimum of 2 CPUs with 8GB of memory and 10GB of storage is required. In a production environment, increase to at least 4 CPUs with 16GB of memory. Scale the number of CPUs and memory as the number of simultaneous sessions increases.
The Keeper Gateway generates encryption keys and a local Secrets Manager configuration that is used to authenticate with the Keeper cloud. The location depends on the context in which the Gateway is being run. It can be installed to the local user or installed as a service.
Login to the Keeper Web Vault or Desktop App (version 17.1 or newer required)
Click on Secrets Manager on the left side
Create a new Secrets Manager Application or select existing application
Click on the "Gateways" tab and click "Provision Gateway"
Select Docker, Linux or Windows install method
Install the Keeper Gateway using the provided method
During the creating of a Keeper Gateway using a one-time token method for Linux and Windows, you have the choice to select "Lock external WAN IP Address of device for initial request". This will additionally IP lock the Gateway in addition to the authentication and encryption built into the service.
Based on your Operating System, refer to the corresponding guide on installing the Keeper Gateway:
If you are installing on an EC2 instance in AWS, the Keeper Gateway can be configured to use the instance role for pulling its configuration from AWS Secrets Manager. Detailed instructions on this setup can be found here.
Creating a Keeper Gateway
In order to install and setup a Keeper Gateway device, you need to have a few resources set up:
Shared Folders to hold the PAM Resources (Machines, Databases, Users, etc)
Keeper Secrets Manager application
PAM Configuration
To simplify the process, we have a new Gateway wizard which creates all of the necessary components. Or, you can run each step individually.
A new Gateway deployment can be created by clicking on Create New > Gateway from the Web Vault. We have also posted a page describing how to create a sandbox environment in just a few steps.
In the Keeper Web Vault or Desktop App user interface, create a Shared Folder. This Shared Folder will contain the PAM resource records.
Navigate to the "Secret Managers" tab on the left and click on "Create Application" to create a KSM application
In the prompted window:
Enter the name of your KSM application
Choose the Shared Folder
Set the Record Permissions for Application to "Can Edit"
Click on "Generate Access Token" and then click on "OK"
You can safely ignore the first One-Time Access Token generated for the newly created KSM application. When creating a Keeper Gateway device, a different One-Time Access Token will be created.
You can also create a Gateway and configuration file from the Commander CLI:
The Application names and UIDs can be found with secrets-manager app list
Instructions for installing Keeper Gateway on Docker
This document contains information on how to install, configure, and update your Keeper Gateway on Docker. The Docker container is built upon the base image of Rocky Linux 8 and it is hosted in DockerHub.
For full PAM capabilities, use a Linux host with a x86 AMD processor.
A Linux host with a x86 AMD processor
docker
and docker-compose
installed (see Docker Install for help)
Note: The syntax is docker-compose
for servers, but on a local Docker Desktop it might be docker compose
(with no space).
A new Gateway deployment can be created by clicking on Create New > Gateway from the Web Vault or Desktop App (version 17.1 or newer required).
You can also create a Gateway and configuration file from the Commander CLI:
The Application names and UIDs can be found with secrets-manager app list
A Docker Compose file is provided through the Vault UI. Typically this file would be saved in your local environment as docker-compose.yml
in your preferred folder. An example is below:
The only required environment variable setting is GATEWAY_CONFIG which is the resulting base64-encoded configuration provided when creating a Gateway device.
Download this file called docker-seccomp.json
and place it in the same folder as your Docker Compose file.
When running the latest version of the Keeper Gateway, you'll see the output in the logs like below:
On the Vault UI in the Secrets Manager > Applications > Gateways screen, the Gateway will show Online.
If you need to enable verbose debug logs on the Gateway, enable debug logging by adding the below environment
section variables to your Docker Compose file:
After debug is enabled, restart the service with docker compose restart
Executing the following command will update the Keeper Gateway container to the latest version and restart the service:
Adding the "restart" parameter in the docker-compose.yml
file will assign a restart policy to the environment:
If you would like to force the host operating system to automatically start the Keeper Gateway on a Docker installation, follow these steps (Linux host).
First, create a .service
file in /etc/systemd/system/keeper-gateway.service
NOTE:
Replace /home/ec2-user
with the path to your docker-compose.yml
Replace ec2-user
user with your user running Docker
Replace docker
group with your defined group
Then enable the service:
The Gateway establishes outbound-only connections to the following:
Keeper Cloud (keepersecurity.[com|eu|com.au|ca|us|jp)
TLS Port 443
Outbound access for Vault login and Keeper Secrets Manager APIs.
Keeper Relay (krelay.keepersecurity.[com|eu|com.au|jp|ca|us])
TCP and UDP port 3478
Needed to establish secure & encrypted connections between the user's vault and the Gateway service.
Keeper Relay (krelay.keepersecurity.[com|eu|com.au|jp|ca|us])
Outbound access to TCP and UDP ports 49152 through 65535
Needed to establish outbound access over the designated port ranges
The Gateway preserves zero knowledge by performing all encryption and decryption of data locally. Keeper Secrets Manager APIs are used to communicate with the Keeper cloud.
A very useful capability of the Keeper Gateway is being able to open connections and tunnels to the host machine. By adding the extra_hosts
section to your docker compose file with a value of host.docker.internal:host-gateway
, you can open sessions directly to the host.
Example docker compose with the Gateway container:
Enabling this option allows you to establish a Connection to the host. For example, to open an SSH connection:
Create a PAM User record with the SSH private key
Create a PAM Machine record with the hostname to host.docker.internal
and port 22
Activate the SSH connection in PAM settings referencing the PAM User
If you use KeeperPAM to SSH over to the host service, you can upgrade the container by running the container update of the gateway in the background:
DockerHub listing: https://hub.docker.com/r/keeper/gateway
Quick reference for Installing Docker and Docker Compose on Linux
Instructions for installing Keeper Gateway on Linux
This document contains information on how to install, configure, and update your Keeper Gateway on Linux.
Prior to proceeding with this document, make sure you created a Gateway device.
For full capabilities, use Rocky Linux 8, RHEL 8 or Alma Linux 8.
If you cannot use one of these Linux flavors, please install using the Docker method
Executing the following command will install the Keeper Gateway, and run it as a service:
Replace XXXXX with the One-Time Access Token provided from creating the Keeper Gateway
The gateway will be installed in the following location:
An alias gateway
is also created in the same directory
For managing the Keeper Gateway as a service, the following are created during the Gateway installation:
A keeper-gateway
folder
A keeper-gw
user
keeper-gateway folder
The keeper-gateway
folder contains the gateway configuration file and is created in the following location:
keeper-gw user
During the gateway installation, a new user, keeper-gw
, is created and added to the sudoers list in /etc/sudoers.d/.
The keeper-gw
user is the owner of the keeper-gateway folder and runs the gateway service. This is required when performing rotations on the gateway service and performing post-execution scripts.
The following commands can be executed to start, restart, or stop the Keeper Gateway as a service:
The Keeper Gateway configuration file contains a set of tokens that includes encryption keys, client identifiers, and tenant server information used to authenticate and decrypt data from the Keeper Secrets Manager APIs. This configuration file is created from the One-Time Access Token generated when you created the Gateway.
If the Keeper Gateway is installed and running as a service, the gateway configuration file is stored in the following location:
If the Keeper Gateway is installed locally and not running as a service, the gateway configuration file is stored in the following location:
Logs that contain helpful debugging information are automatically created and stored on the local machine.
If the Gateway is running as a service, the log files are stored in the following location:
If the Gateway is not running as a service, the log files are stored in the following location:
To add verbose debug logging, modify this file:
and add the -d
flag to the "gateway start" command, e.g:
Apply changes to the service:
Tailing the Logs
Executing the following command will upgrade the Keeper Gateway to the latest version:
Configure your Keeper Gateway installation to automatically check for updates, ensuring it stays up-to-date with the latest version.
Executing the following command will uninstall the Keeper Gateway:
The Gateway establishes outbound-only connections to the following:
Keeper Cloud (keepersecurity.[com|eu|com.au|ca|us|jp)
TLS Port 443
Outbound access for Vault login and Keeper Secrets Manager APIs.
Keeper Relay (krelay.keepersecurity.[com|eu|com.au|jp|ca|us])
TCP and UDP port 3478
Needed to establish secure & encrypted connections between the user's vault and the Gateway service.
Keeper Relay (krelay.keepersecurity.[com|eu|com.au|jp|ca|us])
Outbound access to TCP and UDP ports 49152 through 65535
Needed to establish outbound access over the designated port ranges
The Gateway preserves zero knowledge by performing all encryption and decryption of data locally. Keeper Secrets Manager APIs are used to communicate with the Keeper cloud.
Keeper Gateway SHA256 hashes for the latest version are published at the below location:
https://keepersecurity.com/pam/latest.txt
Calculating and verifying the checksum:
Instructions for installing Keeper Gateway on Windows
This document contains information on how to install, configure, and update the Keeper Gateway on Windows.
Prior to proceeding with this document, make sure you created a Gateway device.
The latest Keeper Gateway for Windows is downloaded from here:
You can run the service under system privilege or use a service account.
Upon installation of the service, select "Enter a Keeper One-Time Access Token" and supply the token provided by when you created a Gateway on the Vault. After installation, the service will automatically start up and register with the Keeper cloud.
If you are upgrading an existing Gateway, un-check the "Enter a Keeper One-Time Access Token" so that the existing configuration is maintained.
The default installation location is the following:
Install Windows service - Installs the gateway as a Windows service.
Use service account - Use the specified service account, otherwise the account installing the gateway will be used.
Start Windows service - Start the Keeper Gateway service immediately after installation
Enable automatic updates
Turn on debug logging - Enable verbose logging on the gateway log files. NOT recommended for production environments. Only use this when debugging with Keeper support.
Remove Keeper Gateway configuration and logs from previous installations
If "Use service account" is specified you will be prompted to enter the valid credentials of the desired service account:
The final step prior to successfully installing the Keeper Gateway as service is to enter the One-Time Access Token provided from the Keeper Vault.
After clicking "Next", click "Install" in the next screen to install the Keeper Gateway.
After installing and running the Keeper Gateway as a service, this service can be accessed and easily managed within the Windows Services Manager as "Keeper Gateway Service".
The Keeper Gateway configuration file contains a set of tokens that includes encryption keys, client identifiers, and tenant server information used to authenticate and decrypt data from the Keeper Secrets Manager APIs. This configuration file is created from the One-Time Access Token generated when you created the Gateway.
If the Keeper Gateway is installed and running as a service, the gateway configuration file is stored in the following location:
If the Keeper Gateway is installed locally and not running as a service, the gateway configuration file is stored in the following location:
Logs that contain helpful debugging information are automatically created and stored on the local machine.
If the gateway is running as a service, the gateway log files are stored in the following location:
If the gateway is not running as a service, the gateway log files are stored in the following location:
To activate verbose logging:
Go to Windows Services > Keeper Gateway > Properties
Stop the service
Set the "Start parameters" to: --debug
or -d
Start the service by clicking on "Start" Do not click "OK" without first starting the service as it will not persist the Parameter setting
To upgrade, stop the service, install the latest version and then start the service.
Back up your gateway-config.json
configuration file
Run the latest Keeper Gateway installer
During installation DO NOT select "Enter a Keeper One-Time Access Token".
Select "Enable automatic updates" during the installer process to ensure that your Keeper Gateway is automatically updated when there are new versions available.
This section provides instructions for performing a silent installation of the Keeper Gateway on Windows systems. Silent installation allows the setup process to run in the background without displaying any user interface or messages.
To install the Keeper Gateway silently, use the following command in your command prompt or script:
Replace <TOKEN>
with the token provided in the Keeper Vault when creating the Keeper Gateway.
If you have previously installed Keeper Gateway and wish to use the existing configuration, you can bypass the token entry by using:
To generate a log file during the installation process, use the following option and specify the desired log file path:
If you prefer to run the Keeper Gateway under a specific Windows service account, use the following options to specify the account details:
Replace <ACCOUNT USERNAME>
and <ACCOUNT PASSWORD>
with the credentials of the service account you intend to use.
To enable the Auto Updater feature, allowing Keeper Gateway to automatically check for and apply updates, use the following option:
To uninstall the service:
Uninstall Keeper Gateway from "Add and remove programs"
If desired, delete the private configuration .json file
The Gateway establishes outbound-only connections to the following:
Keeper Cloud (keepersecurity.[com|eu|com.au|ca|us|jp)
TLS Port 443
Outbound access for Vault login and Keeper Secrets Manager APIs.
Keeper Relay (krelay.keepersecurity.[com|eu|com.au|jp|ca|us])
TCP and UDP port 3478
Needed to establish secure & encrypted connections between the user's vault and the Gateway service.
Keeper Relay (krelay.keepersecurity.[com|eu|com.au|jp|ca|us])
Outbound access to TCP and UDP ports 49152 through 65535
Needed to establish outbound access over the designated port ranges
The Gateway preserves zero knowledge by performing all encryption and decryption of data locally. Keeper Secrets Manager APIs are used to communicate with the Keeper cloud.
Keeper Gateway SHA256 hashes for the latest version are published at the below location:
https://keepersecurity.com/pam/latest.txt
Calculating and verifying the checksum:
Instructions for installing and configuring the Auto Updater for the Keeper Gateway.
Automatic updates of the Keeper Gateway can be enabled on Linux and Windows installations through Keeper's Auto Updater feature. The Auto Updater makes periodic checks to update your Keeper Gateway to the latest version.
By default, the Auto Updater is disabled when installing the Keeper Gateway
We recommend enabling the Auto Updater to ensure you receive the most recent security and functionality enhancements. The Auto Updater verifies all Keeper Gateway downloads by checking the GPG signature of hash value, which are then utilized to checksum each file.
Ensure that you have administrative privileges on the system.
Version 1.4.0 or later of Keeper Gateway is required.
On Docker based installations, the best way to update the container is running the below commands from a cron job or your CI/CD tools.
As an example, create a file called update_gateway.sh
that contains:
Make the script executable:
Edit the crontab:
Add a line to schedule the script. For example, to run it every day at 3 AM:
Execute the following command to download and run the KeeperPAM installer with auto update enabled.
The --autoupdate
parameter activates the auto updater in addition to the Keeper Gateway.
Activate the Auto Updater on an existing installation by executing the following Keeper Gateway command:
Verify Installation (Optional)
Verify that the Auto Updater has been installed successfully by executing the following Keeper Gateway command:
Download and run the latest version of the Gateway installer.
During installation, check the box "Enable automatic updates".
This setup option will create a new Task Scheduler task for updating the Gateway.
Existing Gateway
Open a command prompt as Administrator.
Install Auto Updater with the following Keeper Gateway command:
Verify Installation (Optional)
Open a command prompt as Administrator.
Verify that Auto Updater has been installed successfully by executing the following Keeper Gateway command:
Ensure that you have administrative privileges on the system.
Version 1.4.0 or later of Keeper Gateway is required.
Check the Auto Updater status by executing the following Keeper Gateway command:
Open a command prompt as Administrator
Check the Auto Updater status by executing the following Keeper Gateway command:
Edit the crontab that runs Auto Updater.
Here is an example of the default crontab entry that checks for updates every hour:
The first part 0 * * * *
is the crontab expression which will cause execution to occur every hour at 0 minutes.
The second part is the update command keeper-gateway-update
The option --trust
causes explicit trust of the Keeper Gateway GPG public key for verification of downloaded install files.
Configure the update frequency and other settings with the following steps:
Run taskschd.msc
to open Windows Task Scheduler.
In the left pane double-click on Task Scheduler Library -> Keeper -> Gateway -> AutoUpdate to show the Auto Updater Task.
In the upper middle pane double-click on the AutoUpdate Task with the name of the current version and click on the Triggers menu tab.
Click Edit...
to change when the Auto Updater checks for a new update to install. The default is to "Repeat task every 1 hour indefinitely" as shown below.
Ensure that you have administrative privileges on the system.
Version 1.4.0 or later of Keeper Gateway is required.
Remove Auto Updater by executing the following Keeper Gateway command:
Remove Auto Updater with the following steps:
Open a command prompt as Administrator.
Remove Auto Updater with the following Keeper Gateway command:
To assist with diagnosing issues or monitoring the status of updates, the Gateway Auto Updater generates two types of logs. These logs are subject to rotation policies to avoid overuse of disk space.
Log Location
All log files for Linux are located in /var/log/keeper-gateway
Log Files
Update Logs:
Any logs generated during an update will be timestamped and stored as update_YYYY-MM-DD_HH-MM-SS.log
.
Last Update Check:
The file last-update-check.log
contains information regarding the most recent check for updates.
The log files for the Gateway Auto Updater are located in \ProgramData\KeeperGateway\install
Log Files
Update Logs:
Any logs generated during an update will be timestamped and stored as YYYY-MM-DD_HH-MM-SS.log
Last Update Check:
The file last-update-check.log
contains information regarding the most recent check for updates.
Monitoring Gateway events and integrating with your SIEM
KeeperPAM supports integration with your SIEM provider to provide real-time event logging and monitoring of all privileged access management activity. In the Keeper Admin Console, alerts can also be configured based on any event.
For more information on activating SIEM integration from the Keeper Enterprise guide:
Push over 200 different event types to any connected SIEM provider
Send alerts to email, SMS, Webhook, Slack or Microsoft Teams on any event trigger
Run custom reports from the Keeper Admin Console or Keeper Commander CLI
Events related to KeeperPAM include:
Starting and stopping sessions, tunnels, remote browser isolation
Gateway lifecycle (online, offline, added/removed)
Connection lifecycle (creation, editing and deleting PAM resources)
As a KeeperPAM administrator, it is useful to receive alerts related to Gateway actions, such as when a Gateway goes offline (in case of server outage or system restart).
From the Admin Console, go to Reporting & Alerts > Alerts > select Event Types and set the recipient information.
Event alert details will include the name and UID of the affected Keeper gateway.
Email alerts contain event information
Advanced Keeper Gateway Configurations
This section will cover additional configurations to modify the Keeper Gateway's default behavior.
The following are supported configurations for the Keeper Gateway:
Storing and protecting the Keeper Gateway Configuration using AWS KMS
If the Keeper Gateway is installed on an AWS EC2 Instance, the corresponding Gateway configuration file can be protected and stored in AWS Secrets Manager. This method eliminates the need for storing a configuration file on the instance, and instead stores the configuration file with AWS KMS protection.
AWS KMS is a fully managed service that makes it easy for you to create and control the cryptographic keys used to encrypt and decrypt your data. The service is integrated with other AWS services, making it easier to encrypt data and manage keys. You will need a AWS KMS key as part of this process, and it is recommended that you follow the principle of least privilege when assigning permissions to this key.
In order to use AWS KMS to protect the Gateway configuration secrets, you need to install the Keeper Gateway on an EC2 instance which assumes an IAM Role. This works on either Docker or Linux install methods.
From the Keeper Vault, go to Secrets Manager > Applications and select the application configured with your Gateway. Then select the Gateways tab and select "Provision Gateway".
Select the Gateway initialization method of "Configuration" and click Next.
Alternatively, you can generate a One-Time Access Token and then use the Keeper Gateway's "gateway ott-init" command:
In either case, you'll be provided with a base64 encoded configuration. Save this for the next step.
From the AWS Console, go to the Secrets Manager and create a new secret.
Select "Other type of secret"
Select Plaintext and paste the entire base64 value there.
Click Next.
Enter a Secret Name and a description then click Next, Next and Store.
The EC2 instance role needs to be assigned a policy which provides read access to the specific AWS Secrets Manager key. As an example:
From the EC2 instance, the below command will confirm the policy has been applied:
For Docker installations, remove the GATEWAY_CONFIG
entry and add AWS_KMS_SECRET_NAME
with the value containing the name of the secret from the AWS secrets manager.
Then update the service with the new environment:
Open the Keeper Gateway service unit file:
/etc/systemd/system/keeper-gateway.service
Modify the "ExecStart" line as seen below, replacing YourSecretName with your assigned name.
Apply changes to the service:
If there are any errors starting up, they can be seen through this command:
Advanced configuration of the Keeper gateway with Keeper Vault custom fields
These configuration capabilities are functional and currently in an experimental phase, and we invite users to actively explore and utilize them. We are actively evaluating their functionality and performance, with the intention of considering them for official integration into our product in the future.
When setting up Rotation in your Keeper Vault, you store the credentials of your assets involved in rotation on their corresponding PAM Record Types. On these record types, you are able to create custom fields.
The additional gateway configurations will be defined with these custom fields on the PAM Record Types. The Keeper Gateway will then adjust its behavior based on the defined configurations.
The following tables lists all the possible configurations with custom fields:
Shell
Text
None
Allows you to specify a custom shell path that the Gateway will use when executing rotation and post-rotation scripts. This gives you control over the environment in which these scripts run.
Example Value: C:\MY\SHELL
NOOP
Text
False
Allows you to control whether the Gateway performs the primary rotation operation or proceeds directly to execution of the post-rotation script.
If set to True
the Gateway will skip the rotation process and proceed directly in executing the post-rotation script(s).
Example Value: True
Kerberos
Text
False
Specifically designed for WinRM connections using Kerberos authentication.
By default, the Gateway automatically decides whether to use Kerberos based on certain rules, and If these conditions are met, the Gateway will attempt to use Kerberos for WinRM. However, if you encounter issues with this automatic detection, setting this field to True
will override the default behavior and force the Gateway to use Kerberos for WinRM.
Example Value: True
Private Key Type
Text
ssh-rsa
Gateway Version 1.3.4+
This custom field pertains to the type or algorithm of the private key stored in a record.
When adding a private key to a record, users do not need to take any additional action regarding its type or algorithm. The system is designed to automatically recognize and use the same algorithm as the existing private key during the rotation process. If the algorithm in use is ECDSA, the key size will also be preserved during the rotation.
Available Options if needed to overwrite the key type:
ssh-rsa
(Note: 4096 bits)
ssh-dss
(Note: 1024 bit, obsolete) ecdsa-sha2-nistp256
ecdsa-sha2-nistp384
ecdsa-sha2-nistp521
ssh-ed25519
Private Key Rotate
Text
True
Gateway Version 1.3.4+
TRUE
- (Default) If the custom field doesn't exist, the private key will be rotated if it exists.
FALSE
- The private key won't be rotated, even if it exists. Users should pick this if they wish to retain the private key in the record without any rotations.
Note:
The custom fields values are not case-sensitive.