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

Fides.js integrate with backend GPP fields #4559

Conversation

allisonking
Copy link
Contributor

@allisonking allisonking commented Jan 17, 2024

Closes https://ethyca.atlassian.net/browse/PROD-1588
Closes https://ethyca.atlassian.net/browse/PROD-1586

Description Of Changes

This is similar in nature to #4504. In that PR, I had hard coded a JSON obj that acted as a temporary measure while the backend privacy notices did not have GPP fields yet. https://github.com/ethyca/fidesplus/pull/1281 adds GPP fields to privacy notices, so this PR refactors fides.js to use the backend objects instead of the JSON obj.

https://www.loom.com/share/6a8515c666c446f4a537fc1964ca083c?sid=0c046f2e-c858-4200-a584-e6d0788f5911

Code Changes

  • Update fides.js types
  • Update how supportedAPIs populates—we've actually side stepped a bit here since we no longer want to specify regions in the backend toml, and instead derive that from our recent locations/regulations work (see here for context). however, that work isn't reconciled with this work yet, so this is hard coded for now
  • Update the two functions that originally used the JSON obj to figure out gpp fields to instead use privacy notices
  • Update unit tests
  • Update cypress tests

Steps to Confirm

This is a similar setup as but with some more backend integration.

  • Run fidesplus on the branch asachs/gpp-config-api with nox -s "build(slim)" -- dev_prerelease && nox -s dev
  • Run privacy center at localhost:3000
  • Run admin-ui at localhost:3001
  • Visit /management/consent and enable GPP on the state level
  • Visit /consent/privacy-notices and you should see some new privacy notices that say they are for GPP US States. Add a system with third party targeted advertising as a data use, then enable the equivalent privacy notice (see loom for example)
  • Visit privacy center's localhost:3000/fides-js-demo.html using a vpn to California
  • Add an event listener in your console for GPP events __gpp('addEventListener', (data) => {console.log({data})})
  • Open the modal by clicking "Manage consent"
  • Opt in or out of everything
  • Your console should print out some updated GPP events with expected data, where uscav1 is in the parsedSections
    For example
    image

Also try US National

  • Go back to the admin-ui and visit /management/consent then switch GPP to the national level
  • Visit /consent/privacy-notices and enable the National data sales/sharing notice
    image
  • Now go back to privacy center's localhost:3000/fides-js-demo.html using a vpn to California
  • Add an event listener in your console for GPP events __gpp('addEventListener', (data) => {console.log({data})})
  • Open the modal by clicking "Manage consent"
  • Opt in or out of everything
  • Your console should print out some updated GPP events with expected data where usnatv1 is in the parsedSections
    image

Pre-Merge Checklist

Copy link

vercel bot commented Jan 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2024 8:29pm

@allisonking allisonking changed the base branch from main to aking/prod-1584/configure-gpp-ui January 17, 2024 19:46
Copy link

cypress bot commented Jan 17, 2024

Passing run #6030 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 1a22714 into f4a1d61...
Project: fides Commit: 7f58f1b518 ℹ️
Status: Passed Duration: 00:35 💡
Started: Jan 22, 2024 8:40 PM Ended: Jan 22, 2024 8:41 PM

Review all test suite changes for PR #4559 ↗︎

@allisonking allisonking marked this pull request as ready for review January 22, 2024 20:45
Copy link
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@allisonking allisonking merged commit 955e659 into aking/prod-1584/configure-gpp-ui Jan 23, 2024
10 checks passed
@allisonking allisonking deleted the aking/prod-1588/fides-js-backend-gpp branch January 23, 2024 16:36
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