Deploy Keylime server components
Establish the server-side infrastructure for continuous remote system integrity monitoring by deploying the Keylime verifier and registrar.
Deploy Keylime verifier from a package Copy linkLink copied!
Deploy the Keylime verifier from a package to establish the core integrity monitoring component. The verifier acts as the verification authority for target systems - agents.
Before you begin Copy linkLink copied!
- You have
rootpermissions and network connection to the system or systems on which you want to install Keylime components. - You have valid keys and certificates from your certificate authority.
- If you use pull model attestation:
- The verifier’s host has outbound access to all monitored agents on port 9002.
- The verifier’s host is reachable on port 8881 by the tenant.
- The verifier has both server and client certificates for mTLS.
- If you use push model attestation:
- The verifier’s host is reachable on port 8881 by all monitored agents and the tenant.
- The verifier has a server certificate to prove its own identity to agents.
- Optional: You have access to the databases where Keylime saves data from the verifier. You can use any of the following database management systems:
- SQLite (default)
- PostgreSQL
- MySQL
- MariaDB
About this task Copy linkLink copied!
The verifier is the most critical component in Keylime. It performs initial and periodic checks of system integrity to ensure that monitored agents remain in a trusted state. In the pull model, the verifier also supports bootstrapping cryptographic keys and secure payloads with the agent.
The behavior of the Keylime verifier depends on the selected attestation model:
- Pull model
- The verifier actively polls the agent. It initiates an outbound connection and waits for a response before evaluating the measurements.
- Push model
- The verifier acts as a listener for inbound connections from agents. It accepts the incoming data, acknowledges it immediately, and evaluates the measurements independently. This decoupled approach allows the verifier to handle a significantly higher volume of requests without keeping connections open while processing the data.
To maintain the chain of trust, keep the system that runs the verifier secure and under your control.
You can install the verifier on a separate system or on the same system as the Keylime registrar, depending on your requirements. Running the verifier and registrar on separate systems provides better performance.
To keep the configuration files organized within the drop-in directories, use file names with a two-digit number prefix, for example /etc/keylime/verifier.conf.d/00-verifier-ip.conf. The configuration processing reads the files inside the drop-in directory in lexicographic order and sets each option to the last value it reads.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- Check that the
keylime_verifierservice is active and running:# systemctl status keylime_verifierkeylime_verifier.service - The Keylime verifier Loaded: loaded (/usr/lib/systemd/system/keylime_verifier.service; disabled; vendor preset: disabled) Active: active (running) since Wed 2022-11-09 10:10:08 EST; 1min 45s ago - For push model only: Check that the verifier is configured for push model attestation:
# journalctl -u keylime_verifier -b... keylime.verifier - INFO - Starting Keylime verifier in PUSH mode... ...
What to do next Copy linkLink copied!
Deploy Keylime verifier as a container Copy linkLink copied!
Configure the Keylime verifier as a container instead of the RPM method, without any binaries or packages on the host. The container deployment provides better isolation, modularity, and reproducibility of Keylime components.
Before you begin Copy linkLink copied!
- The
podmanpackage and its dependencies are installed on the system. - The user that executes
podmancommands has read access to the local configuration files and certificates that will be mounted into the container. - If you use pull model attestation:
- The verifier’s host has outbound access to all monitored agents on port 9002.
- The verifier’s host is reachable on port 8881 by the tenant.
- The verifier has both server and client certificates for mTLS.
- If you use push model attestation:
- The verifier’s host is reachable on port 8881 by all monitored agents and the tenant.
- The verifier has a server certificate to prove its own identity to agents.
- Optional: You have access to a database where Keylime saves data from the verifier. You can use any of the following database management systems:
- SQLite (default)
- PostgreSQL
- MySQL
- MariaDB
- You have valid keys and certificates from your certificate authority.
About this task Copy linkLink copied!
The Keylime verifier performs initial and periodic checks of system integrity to ensure monitored agents remain in a trusted state. In the pull model, the verifier also supports bootstrapping cryptographic keys and delivering secure payloads to the agent.
The behavior of the Keylime verifier depends on the selected attestation model:
- The pull model
- The verifier actively polls the agent. It initiates an outbound connection and waits for a response before evaluating the measurements.
- The push model
- The verifier acts as a listener for inbound connections from agents. It accepts the incoming data, acknowledges it immediately, and evaluates the measurements independently. This decoupled approach allows the verifier to handle a significantly higher volume of requests without keeping connections open while processing the data.
After you start the container, the Keylime verifier is deployed with default configuration files. You can customize the configuration by using one or more of following methods:
- Mounting the host’s directories that contain the configuration files to the container.
- Modifying the environment variables directly on the container. Modifying the environment variables overrides the values from the configuration files.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- Check that the container is running:
$ podman ps -aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 80b6b9dbf57c registry.redhat.io/rhel10/keylime-verifier:latest keylime_verifier 14 seconds ago Up 14 seconds 0.0.0.0:8881->8881/tcp keylime-verifier - For the push model only: Check that the verifier is configured for the push model attestation:
# podman logs keylime-verifier | grep -i "push mode"... keylime.verifier - INFO - Starting Keylime verifier in PUSH mode... ...
What to do next Copy linkLink copied!
Deploy Keylime registrar from a package Copy linkLink copied!
Deploy the Keylime registrar from a package to securely store and manage identity and key information about agents. Keeping the registrar secure helps maintain the chain of trust.
Before you begin Copy linkLink copied!
- You have network access to the systems where the Keylime verifier is installed and running. For more information, see
Deploy Keylime verifier from a package.
- You have
rootpermissions and network connection to the system or systems on which you want to install Keylime components. - You have access to the database where Keylime saves data from the registrar. You can use any of the following database management systems:
- SQLite (default)
- PostgreSQL
- MySQL
- MariaDB
- You have valid keys and certificates from your certificate authority.
About this task Copy linkLink copied!
The registrar is the Keylime component that contains a database of all agents, and it hosts the public keys of the TPM vendors. After the registrar’s HTTPS service accepts trusted platform module (TPM) public keys, it presents an interface to obtain these public keys for checking quotes.
To maintain the chain of trust, keep the system that runs the registrar secure and under your control.
You can install the registrar on a separate system or on the same system as the Keylime verifier, depending on your requirements. Running the verifier and registrar on separate systems provides better performance.
To keep the configuration files organized within the drop-in directories, use file names with a two-digit number prefix, for example /etc/keylime/registrar.conf.d/00-registrar-ip.conf. The configuration processing reads the files inside the drop-in directory in lexicographic order and sets each option to the last value it reads.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- Check that the
keylime_registrarservice is active and running:# systemctl status keylime_registrar● keylime_registrar.service - The Keylime registrar service Loaded: loaded (/usr/lib/systemd/system/keylime_registrar.service; disabled; vendor preset: disabled) Active: active (running) since Wed 2022-11-09 10:10:17 EST; 1min 42s ago ...
What to do next Copy linkLink copied!
Deploy Keylime registrar as a container Copy linkLink copied!
Configure the Keylime registrar as a container instead of the RPM method, without any binaries or packages on the host. The container deployment provides better isolation, modularity, and reproducibility of Keylime components.
Before you begin Copy linkLink copied!
- The
podmanpackage and its dependencies are installed on the system. - Optional: You have access to a database where Keylime saves data from the registrar. You can use any of the following database management systems:
- SQLite (default)
- PostgreSQL
- MySQL
- MariaDB
- You have valid keys and certificates from your certificate authority.
About this task Copy linkLink copied!
The registrar is the Keylime component that contains a database of all agents, and it hosts the public keys of the trusted platform module (TPM) vendors. After the registrar’s HTTPS service accepts TPM public keys, it presents an interface to obtain these public keys for checking quotes.
After you start the container, the Keylime registrar is deployed with default configuration files. You can customize the configuration by using one or more of following methods:
- Mounting the host’s directories that contain the configuration files to the container. This is available in all versions of RHEL 9.
- Modifying the environment variables directly on the container. This is available in RHEL 9.3 and later versions. Modifying the environment variables overrides the values from the configuration files.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- Check that the container is running:
$ podman ps -aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 07d4b4bff1b6 localhost/keylime-registrar:latest keylime_registrar 12 seconds ago Up 12 seconds 0.0.0.0:8881->8881/tcp, 0.0.0.0:8891->8891/tcp keylime-registrar