sapling/eden/mononoke/cmdlib
Yan Soares Couto 8e3c29e8d1 Create class to load redaction config from configerator
Summary:
Adds class `ConfigeratorRedactedBlobs` that reads redaction data from configerator, and reloads it when necessary.

The class does this:
- Reads `RedactionSets` from configerator.
- For each key there, read `RedactionConfigBlobstore` looking for a `RedactionKeyList` with that key (these were populated by D29033598).
- From the keys listed, builds the map of redacted blobs, with the same format as before when it was fetched from XDB.
- Periodically checks if config changed. If so, reload the map of redactions. (should only happen when we land a new config change to redaction, which should be very very rare)
- We use ArcSwap to keep the config, as a good way to provide read-only access with eventual reloading.

Not implemented on this diff:
- Creation of `ConfigeratorRedactedBlobs`, or adding it to `RedactedBlobs` enum.

It's not used in this diff, will be used in the future, I split it mostly to make it easier to review.

Reviewed By: StanislavGlebik

Differential Revision: D29033595

fbshipit-source-id: 36603685433b6dd153f2c23123907f7311c20a32
2021-06-30 08:57:30 -07:00
..
environment third-party: patch os_info to properly support Centos Stream 2021-06-25 21:07:33 -07:00
src Create class to load redaction config from configerator 2021-06-30 08:57:30 -07:00
x_repo third-party: patch os_info to properly support Centos Stream 2021-06-25 21:07:33 -07:00
Cargo.toml third-party: patch os_info to properly support Centos Stream 2021-06-25 21:07:33 -07:00