-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUMM-1870 Add data encryption interface #797
Conversation
@@ -13,17 +13,17 @@ internal struct DataFormat { | |||
/// Suffixes the batch payload read from file. | |||
let suffixData: Data | |||
/// Separates entities written to file. | |||
let separatorData: Data | |||
let separatorByte: UInt8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enforce single byte separator for data splitting during decryption.
private let internalMonitor: InternalMonitor? | ||
|
||
/// Files marked as read. | ||
private var filesRead: [ReadableFile] = [] | ||
private var filesRead: Set<String> = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor refacto
adaa256
to
d3be27e
Compare
d3be27e
to
1373bc3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good in code, really well done 👍. I left one blocking feedback on partial mock (it has a bug now).
Also, as we have only add small unit tests in FileWriter
(encryption) and FileReader
(decryption), but no tests for integration layer, how about adding fuzzy condition to these tests:
func testItUsesExpectedPayloadFormatForUploads() throws { func testItUsesExpectedPayloadFormatForUploads() throws { func testItUsesExpectedPayloadFormatForUploads() throws { dd-sdk-ios/Tests/DatadogTests/Datadog/InternalMonitoring/InternalMonitoringFeatureTests.swift
Line 87 in 2fd580b
func testItSendsApplicationAndSDKInfoWithLogs() throws {
in which we could randomize the presence of DataEncryption
? Something this:
encryption: Bool.random() ? MockDataEncryption() : nil
These 4 tests assert each feature's payload format on a high level. Their behaviour should remain the same no matter if data encryption is or is not configured.
@@ -3,6 +3,7 @@ | |||
* [FEATURE] Web-view tracking. See [#729][] | |||
* [FEATURE] Integration with CI Visibility Tests. See[#761][] | |||
* [FEATURE] Add tvOS Support. See [#793][] | |||
* [FEATURE] Add data encryption interface on-disk data storage. See [#797][] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be part of Unreleased
section along with "Web-view tracking" which is already part 1.10.0-beta1
? I think that something is out-of-sync about the CHANGELOG.md
, no? IMO the 1.10.0-beta1
release should be listed here as regular release - otherwise we will lose track on what's inside 1.10.0
and what not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently don't add pre-release tag in the changelog, it is part of our release-process. I also think we should add pre-release sections tho! lets chat for updating the process before the next version.
Co-authored-by: Maciek Grzybowski <maciek.grzybowski@datadoghq.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good 🚀 👌
748ea4c
to
8851d46
Compare
What and why?
Allow users to set custom encryption routines for on-disk data storage.
How?
Expect an implementation of the following protocol:
Review checklist