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

[Backend] Track Privacy Experience that surfaced Notices/ Pull data from request headers #3311

Merged
merged 8 commits into from
May 18, 2023

Commits on May 18, 2023

  1. First commit: start tracking an anonymized ip address, as well as the…

    … experience config history and experience history records that displayed the notices to which the user consented.
    
    - Move request_origin, url_recorded, and user_agent from being in the request body. Instead pull these from the request headers or the privacy experience where applicable.
    - Also pull the ip address and mask before saving.
    pattisdr committed May 18, 2023
    Configuration menu
    Copy the full SHA
    37f8367 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c36de1c View commit details
    Browse the repository at this point in the history
  3. Update anonymize_ip_address to set last octet to 0 for ipv4 and last …

    …80 of the 128 bits to 0 for ipv6. Encrypt this field. Also add "method" to privacy preferences"
    pattisdr committed May 18, 2023
    Configuration menu
    Copy the full SHA
    b378958 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6a6b825 View commit details
    Browse the repository at this point in the history
  5. Expose privacy experience and config details in the historical report…

    …, as well as the truncated ip address and the method.
    pattisdr committed May 18, 2023
    Configuration menu
    Copy the full SHA
    53a9978 View commit details
    Browse the repository at this point in the history
  6. Reduce passing in the config history directly when saving preferences…

    …. Just pass in the privacy experience history id, and we can extract the config history from there if applicable.
    pattisdr committed May 18, 2023
    Configuration menu
    Copy the full SHA
    ba6d804 View commit details
    Browse the repository at this point in the history
  7. Continued cleanup.

    - Remove unused Request dependency
    - Remove unnecessary caching of notices when updating experience.
    - Stringify experience-related FK's on PrivacyPreferenceHistory to avoid circular dependencies now that we have a method in PrivacyExperience that needs to surface CurrentPrivacyPreferences
    - Add an enum for method - button, individual notices
    pattisdr committed May 18, 2023
    Configuration menu
    Copy the full SHA
    291da6d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4cfba74 View commit details
    Browse the repository at this point in the history