Page MenuHomePhabricator

[reports-service] Encrypt reports
ClosedPublic

Authored by bartek on Aug 30 2023, 1:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 4 2024, 1:39 PM
Unknown Object (File)
Apr 4 2024, 1:39 PM
Unknown Object (File)
Apr 4 2024, 1:39 PM
Unknown Object (File)
Apr 4 2024, 1:39 PM
Unknown Object (File)
Apr 4 2024, 1:28 PM
Unknown Object (File)
Mar 12 2024, 4:30 AM
Unknown Object (File)
Feb 19 2024, 11:04 AM
Unknown Object (File)
Feb 19 2024, 10:05 AM
Subscribers

Details

Summary

ENG-4812.
Added encryption/decryption step for reports. It can be disabled via CLI flag (useful for debugging/local dev).

Depends on D9034, D8988

Test Plan

Stored a report in the database, then retrieved it via the API. Verified that the report was encrypted in the database and decrypted when retrieved.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Aug 30 2023, 2:27 PM
bartek added inline comments.
services/reports/src/http/mod.rs
89 ↗(On Diff #30607)

This pattern is no longer unreachable - the EncryptionError now matches it

services/reports/src/service.rs
43–45 ↗(On Diff #30607)

This is a zero-sized error - the AES library error is also 0-sized and doesn't provide any meaningful message

michal added inline comments.
services/reports/src/service.rs
44 ↗(On Diff #30607)

Is it possible to do something like this (probably with re-exported error from comm-services-lib)?

This revision is now accepted and ready to land.Aug 31 2023, 1:50 AM
services/reports/src/service.rs
44 ↗(On Diff #30607)

not really, derive_more is indeed limited

This revision was automatically updated to reflect the committed changes.