Skip to content

feat: sidecar-local secret store and http_secret_providers config - #402

Open
nappa85 wants to merge 1 commit into
mainfrom
fir-429-v2/06-sidecar-store-config
Open

feat: sidecar-local secret store and http_secret_providers config#402
nappa85 wants to merge 1 commit into
mainfrom
fir-429-v2/06-sidecar-store-config

Conversation

@nappa85

@nappa85 nappa85 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Why

PR05 added the rewrite codec and gateway client as standalone pieces. This
PR adds the last two prerequisites before they can be wired into the
request pipeline (PR07): an in-memory placeholder↔secret dictionary scoped
to a single request/response cycle, and the SidecarConfig field that
lets an operator declare which HTTP vaults to intercept.

What Changed

  • crates/firma-sidecar/src/secret_store.rs (new): SidecarSecretStore,
    an in-memory dictionary built per-request from the
    (placeholder, secret_bytes) pairs returned by
    secret_gateway_client::resolve_batch (PR05), discarded after
    forwarding — firma-run remains the sole persistent store. Uses
    Aho-Corasick for scanning, mirroring firma_run::secret::SecretStore's
    design but living in the Sidecar crate to avoid a circular dependency.
    SecretValue wraps its bytes in Zeroizing so they're wiped on drop.
  • crates/firma-sidecar/src/config.rs: adds http_secret_providers to
    SidecarConfig — the HTTP-vault counterpart to firma-run's
    secret_providers, declaring which hosts/response shapes to intercept
    and how to extract secrets from them (IntegrationSpec::Http from
    firma-secret-provider).
  • crates/firma-sidecar/src/lib.rs: module wiring for secret_store.

Risks / Notes

  • Still not wired into RequestHandlerSidecarSecretStore and the new
    config field are inert until PR07.
  • SecretValue's zeroize-on-drop matches the existing pattern in
    firma-run::secret::SecretValue; no new zeroization approach
    introduced.

AI Assistance

Generated with AI (Claude Code); human-reviewed for correctness and scope.

@nappa85
nappa85 requested a review from LukeMathWalker July 31, 2026 08:21
@nappa85
nappa85 force-pushed the fir-429-v2/05-sidecar-rewrite-gateway branch 2 times, most recently from 63d03d4 to bf9b333 Compare August 1, 2026 10:21
@nappa85
nappa85 force-pushed the fir-429-v2/06-sidecar-store-config branch 2 times, most recently from 25ab430 to a5e29dd Compare August 1, 2026 12:00
@nappa85
nappa85 force-pushed the fir-429-v2/05-sidecar-rewrite-gateway branch 9 times, most recently from 286e97a to e2f4f85 Compare August 3, 2026 13:59
@nappa85
nappa85 force-pushed the fir-429-v2/06-sidecar-store-config branch from a5e29dd to 75ba54e Compare August 3, 2026 14:01
@nappa85
nappa85 force-pushed the fir-429-v2/05-sidecar-rewrite-gateway branch from e2f4f85 to 97be10e Compare August 3, 2026 14:06
@nappa85
nappa85 force-pushed the fir-429-v2/06-sidecar-store-config branch 3 times, most recently from 463328a to 403886d Compare August 3, 2026 14:22
@nappa85
nappa85 force-pushed the fir-429-v2/05-sidecar-rewrite-gateway branch 11 times, most recently from f59380c to 62e71ee Compare August 5, 2026 09:06
@nappa85
nappa85 force-pushed the fir-429-v2/05-sidecar-rewrite-gateway branch 23 times, most recently from dca746f to 30c6238 Compare August 7, 2026 13:03
Base automatically changed from fir-429-v2/05-sidecar-rewrite-gateway to main August 7, 2026 13:32
@nappa85
nappa85 force-pushed the fir-429-v2/06-sidecar-store-config branch 5 times, most recently from 8854009 to 9c4fd2a Compare August 10, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant