Skip to content

Commit b5c9fa6

Browse files
committed
keylimectl: Add example configuration file
Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
1 parent 92f261b commit b5c9fa6

File tree

1 file changed

+234
-0
lines changed

1 file changed

+234
-0
lines changed

keylimectl/keylimectl.conf

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
# keylimectl Configuration File
2+
#
3+
# This file contains all available configuration options for keylimectl,
4+
# the modern command-line tool for Keylime remote attestation.
5+
#
6+
# Configuration files are completely optional. keylimectl will work out-of-the-box
7+
# with sensible defaults if no configuration file is provided.
8+
#
9+
# Configuration precedence (highest to lowest):
10+
# 1. Command-line arguments
11+
# 2. Environment variables (KEYLIME_*)
12+
# 3. Configuration files (this file)
13+
# 4. Default values
14+
#
15+
# This file uses TOML format. For more information about TOML syntax,
16+
# see: https://toml.io/
17+
18+
#
19+
# VERIFIER CONFIGURATION
20+
#
21+
# The verifier continuously monitors agent integrity and manages attestation policies.
22+
# It receives attestation evidence from agents and verifies their trustworthiness.
23+
#
24+
[verifier]
25+
26+
# IP address of the Keylime verifier service
27+
# Default: "127.0.0.1"
28+
# Environment variable: KEYLIME_VERIFIER__IP
29+
ip = "127.0.0.1"
30+
31+
# Port number of the Keylime verifier service
32+
# Default: 8881
33+
# Environment variable: KEYLIME_VERIFIER__PORT
34+
port = 8881
35+
36+
# Optional verifier identifier for multi-verifier deployments
37+
# Default: None
38+
# Environment variable: KEYLIME_VERIFIER__ID
39+
# id = "verifier-1"
40+
41+
#
42+
# REGISTRAR CONFIGURATION
43+
#
44+
# The registrar maintains a database of registered agents and their TPM public keys.
45+
# Agents must register with the registrar before they can be added to the verifier.
46+
#
47+
[registrar]
48+
49+
# IP address of the Keylime registrar service
50+
# Default: "127.0.0.1"
51+
# Environment variable: KEYLIME_REGISTRAR__IP
52+
ip = "127.0.0.1"
53+
54+
# Port number of the Keylime registrar service
55+
# Default: 8891
56+
# Environment variable: KEYLIME_REGISTRAR__PORT
57+
port = 8891
58+
59+
#
60+
# TLS/SSL SECURITY CONFIGURATION
61+
#
62+
# This section controls secure communication with Keylime services.
63+
# Proper TLS configuration is essential for production deployments.
64+
#
65+
[tls]
66+
67+
# Path to client certificate file for mutual TLS authentication
68+
# Default: None (no client certificate)
69+
# Environment variable: KEYLIME_TLS__CLIENT_CERT
70+
# client_cert = "/var/lib/keylime/cv_ca/client-cert.crt"
71+
72+
# Path to client private key file for mutual TLS authentication
73+
# Default: None (no client key)
74+
# Environment variable: KEYLIME_TLS__CLIENT_KEY
75+
# client_key = "/var/lib/keylime/cv_ca/client-private.pem"
76+
77+
# Password for encrypted client private key (if applicable)
78+
# Default: None (no password)
79+
# Environment variable: KEYLIME_TLS__CLIENT_KEY_PASSWORD
80+
# client_key_password = "your-key-password"
81+
82+
# List of trusted CA certificate file paths for server verification
83+
# Default: [] (empty list - uses system CA store)
84+
# Environment variable: KEYLIME_TLS__TRUSTED_CA (comma-separated)
85+
# trusted_ca = [
86+
# "/var/lib/keylime/cv_ca/cacert.crt",
87+
# "/etc/ssl/certs/additional-ca.crt"
88+
# ]
89+
90+
# Whether to verify server certificates
91+
# Default: true
92+
# Environment variable: KEYLIME_TLS__VERIFY_SERVER_CERT
93+
# WARNING: Only disable for testing - never in production!
94+
verify_server_cert = true
95+
96+
# Whether to enable mutual TLS for agent communications
97+
# Default: true
98+
# Environment variable: KEYLIME_TLS__ENABLE_AGENT_MTLS
99+
enable_agent_mtls = true
100+
101+
#
102+
# HTTP CLIENT CONFIGURATION
103+
#
104+
# This section controls HTTP client behavior including timeouts and retry logic.
105+
# These settings affect reliability and performance of API communications.
106+
#
107+
[client]
108+
109+
# Request timeout in seconds
110+
# Default: 60
111+
# Environment variable: KEYLIME_CLIENT__TIMEOUT
112+
timeout = 60
113+
114+
# Base retry interval in seconds
115+
# Default: 1.0
116+
# Environment variable: KEYLIME_CLIENT__RETRY_INTERVAL
117+
retry_interval = 1.0
118+
119+
# Whether to use exponential backoff for retries
120+
# Default: true
121+
# Environment variable: KEYLIME_CLIENT__EXPONENTIAL_BACKOFF
122+
# When true, retry delays increase exponentially: 1s, 2s, 4s, 8s, etc.
123+
# When false, retry delay remains constant at retry_interval
124+
exponential_backoff = true
125+
126+
# Maximum number of retry attempts
127+
# Default: 3
128+
# Environment variable: KEYLIME_CLIENT__MAX_RETRIES
129+
max_retries = 3
130+
131+
#
132+
# EXAMPLE CONFIGURATIONS
133+
#
134+
135+
# Example 1: Production configuration with custom services
136+
# [verifier]
137+
# ip = "keylime-verifier.company.com"
138+
# port = 8881
139+
# id = "prod-verifier-01"
140+
#
141+
# [registrar]
142+
# ip = "keylime-registrar.company.com"
143+
# port = 8891
144+
#
145+
# [tls]
146+
# client_cert = "/etc/keylime/certs/client.crt"
147+
# client_key = "/etc/keylime/certs/client.key"
148+
# trusted_ca = ["/etc/keylime/certs/ca.crt"]
149+
# verify_server_cert = true
150+
# enable_agent_mtls = true
151+
#
152+
# [client]
153+
# timeout = 30
154+
# retry_interval = 2.0
155+
# exponential_backoff = true
156+
# max_retries = 5
157+
158+
# Example 2: Development/testing configuration
159+
# [verifier]
160+
# ip = "192.168.1.100"
161+
# port = 8881
162+
#
163+
# [registrar]
164+
# ip = "192.168.1.101"
165+
# port = 8891
166+
#
167+
# [tls]
168+
# verify_server_cert = false # WARNING: Testing only!
169+
# enable_agent_mtls = false # WARNING: Testing only!
170+
#
171+
# [client]
172+
# timeout = 10
173+
# retry_interval = 0.5
174+
# max_retries = 1
175+
176+
# Example 3: IPv6 configuration
177+
# [verifier]
178+
# ip = "2001:db8::1"
179+
# port = 8881
180+
#
181+
# [registrar]
182+
# ip = "2001:db8::2"
183+
# port = 8891
184+
185+
#
186+
# ENVIRONMENT VARIABLE REFERENCE
187+
#
188+
# All configuration options can be overridden using environment variables
189+
# with the KEYLIME_ prefix and double underscores as section separators:
190+
#
191+
# KEYLIME_VERIFIER__IP=192.168.1.100
192+
# KEYLIME_VERIFIER__PORT=8881
193+
# KEYLIME_VERIFIER__ID=verifier-1
194+
# KEYLIME_REGISTRAR__IP=192.168.1.101
195+
# KEYLIME_REGISTRAR__PORT=8891
196+
# KEYLIME_TLS__CLIENT_CERT=/path/to/client.crt
197+
# KEYLIME_TLS__CLIENT_KEY=/path/to/client.key
198+
# KEYLIME_TLS__CLIENT_KEY_PASSWORD=password
199+
# KEYLIME_TLS__TRUSTED_CA=/path/ca1.crt,/path/ca2.crt
200+
# KEYLIME_TLS__VERIFY_SERVER_CERT=true
201+
# KEYLIME_TLS__ENABLE_AGENT_MTLS=true
202+
# KEYLIME_CLIENT__TIMEOUT=60
203+
# KEYLIME_CLIENT__RETRY_INTERVAL=1.0
204+
# KEYLIME_CLIENT__EXPONENTIAL_BACKOFF=true
205+
# KEYLIME_CLIENT__MAX_RETRIES=3
206+
207+
#
208+
# COMMAND-LINE ARGUMENT REFERENCE
209+
#
210+
# Configuration can also be overridden via command-line arguments:
211+
#
212+
# --verifier-ip <IP> Override verifier IP address
213+
# --verifier-port <PORT> Override verifier port
214+
# --registrar-ip <IP> Override registrar IP address
215+
# --registrar-port <PORT> Override registrar port
216+
# -c, --config <FILE> Specify explicit configuration file path
217+
# -v, --verbose Enable verbose logging
218+
# -q, --quiet Suppress non-essential output
219+
# --format <FORMAT> Output format (json, table, yaml)
220+
221+
#
222+
# CONFIGURATION FILE LOCATIONS
223+
#
224+
# keylimectl searches for configuration files in this order:
225+
# 1. Explicit path provided via -c/--config (required to exist)
226+
# 2. ./keylimectl.toml (current directory)
227+
# 3. ./keylimectl.conf (current directory)
228+
# 4. /etc/keylime/keylimectl.conf (system-wide)
229+
# 5. /usr/etc/keylime/keylimectl.conf (alternative system-wide)
230+
# 6. ~/.config/keylime/keylimectl.conf (user-specific)
231+
# 7. ~/.keylimectl.toml (user-specific)
232+
# 8. $XDG_CONFIG_HOME/keylime/keylimectl.conf (XDG standard)
233+
#
234+
# If no configuration files are found, keylimectl works with defaults.

0 commit comments

Comments
 (0)