Skip to content

Remove legacy consent_store KV persistence #666

@ChristianPavilonis

Description

@ChristianPavilonis

Summary

Remove the legacy consent_store KV persistence path and make ec_identity_store the only KV-backed EC/consent lifecycle store.

Current deployments can run without consent_store, and normal request/auction flows do not read from it. Consent decisions are built from request cookies/headers/geo in EcContext, while identity state and withdrawal tombstones live in ec_identity_store.

Current behavior

  • consent_store is still exposed in config:
    • crates/trusted-server-core/src/consent_config.rs
    • trusted-server.toml
    • fastly.toml
  • The consent pipeline still has legacy KV fallback/write helpers:
    • crates/trusted-server-core/src/consent/mod.rs
    • crates/trusted-server-core/src/storage/kv_store.rs
  • Normal EC context creation passes kv_store: None, so the consent KV fallback/write path is not active:
    • crates/trusted-server-core/src/ec/mod.rs
  • Auction uses in-memory request consent from EcContext, not consent_store:
    • crates/trusted-server-core/src/auction/endpoints.rs
  • The only live consent_store touchpoint appears to be best-effort deletion during consent withdrawal:
    • crates/trusted-server-core/src/ec/finalize.rs

Proposed cleanup

  1. Remove consent_store from consent configuration and sample/local config.
  2. Remove consent KV fallback/write plumbing from ConsentPipelineInput and build_consent_context.
  3. Remove or quarantine crates/trusted-server-core/src/storage/kv_store.rs if it has no remaining callers.
  4. Remove best-effort consent_store deletion from EC finalization; keep ec_identity_store withdrawal tombstones as the authoritative revocation marker.
  5. Update/remove tests that assume a configured/missing consent_store behavior.
  6. Update docs/comments to clarify:
    • live consent comes from request cookies/headers/geo;
    • EC identity lifecycle and withdrawal state live in ec_identity_store;
    • there is no separate consent KV store.

Non-goals

  • Do not add all legacy consent-store fields to ec_identity_store unless there is a concrete product requirement for persisted consent fallback.
  • Do not change auction consent gating behavior.
  • Do not change EC tombstone semantics.

Notes

ec_identity_store currently stores a minimal consent snapshot (tcf, gpp, ok, updated) plus identity graph state. The legacy consent_store stored additional fields such as us_privacy, gpc, jurisdiction, gpp_section_ids, raw_ac_string, and a fingerprint. Those are still important as live request consent concepts, but they are not currently used as persisted runtime state.

Metadata

Metadata

Labels

enhancementNew feature or requestrustPull requests that update rust code

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions