Skip to content
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

feat: local event data encrypt #321

Closed
wants to merge 22 commits into from
Closed

feat: local event data encrypt #321

wants to merge 22 commits into from

Conversation

YoloMao
Copy link
Collaborator

@YoloMao YoloMao commented Jul 12, 2024

PR 内容

  • 添加是否开启本地事件数据加密的配置项 localEventEncryptEnabled
  • 添加对本地事件数据库内的事件数据写入加密,读取解密 (AES)

测试步骤

  • 测试加解密是否正常:使用大量、各种格式的事件进行测试,通过最终上报的数据进行校验
  • 测试各集成方式是否正常:在 Cocoapods/SwiftPM 集成环境下,分别使用 JSON/Protobuf 上报格式进行测试
  • 测试 App 版本兼容性:从未开启本地事件数据加密 (config?.localEventEncryptEnabled = false 或默认) 升级到开启本地事件数据加密 (config?.localEventEncryptEnabled = true) 的 App 版本,查看前后数据是否都正常上报
  • 测试版本兼容性:开启本地事件数据加密后,SDK 3.x 升级至 4.x,对应的升级逻辑是否正常
  • 测试特殊场景:
    • 加密秘钥 key 被意外移除:如 KeyChain 所有数据被用户清空导致加密秘钥重新生成,之前已存储的加密事件数据因秘钥不符无法正常解密,这些事件将上报为空,测试方式:通过手动在代码层面修改加密秘钥进行测试
    • TODO

影响范围

事件入库与上报

@YoloMao YoloMao closed this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants