Page MenuHomePhabricator

[reports-service] Encrypt reports
ClosedPublic

Authored by bartek on Aug 30 2023, 1:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 6:55 PM
Unknown Object (File)
Mon, Nov 25, 2:01 PM
Unknown Object (File)
Fri, Nov 22, 4:35 AM
Unknown Object (File)
Oct 27 2024, 3:48 PM
Unknown Object (File)
Oct 27 2024, 3:48 PM
Unknown Object (File)
Oct 27 2024, 3:48 PM
Unknown Object (File)
Oct 27 2024, 3:48 PM
Unknown Object (File)
Oct 27 2024, 3:42 PM
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
No Lint Coverage
Unit
No Test Coverage

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

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

services/reports/src/service.rs
43–45

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

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

not really, derive_more is indeed limited

This revision was automatically updated to reflect the committed changes.