You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto-nullify previous HMAC key after EDPM deployment completes
After an HMAC key rotation, the previous key remained valid
indefinitely until an operator manually cleared it. This widened
the replay/compromise window if the cleanup was forgotten.
Add a two-phase state machine (modeled on the RabbitMQ TransportURL
credential rotation pattern) that tracks EDPM deployment progress
via the new lib-common IsSecretHashInSync helper:
Phase 1: detect that the HMAC secret hash has gone out of sync
with what NodeSets have deployed (config regenerated with new key).
Phase 2: wait for the hash to come back in sync (deployment
completed, all compute nodes have the new key).
Once both phases complete, hmac-key-previous is automatically
cleared. If no NodeSets exist, the previous key is cleared
immediately.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This copies the current key to `hmac-key-previous`, generates a new key, and removes the annotation. The receiver accepts both keys during the rotation window. After redeploying compute nodes with the new key, the previous key can be cleared:
648
+
This copies the current key to `hmac-key-previous`, generates a new key, and removes the annotation. The receiver accepts both keys during the rotation window.
After redeploying compute nodes with the new key (via `servicesOverride: [instanceha-monitoring]`), the controller **automatically clears `hmac-key-previous`** once the EDPM deployment completes and the secret hash is back in sync across all NodeSets. This uses a two-phase state machine tracked in `status.hmacKeyRotationSynced`.
651
+
652
+
If no `OpenStackDataPlaneNodeSets` exist in the namespace, the previous key is cleared immediately.
653
653
654
-
Replace `instanceha-heartbeat-hmac` with `<instance-name>-heartbeat-hmac` if your CR has a different name.
654
+
> **Prerequisite:** The `instanceha-monitoring` service must be listed in the NodeSet's `spec.services` so its secret hash is tracked. The service's `secretRef.name` must match the actual secret name (`<instance-name>-heartbeat-hmac`). For non-default CR names, create a custom `OpenStackDataPlaneService` with the correct `secretRef`.
655
655
656
656
The secret name is published in `status.heartbeatHMACSecret` for integration with the EDPM dataplane operator.
0 commit comments