FermiHDI SDK Configuration Guide
The FermiHDI SDK follows the Cloud-Native Configuration Standard (12-Factor App). Configuration is derived from multiple sources with a strict precedence order.
Configuration Precedence
- Direct API calls: Manual overrides in C++, Python, or Go code.
- Environment Variables: The primary method for runtime configuration.
- DMS (Data Management System): Dynamic settings retrieved after mTLS enrollment.
- Local Defaults: Hardcoded safe defaults within the SDK.
Core Configuration Options
The SDK supports the _FILE pattern for all secret-sensitive variables. For any variable X, providing X_FILE with a valid path will read the secret from that file.
| Option | Environment Variable | Secret Companion | Default Value | Description |
|---|---|---|---|---|
| Network Stack | FERMIHDI_NETWORK_STACK |
N/A | posix |
posix or native (kernel-bypass). |
| Force POSIX | FERMIHDI_FORCE_POSIX |
N/A | false |
If 1, forces POSIX even where kernel-bypass is available. |
| Service Name | SERVICE_NAME |
N/A | hd_sdk_native |
Name reported in JSON logs. |
| Environment | ENV |
N/A | production |
Deployment environment (prod/staging). |
| Bootstrap Token | FERMIHDI_BOOTSTRAP_TOKEN |
_FILE |
(None) | Used for initial Day-0 PKI enrollment. |
| K8s Token | K8S_SERVICEACCOUNT_TOKEN |
_FILE |
(None) | K8s SA token for auto-enrollment. |
| Log Level | LOG_LEVEL |
N/A | info |
Minimum severity of logs. |
| OTEL Trace ID | OTEL_TRACE_ID |
N/A | (None) | Injected into JSON log objects. |
JSON Schema Validation
The SDK utilizes an internal JSON schema for validating dynamic configuration updates received from the Control Plane via the Proxy or DMS. The formal schema can be found in config_schema.json.