Skip to content

Unify per-service KV sync for both LocalFile and RemoteBootstrap services #299

Description

@sehkone

Background

The sync_remote_eab_payloads() and sync_remote_responder_hmac_payloads() functions in rotate.rs only target RemoteBootstrap services. Once service sidecar ctmpl files are converted to KV-backed templates (see the parent issue), LocalFile services will also need per-service KV writes to receive rotated secrets via OpenBao Agent.

Current state

  • sync_remote_eab_payloads (src/commands/rotate.rs:530-554):
    Filters with .filter(|entry| matches!(entry.delivery_mode, DeliveryMode::RemoteBootstrap)) (line 541), then writes EAB credentials to bootroot/services/{name}/eab.

  • sync_remote_responder_hmac_payloads (src/commands/rotate.rs:556-579):
    Same RemoteBootstrap filter (line 566), writes HMAC to bootroot/services/{name}/http_responder_hmac.

  • rotate_trust_sync (src/commands/rotate.rs:1004):
    Per-service trust KV writes (lines 1035-1042) also only target remote services.

Changes

  1. Remove RemoteBootstrap filter — write per-service KV for all registered services (both LocalFile and RemoteBootstrap).

  2. Rename functions to reflect broader scope:

    • sync_remote_eab_payloadssync_service_eab_payloads
    • sync_remote_responder_hmac_payloadssync_service_responder_hmac_payloads
  3. Initialize per-service KV at bootroot service add time — when a new service is registered, seed its KV paths (eab, http_responder_hmac, trust) with current global values so the service sidecar has valid secrets from the start.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions