Encryption configuration reference
Red Hat Edge Manager configures encryption at rest through a combination of a Kubernetes secret containing the encryption key and an internal configuration that maps keys to identifiers. Use these details to verify your encryption setup, plan key rotations, or configure monitoring.
Encryption key storage Copy linkLink copied!
During installation and upgrades, a Helm preinstall and preupgrade Job generates a 256-bit AES key by running openssl rand -base64 32 and stores the result in a Kubernetes secret. On upgrades, the Job preserves the existing key to prevent data loss:
| Property | Value |
|---|---|
|
Secret name |
|
|
Secret data key |
|
|
Mount path (inside containers) |
|
|
File permissions |
|
|
Algorithm |
AES-256-GCM (authenticated encryption) |
|
Key size |
256 bits (32 bytes), base64-encoded in the secret |
All Red Hat Edge Manager control-plane components mount this secret as a read-only volume. The following deployments load the encryption key at startup:
-
flightctl-api -
flightctl-worker -
flightctl-periodic -
flightctl-alert-exporter -
flightctl-alertmanager-proxy -
flightctl-imagebuilder-api -
flightctl-imagebuilder-worker -
flightctl-remote-access
Encryption configuration structure Copy linkLink copied!
The internal encryption configuration supports multiple keys for rotation scenarios:
{
"encryption": {
"keys": [
{
"id": "default",
"path": "/root/.flightctl/encryption/key"
}
],
"activeKeyID": "default"
}
}
| Field | Type | Description |
|---|---|---|
|
|
Array |
List of available encryption keys. Each entry has an |
|
|
String |
The |
Encrypted data format Copy linkLink copied!
Encrypted values are stored in the PostgreSQL database by using the following format:
enc:v1:<key_id>:<base64-encoded payload>
The base64-encoded payload contains a 12-byte GCM nonce prepended to the AES-GCM ciphertext and authentication tag. Values that do not begin with enc: are treated as unencrypted plain text for backward compatibility during migration.
Active key verification Copy linkLink copied!
Services that initialize encryption log the active encryption configuration during startup. After a key rotation, verify that the new key is reported as active:
$ oc logs deployment/flightctl-api -n <project_name> --tail=50 | grep -i "encryption"
The log output should report the active key. For example:
Encryption initialized: active=v1/default
The flightctl_encryption_active_key_info metric also reports the active configuration:
flightctl_encryption_active_key_info{algorithm="AES-256-GCM",key_id="default",strategy="v1"} 1
Canary validation Copy linkLink copied!
Red Hat Edge Manager validates encryption canaries during startup. A canary is a known value encrypted and stored in PostgreSQL for a specific strategy and key ID.
During startup, Red Hat Edge Manager ensures that a canary exists for the active strategy and key, then validates all persisted canaries. Existing canaries must be decryptable with the configured keys and must match the expected value.
If an existing canary cannot be decrypted or does not match the expected value, the affected service fails to start. Canary validation failures are reported through service logs and service status.
Prometheus metrics Copy linkLink copied!
Red Hat Edge Manager control-plane components expose the following encryption metrics for monitoring:
| Metric | Type | Description |
|---|---|---|
|
|
Counter |
Total number of encryption and decryption operations, labeled by |
|
|
Histogram |
Latency of encryption and decryption operations in seconds. |
|
|
Counter |
Total number of encryption errors, labeled by |
|
|
Counter |
Total number of canary validation checks, labeled by |
|
|
Gauge |
Indicates the active encryption configuration, labeled by |
Tracing Copy linkLink copied!
When tracing is enabled, Red Hat Edge Manager produces OpenTelemetry spans under the flightctl/encryption tracer. The following spans are available:
-
process -
encrypt -
decrypt -
canary-validate
Span attributes convey the operation type, strategy, key ID, result, and processing action where applicable. Traces do not contain plain text values, ciphertext, encryption keys, nonces, authentication tags, or protected resource contents.
Troubleshooting encryption Copy linkLink copied!
| Symptom | Possible cause | Action |
|---|---|---|
|
Service fails to start after installation or upgrade |
Missing, malformed, or incorrectly sized encryption key |
Check that the key file is mounted and that it decodes to exactly 32 bytes. |
|
Service fails to start after key rotation |
A required historical key was removed too early, or canary validation failed |
Check service logs, restore the previous key, and restart the service. |
|
Old key cannot be retired |
Migration has not completed, or data still references the old key |
Wait for the |
|
Migration does not complete |
Migration worker is failing or cannot decrypt existing data |
Check migration events, service logs, and encryption error metrics. |