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

Remove legacy GDPR AMP config flag used to prevent buyer ID scrub on AMP requests #1565

Merged
merged 7 commits into from
Jan 5, 2021

Conversation

bsardo
Copy link
Collaborator

@bsardo bsardo commented Nov 5, 2020

Related issue: #1312

The replacement strategy in #1564 should be merged in before this.

@bsardo bsardo marked this pull request as draft November 5, 2020 02:43
@SyntaxNode
Copy link
Contributor

We'll wait to merge this until we build the final release this year. We had publisher complaints the first time around so this is deemed higher risk than normal, and we're not keen on doing this in Q4 2020. Also gives more time for hosts to discover the new GDPR account level config.

@bsardo bsardo marked this pull request as ready for review November 19, 2020 15:16
config/config.go Outdated
@@ -1045,7 +1044,6 @@ func SetupViper(v *viper.Viper, filename string) {
v.SetDefault("gdpr.tcf2.special_purpose1.enabled", true)
v.SetDefault("gdpr.tcf2.purpose_one_treatement.enabled", true)
v.SetDefault("gdpr.tcf2.purpose_one_treatement.access_allowed", true)
v.SetDefault("gdpr.amp_exception", false)
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of providing a warning to the host if this is enabled to guide them to understanding the change?

Copy link
Contributor

@guscarreon guscarreon left a comment

Choose a reason for hiding this comment

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

Looks pretty good. I just have a couple of questions.

config/config.go Outdated
@@ -218,7 +218,7 @@ type GDPR struct {
NonStandardPublisherMap map[string]struct{}
TCF1 TCF1 `mapstructure:"tcf1"`
TCF2 TCF2 `mapstructure:"tcf2"`
AMPException bool `mapstructure:"amp_exception"`
AMPException bool `mapstructure:"amp_exception"` // Deprecated: Use account-level GDPR AMP settings
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: Can we move the comment on top of this line? Just to follow the format of the comment that follows in line 222

config/config.go Outdated
@@ -231,6 +231,10 @@ func (cfg *GDPR) validate(errs configErrors) configErrors {
if cfg.HostVendorID < 0 || cfg.HostVendorID > 0xffff {
errs = append(errs, fmt.Errorf("gdpr.host_vendor_id must be in the range [0, %d]. Got %d", 0xffff, cfg.HostVendorID))
}

if cfg.AMPException == true {
glog.Warning("GDPR AMP Exception is enabled but it is no longer supported. If you need to disable GDPR for AMP, you can do so on a per-account basis or disable it for all request types at the host level.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we throw an error instead? If they set it to true and, for some reason, they miss this warning in their log, we might give them the false impression that the feature is still in place, isn't it? This PR already removed the AMPException() bool from the interface definition, so there's no way they are going to be able to use this value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We recently added a warning in the last release indicating that this config flag is deprecated and will be removed in a future version. This commit will now throw a fatal error as discussed.

@SyntaxNode
Copy link
Contributor

Let's discuss with the Prebid.org Committee how we want to handle feature deprecation.

@SyntaxNode SyntaxNode requested a review from mansinahar December 7, 2020 20:19
@SyntaxNode SyntaxNode assigned mansinahar and unassigned guscarreon Dec 7, 2020
config/config.go Outdated
@@ -214,7 +214,7 @@ func (cfg *GDPR) validate(errs []error) []error {
glog.Warning("gdpr.host_vendor_id was not specified. Host company GDPR checks will be skipped.")
}
if cfg.AMPException == true {
glog.Warning("gdpr.amp_exception is deprecated and will be removed in a future version. If you need to disable GDPR for AMP, you may do so per-account (gdpr.integration_enabled.amp) or at the host level for the default account (account_defaults.gdpr.integration_enabled.amp).")
errs = append(errs, fmt.Errorf("gdpr.amp_exception has been discontinued and must be set to false. If you need to disable GDPR for AMP, you may do so per-account (gdpr.integration_enabled.amp) or at the host level for the default account (account_defaults.gdpr.integration_enabled.amp)"))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say the end result is we want hosts to remove the value in their config. I suggest a slight word change to something along the lines of:

"gdpr.amp_exception has been discontinued and must be removed from your config. If you need ..."

SyntaxNode
SyntaxNode previously approved these changes Dec 18, 2020
Copy link
Contributor

@mansinahar mansinahar left a comment

Choose a reason for hiding this comment

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

@@ -264,7 +213,7 @@ func TestApply(t *testing.T) {
m.On("ScrubDevice", req.Device, test.expectedDeviceID, test.expectedDeviceIPv4, test.expectedDeviceIPv6, test.expectedDeviceGeo).Return(replacedDevice).Once()
m.On("ScrubUser", req.User, test.expectedUser, test.expectedUserGeo).Return(replacedUser).Once()

test.enforcement.apply(req, test.ampGDPRException, m)
test.enforcement.apply(req, m)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're not using ampGDPRException any longer, any reason to still keep it as part of the testCase struct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope, I'll remove. Good catch.

@SyntaxNode SyntaxNode merged commit 277762b into prebid:master Jan 5, 2021
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.

4 participants