Page MenuHomePhabricator

[reports-service] Encrypt reports
ClosedPublic

Authored by bartek on Aug 30 2023, 1:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 12, 1:29 PM
Unknown Object (File)
Wed, Jun 12, 12:36 PM
Unknown Object (File)
Mon, Jun 10, 2:39 AM
Unknown Object (File)
Sun, May 26, 9:42 AM
Unknown Object (File)
Sun, May 26, 9:42 AM
Unknown Object (File)
Sun, May 26, 9:42 AM
Unknown Object (File)
Sun, May 26, 9:42 AM
Unknown Object (File)
Sun, May 26, 9:37 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
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.