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

GPP Control Module: usnat string #10117

Merged
merged 42 commits into from
Jun 27, 2023
Merged

GPP Control Module: usnat string #10117

merged 42 commits into from
Jun 27, 2023

Conversation

dgirardi
Copy link
Collaborator

@dgirardi dgirardi commented Jun 19, 2023

Type of change

  • Feature

Description of change

  • extract CMP client logic into shared library code
  • update GPP logic to fetch all availlable section data
  • make gppConsent available as an activity parameter. this, unfortunately, broke a lot of tests that were doing their setup outside of a setup block - not all of them could be fixed cleanly (see TODO notes)
  • introduce new gppControl_usnat module that provides a default interpretation for the usnat GPP section (defined in this doc)

More info

  • the gppControl_usnat module is activated together with the consentManagementGpp module, for now. (It has no config of its own, but it needs GPP config to exist before doing anything)
  • at least with the CMP that I am using as reference (from this test page), it appears that there is no clean equivalent of the TCF "useractioncomplete" flow. On the first load consent starts out always denied (rather than pending). In that test page, settings are not persisted so there's no good way to test the "consent granted" flow.

@dgirardi
Copy link
Collaborator Author

dgirardi commented Jun 22, 2023 via email

@patmmccann
Copy link
Collaborator

patmmccann commented Jun 23, 2023

Hopefully re-ready for review with all changes to the object parsing in @bretg !

export function isTransmitUfpdConsentDenied(cd) {
// SensitiveDataProcessing[1-5,11]=1 OR SensitiveDataProcessing[6,7,9,10,12]<>0 OR
const mustBeZero = [6, 7, 9, 10, 12];
const mustBeZeroSubtractedVector = mustBeZero.map((number) => number - 1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if I'm missing something with the greater logic here, but why are we subtracting 1 from the values of the arrays that indicate the SesnsitiveDataProcessing property? From the in-line comments, it'd seem we would want to check property number 6 is not equal to 0 - but this logic (from what I gather) would reduce the property number to 5. Can someone clarify?

Copy link
Collaborator

@patmmccann patmmccann Jun 26, 2023

Choose a reason for hiding this comment

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

SensitiveDataProcessing is a 12 item array where each element can have value 0,1, or 2. Items [6, 7, 9, 10, 12] starting at array index 1 must be zero according to the design doc. I subtract 1 from each of them on this line to get [5,6,8,9,11] and then in the following line subset the javascript array to all the positions that must be zero. Then finally, we return consent denied if any of these are non-zero

The two lines above could be consolidated to mustBeZero=[5,6,8,9,11] but I was hoping to start with a constant in the design doc and manipulate from there.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The unit test for this mustBeZero function is here btw

it('should be true (consent denied to add ufpd) with consent to process biometric data, as this should not be on openrtb', () => {

The idea is,when it comes to sensitive biometric data, prebid default is to not append to user first party data unless that consent field is N/A

Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

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

Though I can't test everything here, it seems like it's okay from what I can tell.

@patmmccann patmmccann merged commit 5e22f2f into master Jun 27, 2023
2 checks passed
@patmmccann patmmccann deleted the gpp-usnat branch June 27, 2023 12:48
@patmmccann
Copy link
Collaborator

docs prebid/prebid.github.io#4683

@patmmccann patmmccann changed the title GPP: usnat support GPP Control Module: usnat string Jun 27, 2023
github-ishara-chan-tung pushed a commit to ebuzzing/Prebid.js that referenced this pull request Jul 12, 2023
* share CMP client code

* consentManagementGpp: fetch section data

* mock out getSection for legacy tests

* Make gppConsent available as an activity param; also fix various test suites to set up during set up

* gppControl_usnat

* load all section data (instead of trying to figure out what is applicable)

* Do not expect top window to be accessible

* update usnat consent interpretation

* Update activityControls.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls.js

---------

Co-authored-by: Patrick McCann <[email protected]>
musikele pushed a commit to rubicon-project/Prebid.js that referenced this pull request Aug 28, 2023
* share CMP client code

* consentManagementGpp: fetch section data

* mock out getSection for legacy tests

* Make gppConsent available as an activity param; also fix various test suites to set up during set up

* gppControl_usnat

* load all section data (instead of trying to figure out what is applicable)

* Do not expect top window to be accessible

* update usnat consent interpretation

* Update activityControls.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls.js

---------

Co-authored-by: Patrick McCann <[email protected]>
santii7395 pushed a commit to themaven-net/Prebid.js that referenced this pull request Aug 28, 2023
* share CMP client code

* consentManagementGpp: fetch section data

* mock out getSection for legacy tests

* Make gppConsent available as an activity param; also fix various test suites to set up during set up

* gppControl_usnat

* load all section data (instead of trying to figure out what is applicable)

* Do not expect top window to be accessible

* update usnat consent interpretation

* Update activityControls.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls_spec.js

* Update activityControls.js

* Update activityControls.js

* Update activityControls.js

---------

Co-authored-by: Patrick McCann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants