prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
424 stars 719 forks source link

GPP Phase 4 #2686

Open bretg opened 1 year ago

bretg commented 1 year ago

The next steps in GPP are covered by Phase 4 in the requirements document:

  1. build out a 'Privacy Module Infrastructure' that can be called from the Activity Infrastructure initially defined in Phase 3.
  2. build the first privacy module: US National Privacy

Privacy Infrastructure

Prebid Server-Specific Requirements

Any privacy regulation that needs to integrate with the Activity Infrastructure will need to confirm to a new interface. The details of the interface will be left to the Go and Java development teams, but the requirements are:

  1. Each privacy module has a 'module code'. e.g. "iab-usnat", "iab-tcf-ca".
  2. The privacy infra must have access to request consent strings and scoping information.
  3. The privacy infra must be configurable per account with the ability to define separate configuration for each regulation module.
  4. The privacy infra must be aware of which activity is currently being processed.
  5. Ideally, the privacy infra could be aware of the country and region of the request.
  6. It should be possible to refer to multiple privacy implementations by referring to the names with wildcards.
  7. The privacy infra must keep state for which 'module codes' have already been considered for this activity in this request. e.g. in the activity4 example below, since gpp-tcf-eu was already called, the reference to * means all regulations other than gpp-tcf-eu.
  8. The privacy infra will call one or more regulation modules as directed by the Activity Infrastructure.
  9. Each privacy module should return one of these states: "allowed", "disallowed", and "abstain".
  10. The privacy infra returns one answer, the least permissive answer, to the Activity Infrastructure:disallow takes precedence and 'abstain' is ignored as an answer.
  11. Each privacy implementation may have its own configuration requirements. e.g. GPP has the concept of "section ID" that other regulations may not.
  12. Errors in the account-level JSON should cause the system to either fail every request, or, preferably, fall back to the host-level default. We don't want to skip broken sections because that could wind up creating a legal problem. A failure should cause the system should generate an alert.general metric with N% logging and emit a warning in the ORTB response.
  13. Errors in host-level JSON should ideally cause a server startup error with a clear log entry.
  14. When ext.prebid.trace is set to either "basic" or "verbose", the system must emit a trace of processing steps so that users can determine what activities and privacy modules are doing. The details of what is emitted is left for the tech spec phase.

Non-Requirements

  1. It is not necessary for existing GDPR, COPPA, and CCPA functionality to immediately work within the Activity Infrastructure framework. These may be migrated as part of future efforts, or they may stay separate.
  2. Request-level configuration is not required.
  3. Activity Controls don't affect privacy modules

Linking the Activity and Privacy Infrastructures

See the use cases for how publishers might want to set up the existence of multiple in-scope regulations.

In addition to those use cases, the Prebid Server committee would like to be able to support future non-GPP privacy regulations.

This is the proposed allowactivities syntax extension for referring to privacy regulations from within the Activity controls:

  privacy: {
    allowactivities: {
      activity1: {
        rules: [{
          condition: {
            componentType: ["bidder", "analytics"]
          },
          allow: false
        },{
          privacyreg: ["iab.*"]   // only check IAB privacy modules
        }],
        default: false
      },
      activity2: {
        rules: [{
          privacyreg: ["iab.usgeneral"]  // if this module makes a decision, yay or nay, we're done
        },{
          privacyreg: ["iab.*"]   // check all other GPP modules
        }]
      },
      activity3: {
        rules: [{
          privacyreg: ["*"] // check all privacy modules, not just GPP
        }]
      },
      activity4: {
        rules: [{
          privacyreg: ["iab.tcfeu"]   // if tcf-eu makes a decision, yay or nay, we're done
        },{
          privacyreg: ["*"]    // check remaining privacy modules
        }]
      },
      activity5: {
        rules: [{
          privacyreg: ["custom.usutah"]
        },{
          privacyreg: ["*"]    // check remaining privacy modules
        }]
      }
    }
  }

Notes:

Configuring Privacy Modules

See General GPP Infrastructure requirements for background.

Prebid Server needs to allow accounts to configure privacy regulations. Here's the proposed syntax, which places the config in a new "privacy.modules" block. The proposal is that we define a new type of module interface for privacy modules. All the ones active for the given account would be registered here.

Assumptions:

Example config:

{
  "privacy": {
      "modules": [{
        "code": "iab.usgeneral",
        "enabled": true,                     // default
        "config": {
          … module-specific confg …
        }
      },{
        "code": "custom.sid12",   // custom module
        "config": {
          ... module-specific confg …
        }
      }]
    }
}

Notes:

Intended Processing:

  1. Each privacy module will determine from request parameters whether it's in scope. e.g. a GPP-based module will inspect the gpp_sid parameter and module configuration to determine whether it's in scope for the current request. A future TCF modules may use the gdpr scope flag and/or geographic information to determine whether it's in-scope.
  2. Each module is expected to do all relevant interpretation and return a status: "abstain", "allow", or "disallow".

US National Privacy

See US National Infrastructure requirements for background.

Assumptions:

Here's the proposed syntax:

{
  "privacy": {
      "modules": [{
        "code": "iab.usgeneral",     // privacy module coding the prebid default interpretation
        "config": {
          "skipSids": [11,12]
        }
      },{
        "code": "custom.sid11",      // custom hand-coded module
        "enabled": false
      },{
        "code": "iab.uscustomlogic",    // future module to support override logic
        "config": {
          "sids": [12],
          "normalizeFlags": false,
          "activityConfig": [{
            "activities": ["activity1", "activity2"],
            "restrictIfTrue": {
                { "or": [
                  { "==": [{"var": "MspaServiceProviderMode"},1] },
                  { "==": [{"var": "Gpc"},1] },
                  { "and": [
                     { "==": [{"var": "MspaServiceProviderMode"},2] },
                     { "or": [
                        { "==": [{"var": "SaleOptOut"},1] },
                        { "==": [{"var": "SaleOptOutNotice"},2] },
                        { "==": [{"var": "SharingNotice"},2] },
                        { "==": [{"var": "SharingOptOut"},1] },
                        { "==": [{"var": "TargetedAdvertisingOptOutNotice"},2] },
                        { "==": [{"var": "TargetedAdvertisingOptOut"},1] },
                        { "!=": [{"var": "KnownChildSensitiveDataConsents1"},0] },
                        { "!=": [{"var": "KnownChildSensitiveDataConsents2"},0] },
                        { "==": [{"var": "PersonalDataConsents"},1] }
                     ]}
                 ]}
              ]}
            }
          },{
            ... other activities ...
          }]
      }]
    }
  }
}

The 'iab.usgeneral' module config field:

The 'iab.uscustomlogic' module is an envisioned (later phase) module that can be used by publishers to override the default interpretation algorithm.

Intended processing:

  1. If defined by the allowactivities config, the activity infrastructure calls the relevant privacy module(s) with the supplied module configuration. If a privacy module name is defined more than once in the config, only the first is processed. Others result in emitting a warning and an alert.general metric.
  2. the iab.usgeneral module always normalizes as defined in the PRD and process against the defined Prebid default interpretation. Note that the interpretation does differ by activity.
  3. The iab.usgeneral module can be configured to 'abstain' for certain configured SIDs, allowing the publisher to define special processing for certain states.
  4. When the IAB adds a new SID that falls under US National, we will work with Prebid lawyers to determine the desired behavior. It may be as simple as adding the new SID to the internal list and upgrading the GPP library, or it may involve additional 'normalization' steps, or it may involve an entirely new privacy module.
bretg commented 1 year ago

Discussed in committee. The naming convention of the privacyreg syntax was debated along with what will happen for TCF-EU.

So what are some ways we can handle tcf-eu with respect to this new functionality?

1) Leave the existing functionality as completely standalone. Publisher activity controls don't work for GDPR/TCF -- exceptions can only be made through existing vendorExceptions in GDPR config. This system already supports pulling the TCF-EU string out of the GPP string.

2) Integrate the existing GDPR/TCF functionality into this privacy regulation system. Possible approaches: 2a) Integrate as part of the "privacyreg" system, but outside of the GPP infrastructure and just name it "tcf2" or perhaps "iab-tcf2". This gives publishers consistent control over exceptions. GDPR configuration can be exactly the same as currently documented. 2b) Migrate to live within the new GPP infrastructure as "gpp-tcf-eu". It can still look within the ORTB body and prioritize the user.consent over regs.gpp. Look for GDPR configuration in both the current location and in the new GPP location. 2c) Effectively support two TCF-EU modules: a migrated "gpp-tcf-eu" as well as the original "tcf2". The publisher can name these separately in the activityConfig. (This approach seems to have no advantages and could invite confusion)

Discussed additional requirements:

bretg commented 1 year ago

Discussed GDPR positioning:

Other items discussed

bretg commented 1 year ago

Updated after today's meeting:

bretg commented 1 year ago

PBS-Java 1.126 implements the iab.usgeneral module. Working on the iab.uscustomlogic module still

bretg commented 1 year ago

If activityConfig is not specified, the iab.uscustomlogic should return abstain.

bretg commented 11 months ago

Done with PBS-Java 1.130