Repository: prebid/prebid-server
Pull request #3154 (2023-09-26 16:44:04)

Remove Config Backwards Compatibility: Account GDPR Purpose
The upcoming 2.0 release will remove backwards compatibility for deprecated host and account configuration options. This PR removes string data type support for `gdpr.purpose{1-10}.enforce_purpose`. This field must now be specified as a bool indicating whether or not the purpose should be enforced. Previously, the enforcement algorithm for a given purpose could be specified through this field by setting it to "full", "basic" or "none". The enforcement algorithm should now be specified using `gdpr.purpose{1-10}.enforce_algo`.


Patch:
diff --git a/account/account.go b/account/account.go
index 156ad5e6..7b5f9435 100644
--- a/account/account.go
+++ b/account/account.go
@@ -4,7 +4,6 @@ import (
 	"context"
 	"encoding/json"
 	"fmt"
-	"github.com/buger/jsonparser"
 	"github.com/prebid/go-gdpr/consentconstants"
 	"github.com/prebid/prebid-server/config"
 	"github.com/prebid/prebid-server/errortypes"
@@ -12,7 +11,6 @@ import (
 	"github.com/prebid/prebid-server/openrtb_ext"
 	"github.com/prebid/prebid-server/stored_requests"
 	"github.com/prebid/prebid-server/util/iputil"
-	jsonpatch "gopkg.in/evanphx/json-patch.v4"
 )
 
 // GetAccount looks up the config.Account object referenced by the given accountID, with access rules applied
@@ -50,23 +48,10 @@ func GetAccount(ctx context.Context, cfg *config.Configuration, fetcher stored_r
 		// accountID resolved to a valid account, merge with AccountDefaults for a complete config
 		account = &config.Account{}
 		err := json.Unmarshal(accountJSON, account)
-
-		// this logic exists for backwards compatibility. If the initial unmarshal fails above, we attempt to
-		// resolve it by converting the GDPR enforce purpose fields and then attempting an unmarshal again before
-		// declaring a malformed account error.
-		// unmarshal fetched account to determine if it is well-formed
-		var deprecatedPurposeFields []string
 		if _, ok := err.(*json.UnmarshalTypeError); ok {
-			// attempt to convert deprecated GDPR enforce purpose fields to resolve issue
-			accountJSON, err, deprecatedPurposeFields = ConvertGDPREnforcePurposeFields(accountJSON)
-			// unmarshal again to check if unmarshal error still exists after GDPR field conversion
-			err = json.Unmarshal(accountJSON, account)
-
-			if _, ok := err.(*json.UnmarshalTypeError); ok {
-				return nil, []error{&errortypes.MalformedAcct{
-					Message: fmt.Sprintf("The prebid-server account config for account id \"%s\" is malformed. Please reach out to the prebid server host.", accountID),
-				}}
-			}
+			return nil, []error{&errortypes.MalformedAcct{
+				Message: fmt.Sprintf("The prebid-server account config for account id \"%s\" is malformed. Please reach out to the prebid server host.", accountID),
+			}}
 		}
 		usingGDPRChannelEnabled := useGDPRChannelEnabled(account)
 		usingCCPAChannelEnabled := useCCPAChannelEnabled(account)
@@ -77,10 +62,7 @@ func GetAccount(ctx context.Context, cfg *config.Configuration, fetcher stored_r
 		if usingCCPAChannelEnabled {
 			me.RecordAccountCCPAChannelEnabledWarning(accountID)
 		}
-		for _, purposeName := range deprecatedPurposeFields {
-			me.RecordAccountGDPRPurposeWarning(accountID, purposeName)
-		}
-		if len(deprecatedPurposeFields) > 0 || usingGDPRChannelEnabled || usingCCPAChannelEnabled {
+		if usingGDPRChannelEnabled || usingCCPAChannelEnabled {
 			me.RecordAccountUpgradeStatus(accountID)
 		}
 
@@ -111,9 +93,6 @@ func GetAccount(ctx context.Context, cfg *config.Configuration, fetcher stored_r
 		account.Privacy.IPv4Config.AnonKeepBits = iputil.IPv4DefaultMaskingBitSize
 	}
 
-	// set the value of events.enabled field based on deprecated events_enabled field and ensure backward compatibility
-	deprecateEventsEnabledField(account)
-
 	return account, nil
 }
 
@@ -179,84 +158,6 @@ func setDerivedConfig(account *config.Account) {
 	}
 }
 
-// PatchAccount represents the GDPR portion of a publisher account configuration that can be mutated
-// for backwards compatibility reasons
-type PatchAccount struct {
-	GDPR map[string]*PatchAccountGDPRPurpose `json:"gdpr"`
-}
-
-// PatchAccountGDPRPurpose represents account-specific GDPR purpose configuration data that can be mutated
-// for backwards compatibility reasons
-type PatchAccountGDPRPurpose struct {
-	EnforceAlgo    string `json:"enforce_algo,omitempty"`
-	EnforcePurpose *bool  `json:"enforce_purpose,omitempty"`
-}
-
-// ConvertGDPREnforcePurposeFields is responsible for ensuring account GDPR config backwards compatibility
-// given the recent type change of gdpr.purpose{1-10}.enforce_purpose from a string to a bool. This function
-// iterates over each GDPR purpose config and sets enforce_purpose and enforce_algo to the appropriate
-// bool and string values respectively if enforce_purpose is a string and enforce_algo is not set
-func ConvertGDPREnforcePurposeFields(config []byte) (newConfig []byte, err error, deprecatedPurposeFields []string) {
-	gdprJSON, _, _, err := jsonparser.Get(config, "gdpr")
-	if err != nil && err == jsonparser.KeyPathNotFoundError {
-		return config, nil, deprecatedPurposeFields
-	}
-	if err != nil {
-		return nil, err, deprecatedPurposeFields
-	}
-
-	newAccount := PatchAccount{
-		GDPR: map[string]*PatchAccountGDPRPurpose{},
-	}
-
-	for i := 1; i <= 10; i++ {
-		purposeName := fmt.Sprintf("purpose%d", i)
-
-		enforcePurpose, purposeDataType, _, err := jsonparser.Get(gdprJSON, purposeName, "enforce_purpose")
-		if err != nil && err == jsonparser.KeyPathNotFoundError {
-			continue
-		}
-		if err != nil {
-			return nil, err, deprecatedPurposeFields
-		}
-		if purposeDataType != jsonparser.String {
-			continue
-		} else {
-			deprecatedPurposeFields = append(deprecatedPurposeFields, purposeName)
-		}
-
-		_, _, _, err = jsonparser.Get(gdprJSON, purposeName, "enforce_algo")
-		if err != nil && err != jsonparser.KeyPathNotFoundError {
-			return nil, err, deprecatedPurposeFields
-		}
-		if err == nil {
-			continue
-		}
-
-		newEnforcePurpose := false
-		if string(enforcePurpose) == "full" {
-			newEnforcePurpose = true
-		}
-
-		newAccount.GDPR[purposeName] = &PatchAccountGDPRPurpose{
-			EnforceAlgo:    "full",
-			EnforcePurpose: &newEnforcePurpose,
-		}
-	}
-
-	patchConfig, err := json.Marshal(newAccount)
-	if err != nil {
-		return nil, err, deprecatedPurposeFields
-	}
-
-	newConfig, err = jsonpatch.MergePatch(config, patchConfig)
-	if err != nil {
-		return nil, err, deprecatedPurposeFields
-	}
-
-	return newConfig, nil, deprecatedPurposeFields
-}
-
 func useGDPRChannelEnabled(account *config.Account) bool {
 	return account.GDPR.ChannelEnabled.IsSet() && !account.GDPR.IntegrationEnabled.IsSet()
 }
@@ -264,16 +165,3 @@ func useGDPRChannelEnabled(account *config.Account) bool {
 func useCCPAChannelEnabled(account *config.Account) bool {
 	return account.CCPA.ChannelEnabled.IsSet() && !account.CCPA.IntegrationEnabled.IsSet()
 }
-
-// deprecateEventsEnabledField is responsible for ensuring backwards compatibility of "events_enabled" field.
-// This function favors "events.enabled" field over deprecated "events_enabled" field, if values for both are set.
-// If only deprecated "events_enabled" field is set then it sets the same value to "events.enabled" field.
-func deprecateEventsEnabledField(account *config.Account) {
-	if account != nil {
-		if account.Events.Enabled == nil {
-			account.Events.Enabled = account.EventsEnabled
-		}
-		// assign the old value to the new value so old and new are always the same even though the new value is what is used in the application code.
-		account.EventsEnabled = account.Events.Enabled
-	}
-}
diff --git a/adapters/adnuntius/adnuntius.go b/adapters/adnuntius/adnuntius.go
index 3f91d740..fd667ddc 100644
--- a/adapters/adnuntius/adnuntius.go
+++ b/adapters/adnuntius/adnuntius.go
@@ -39,6 +39,12 @@ type Ad struct {
 		Amount   float64
 		Currency string
 	}
+	NetBid struct {
+		Amount float64
+	}
+	GrossBid struct {
+		Amount float64
+	}
 	DealID          string `json:"dealId,omitempty"`
 	AdId            string
 	CreativeWidth   string
@@ -194,6 +200,7 @@ func (a *adapter) generateRequests(ortbRequest openrtb2.BidRequest) ([]*adapters
 				Message: fmt.Sprintf("ignoring imp id=%s, Adnuntius supports only Banner", imp.ID),
 			}}
 		}
+
 		var bidderExt adapters.ExtImpBidder
 		if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil {
 			return nil, []error{&errortypes.BadInput{
@@ -204,7 +211,7 @@ func (a *adapter) generateRequests(ortbRequest openrtb2.BidRequest) ([]*adapters
 		var adnuntiusExt openrtb_ext.ImpExtAdnunitus
 		if err := json.Unmarshal(bidderExt.Bidder, &adnuntiusExt); err != nil {
 			return nil, []error{&errortypes.BadInput{
-				Message: fmt.Sprintf("Error unmarshalling ExtImpBmtm: %s", err.Error()),
+				Message: fmt.Sprintf("Error unmarshalling ExtImpValues: %s", err.Error()),
 			}}
 		}
 
@@ -328,7 +335,7 @@ func getGDPR(request *openrtb2.BidRequest) (string, string, error) {
 	return gdpr, consent, nil
 }
 
-func generateAdResponse(ad Ad, impId string, html string, request *openrtb2.BidRequest) (*openrtb2.Bid, []error) {
+func generateAdResponse(ad Ad, imp openrtb2.Imp, html string, request *openrtb2.BidRequest) (*openrtb2.Bid, []error) {
 
 	creativeWidth, widthErr := strconv.ParseInt(ad.CreativeWidth, 10, 64)
 	if widthErr != nil {
@@ -344,6 +351,31 @@ func generateAdResponse(ad Ad, impId string, html string, request *openrtb2.BidR
 		}}
 	}
 
+	price := ad.Bid.Amount
+
+	var bidderExt adapters.ExtImpBidder
+	if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil {
+		return nil, []error{&errortypes.BadInput{
+			Message: fmt.Sprintf("Error unmarshalling ExtImpBidder: %s", err.Error()),
+		}}
+	}
+
+	var adnuntiusExt openrtb_ext.ImpExtAdnunitus
+	if err := json.Unmarshal(bidderExt.Bidder, &adnuntiusExt); err != nil {
+		return nil, []error{&errortypes.BadInput{
+			Message: fmt.Sprintf("Error unmarshalling ExtImpValues: %s", err.Error()),
+		}}
+	}
+
+	if adnuntiusExt.BidType != "" {
+		if strings.EqualFold(string(adnuntiusExt.BidType), "net") {
+			price = ad.NetBid.Amount
+		}
+		if strings.EqualFold(string(adnuntiusExt.BidType), "gross") {
+			price = ad.GrossBid.Amount
+		}
+	}
+
 	adDomain := []string{}
 	for _, url := range ad.DestinationUrls {
 		domainArray := strings.Split(url, "/")
@@ -353,14 +385,14 @@ func generateAdResponse(ad Ad, impId string, html string, request *openrtb2.BidR
 
 	bid := openrtb2.Bid{
 		ID:      ad.AdId,
-		ImpID:   impId,
+		ImpID:   imp.ID,
 		W:       creativeWidth,
 		H:       creativeHeight,
 		AdID:    ad.AdId,
 		DealID:  ad.DealID,
 		CID:     ad.LineItemId,
 		CrID:    ad.CreativeId,
-		Price:   ad.Bid.Amount * 1000,
+		Price:   price * 1000,
 		AdM:     html,
 		ADomain: adDomain,
 	}
@@ -377,7 +409,7 @@ func generateBidResponse(adnResponse *AdnResponse, request *openrtb2.BidRequest)
 		adunitMap[adnRespAdunit.TargetId] = adnRespAdunit
 	}
 
-	for i, imp := range request.Imp {
+	for _, imp := range request.Imp {
 
 		auId, _, _, err := jsonparser.Get(imp.Ext, "bidder", "auId")
 		if err != nil {
@@ -394,7 +426,7 @@ func generateBidResponse(adnResponse *AdnResponse, request *openrtb2.BidRequest)
 			ad := adunit.Ads[0]
 			currency = ad.Bid.Currency
 
-			adBid, err := generateAdResponse(ad, request.Imp[i].ID, adunit.Html, request)
+			adBid, err := generateAdResponse(ad, imp, adunit.Html, request)
 			if err != nil {
 				return nil, []error{&errortypes.BadInput{
 					Message: fmt.Sprintf("Error at ad generation"),
@@ -407,7 +439,7 @@ func generateBidResponse(adnResponse *AdnResponse, request *openrtb2.BidRequest)
 			})
 
 			for _, deal := range adunit.Deals {
-				dealBid, err := generateAdResponse(deal, request.Imp[i].ID, deal.Html, request)
+				dealBid, err := generateAdResponse(deal, imp, deal.Html, request)
 				if err != nil {
 					return nil, []error{&errortypes.BadInput{
 						Message: fmt.Sprintf("Error at ad generation"),
diff --git a/adapters/improvedigital/improvedigital.go b/adapters/improvedigital/improvedigital.go
index b934ac75..c26a200a 100644
--- a/adapters/improvedigital/improvedigital.go
+++ b/adapters/improvedigital/improvedigital.go
@@ -3,19 +3,18 @@ package improvedigital
 import (
 	"encoding/json"
 	"fmt"
-	"net/http"
-	"strconv"
-	"strings"
-
 	"github.com/prebid/openrtb/v19/openrtb2"
 	"github.com/prebid/prebid-server/adapters"
 	"github.com/prebid/prebid-server/config"
 	"github.com/prebid/prebid-server/errortypes"
 	"github.com/prebid/prebid-server/openrtb_ext"
+	"net/http"
+	"regexp"
+	"strconv"
+	"strings"
 )
 
 const (
-	buyingTypeRTB                    = "rtb"
 	isRewardedInventory              = "is_rewarded_inventory"
 	stateRewardedInventoryEnable     = "1"
 	consentProvidersSettingsInputKey = "ConsentedProvidersSettings"
@@ -43,6 +42,8 @@ type ImpExtBidder struct {
 	}
 }
 
+var dealDetectionRegEx = regexp.MustCompile("(classic|deal)")
+
 // MakeRequests makes the HTTP requests which should be made to fetch bids.
 func (a *ImprovedigitalAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
 	numRequests := len(request.Imp)
@@ -119,6 +120,7 @@ func (a *ImprovedigitalAdapter) MakeBids(internalRequest *openrtb2.BidRequest, e
 	}
 
 	var bidResp openrtb2.BidResponse
+	var impMap = make(map[string]openrtb2.Imp)
 	if err := json.Unmarshal(response.Body, &bidResp); err != nil {
 		return nil, []error{err}
 	}
@@ -134,7 +136,6 @@ func (a *ImprovedigitalAdapter) MakeBids(internalRequest *openrtb2.BidRequest, e
 	}
 
 	seatBid := bidResp.SeatBid[0]
-
 	if len(seatBid.Bid) == 0 {
 		return nil, nil
 	}
@@ -142,10 +143,14 @@ func (a *ImprovedigitalAdapter) MakeBids(internalRequest *openrtb2.BidRequest, e
 	bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(seatBid.Bid))
 	bidResponse.Currency = bidResp.Cur
 
+	for i := range internalRequest.Imp {
+		impMap[internalRequest.Imp[i].ID] = internalRequest.Imp[i]
+	}
+
 	for i := range seatBid.Bid {
 		bid := seatBid.Bid[i]
 
-		bidType, err := getMediaTypeForImp(bid.ImpID, internalRequest.Imp)
+		bidType, err := getBidType(bid, impMap)
 		if err != nil {
 			return nil, []error{err}
 		}
@@ -158,7 +163,7 @@ func (a *ImprovedigitalAdapter) MakeBids(internalRequest *openrtb2.BidRequest, e
 			}
 
 			bidExtImprovedigital := bidExt.Improvedigital
-			if bidExtImprovedigital.LineItemID != 0 && bidExtImprovedigital.BuyingType != "" && bidExtImprovedigital.BuyingType != buyingTypeRTB {
+			if bidExtImprovedigital.LineItemID != 0 && dealDetectionRegEx.MatchString(bidExtImprovedigital.BuyingType) {
 				bid.DealID = strconv.Itoa(bidExtImprovedigital.LineItemID)
 			}
 		}
@@ -169,7 +174,6 @@ func (a *ImprovedigitalAdapter) MakeBids(internalRequest *openrtb2.BidRequest, e
 		})
 	}
 	return bidResponse, nil
-
 }
 
 // Builder builds a new instance of the Improvedigital adapter for the given bidder with the given config.
@@ -180,31 +184,73 @@ func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server co
 	return bidder, nil
 }
 
-func getMediaTypeForImp(impID string, imps []openrtb2.Imp) (openrtb_ext.BidType, error) {
-	for _, imp := range imps {
-		if imp.ID == impID {
-			if imp.Banner != nil {
-				return openrtb_ext.BidTypeBanner, nil
-			}
-
-			if imp.Video != nil {
-				return openrtb_ext.BidTypeVideo, nil
-			}
+func getBidType(bid openrtb2.Bid, impMap map[string]openrtb2.Imp) (openrtb_ext.BidType, error) {
+	// there must be a matching imp against bid.ImpID
+	imp, found := impMap[bid.ImpID]
+	if !found {
+		return "", &errortypes.BadServerResponse{
+			Message: fmt.Sprintf("Failed to find impression for ID: \"%s\"", bid.ImpID),
+		}
+	}
 
-			if imp.Native != nil {
-				return openrtb_ext.BidTypeNative, nil
+	// if MType is not set in server response, try to determine it
+	if bid.MType == 0 {
+		if !isMultiFormatImp(imp) {
+			// Not a bid for multi format impression. So, determine MType from impression
+			if imp.Banner != nil {
+				bid.MType = openrtb2.MarkupBanner
+			} else if imp.Video != nil {
+				bid.MType = openrtb2.MarkupVideo
+			} else if imp.Audio != nil {
+				bid.MType = openrtb2.MarkupAudio
+			} else if imp.Native != nil {
+				bid.MType = openrtb2.MarkupNative
+			} else { // This should not happen.
+				// Let's handle it just in case by returning an error.
+				return "", &errortypes.BadServerResponse{
+					Message: fmt.Sprintf("Could not determine MType from impression with ID: \"%s\"", bid.ImpID),
+				}
 			}
-
+		} else {
 			return "", &errortypes.BadServerResponse{
-				Message: fmt.Sprintf("Unknown impression type for ID: \"%s\"", impID),
+				Message: fmt.Sprintf("Bid must have non-zero MType for multi format impression with ID: \"%s\"", bid.ImpID),
 			}
 		}
 	}
 
-	// This shouldnt happen. Lets handle it just incase by returning an error.
-	return "", &errortypes.BadServerResponse{
-		Message: fmt.Sprintf("Failed to find impression for ID: \"%s\"", impID),
+	// map MType to BidType
+	switch bid.MType {
+	case openrtb2.MarkupBanner:
+		return openrtb_ext.BidTypeBanner, nil
+	case openrtb2.MarkupVideo:
+		return openrtb_ext.BidTypeVideo, nil
+	case openrtb2.MarkupAudio:
+		return openrtb_ext.BidTypeAudio, nil
+	case openrtb2.MarkupNative:
+		return openrtb_ext.BidTypeNative, nil
+	default:
+		// This shouldn't happen. Let's handle it just in case by returning an error.
+		return "", &errortypes.BadServerResponse{
+			Message: fmt.Sprintf("Unsupported MType %d for impression with ID: \"%s\"", bid.MType, bid.ImpID),
+		}
+	}
+}
+
+func isMultiFormatImp(imp openrtb2.Imp) bool {
+	formatCount := 0
+	if imp.Banner != nil {
+		formatCount++
+	}
+	if imp.Video != nil {
+		formatCount++
+	}
+	if imp.Audio != nil {
+		formatCount++
+	}
+	if imp.Native != nil {
+		formatCount++
 	}
+	return formatCount > 1
 }
 
 // This method responsible to clone request and convert additional consent providers string to array when additional consent provider found
diff --git a/adapters/rubicon/rubicon.go b/adapters/rubicon/rubicon.go
index a7ab9ad8..635f6e14 100644
--- a/adapters/rubicon/rubicon.go
+++ b/adapters/rubicon/rubicon.go
@@ -98,11 +98,10 @@ type rubiconDataExt struct {
 }
 
 type rubiconUserExt struct {
-	Eids        []openrtb2.EID   `json:"eids,omitempty"`
-	RP          rubiconUserExtRP `json:"rp"`
-	LiverampIdl string           `json:"liveramp_idl,omitempty"`
-	Data        json.RawMessage  `json:"data,omitempty"`
-	Consent     string           `json:"consent,omitempty"`
+	Eids    []openrtb2.EID   `json:"eids,omitempty"`
+	RP      rubiconUserExtRP `json:"rp"`
+	Data    json.RawMessage  `json:"data,omitempty"`
+	Consent string           `json:"consent,omitempty"`
 }
 
 type rubiconSiteExtRP struct {
@@ -340,19 +339,6 @@ func (a *RubiconAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ada
 				if userBuyerUID == "" {
 					userBuyerUID = extractUserBuyerUID(userExtRP.Eids)
 				}
-
-				mappedRubiconUidsParam, errors := getSegments(userExtRP.Eids)
-				if len(errors) > 0 {
-					errs = append(errs, errors...)
-					continue
-				}
-
-				if err := updateUserExtWithSegments(&userExtRP, mappedRubiconUidsParam); err != nil {
-					errs = append(errs, err)
-					continue
-				}
-
-				userExtRP.LiverampIdl = mappedRubiconUidsParam.liverampIdl
 			}
 
 			if userCopy.Consent != "" {
@@ -941,66 +927,6 @@ func extractUserBuyerUID(eids []openrtb2.EID) string {
 	return ""
 }
 
-func getSegments(eids []openrtb2.EID) (mappedRubiconUidsParam, []error) {
-	rubiconUidsParam := mappedRubiconUidsParam{
-		segments: make([]string, 0),
-	}
-	errs := make([]error, 0)
-
-	for _, eid := range eids {
-		switch eid.Source {
-		case "liveintent.com":
-			uids := eid.UIDs
-			if len(uids) > 0 {
-				if eid.Ext != nil {
-					var eidExt rubiconUserExtEidExt
-					if err := json.Unmarshal(eid.Ext, &eidExt); err != nil {
-						errs = append(errs, &errortypes.BadInput{
-							Message: err.Error(),
-						})
-						continue
-					}
-					rubiconUidsParam.segments = eidExt.Segments
-				}
-			}
-		case "liveramp.com":
-			uids := eid.UIDs
-			if len(uids) > 0 {
-				uidId := uids[0].ID
-				if uidId != "" && rubiconUidsParam.liverampIdl == "" {
-					rubiconUidsParam.liverampIdl = uidId
-				}
-			}
-		}
-	}
-
-	return rubiconUidsParam, errs
-}
-
-func updateUserExtWithSegments(userExtRP *rubiconUserExt, rubiconUidsParam mappedRubiconUidsParam) error {
-	if len(rubiconUidsParam.segments) > 0 {
-
-		if rubiconUidsParam.segments != nil {
-			userExtRPTarget := make(map[string]interface{})
-
-			if userExtRP.RP.Target != nil {
-				if err := json.Unmarshal(userExtRP.RP.Target, &userExtRPTarget); err != nil {
-					return &errortypes.BadInput{Message: err.Error()}
-				}
-			}
-
-			userExtRPTarget["LIseg"] = rubiconUidsParam.segments
-
-			if target, err := json.Marshal(&userExtRPTarget); err != nil {
-				return &errortypes.BadInput{Message: err.Error()}
-			} else {
-				userExtRP.RP.Target = target
-			}
-		}
-	}
-	return nil
-}
-
 func isVideo(imp openrtb2.Imp) bool {
 	video := imp.Video
 	if video != nil {
diff --git a/config/account.go b/config/account.go
index 4b0ceeef..d57fdb90 100644
--- a/config/account.go
+++ b/config/account.go
@@ -28,7 +28,6 @@ type Account struct {
 	ID                      string                                      `mapstructure:"id" json:"id"`
 	Disabled                bool                                        `mapstructure:"disabled" json:"disabled"`
 	CacheTTL                DefaultTTLs                                 `mapstructure:"cache_ttl" json:"cache_ttl"`
-	EventsEnabled           *bool                                       `mapstructure:"events_enabled" json:"events_enabled"` // Deprecated: Use events.enabled instead.
 	CCPA                    AccountCCPA                                 `mapstructure:"ccpa" json:"ccpa"`
 	GDPR                    AccountGDPR                                 `mapstructure:"gdpr" json:"gdpr"`
 	DebugAllow              bool                                        `mapstructure:"debug_allow" json:"debug_allow"`
diff --git a/config/bidderinfo.go b/config/bidderinfo.go
index 0027e4d2..3b3f86d4 100644
--- a/config/bidderinfo.go
+++ b/config/bidderinfo.go
@@ -321,8 +321,13 @@ func processBidderAliases(aliasNillableFieldsByBidder map[string]aliasNillableFi
 		if aliasBidderInfo.PlatformID == "" {
 			aliasBidderInfo.PlatformID = parentBidderInfo.PlatformID
 		}
-		if aliasBidderInfo.Syncer == nil {
-			aliasBidderInfo.Syncer = parentBidderInfo.Syncer
+		if aliasBidderInfo.Syncer == nil && parentBidderInfo.Syncer != nil {
+			syncerKey := aliasBidderInfo.AliasOf
+			if parentBidderInfo.Syncer.Key != "" {
+				syncerKey = parentBidderInfo.Syncer.Key
+			}
+			syncer := Syncer{Key: syncerKey}
+			aliasBidderInfo.Syncer = &syncer
 		}
 		if aliasBidderInfo.UserSyncURL == "" {
 			aliasBidderInfo.UserSyncURL = parentBidderInfo.UserSyncURL
diff --git a/config/config.go b/config/config.go
index f503d0fc..a8d276a1 100644
--- a/config/config.go
+++ b/config/config.go
@@ -6,7 +6,6 @@ import (
 	"fmt"
 	"net/url"
 	"reflect"
-	"strconv"
 	"strings"
 	"time"
 
@@ -15,7 +14,6 @@ import (
 	"github.com/prebid/openrtb/v19/openrtb2"
 	"github.com/prebid/prebid-server/errortypes"
 	"github.com/prebid/prebid-server/openrtb_ext"
-	"github.com/prebid/prebid-server/util/ptrutil"
 	"github.com/spf13/viper"
 )
 
@@ -29,7 +27,6 @@ type Configuration struct {
 	Client           HTTPClient  `mapstructure:"http_client"`
 	CacheClient      HTTPClient  `mapstructure:"http_client_cache"`
 	AdminPort        int         `mapstructure:"admin_port"`
-	EnableGzip       bool        `mapstructure:"enable_gzip"`
 	Compression      Compression `mapstructure:"compression"`
 	// GarbageCollectorThreshold allocates virtual memory (in bytes) which is not used by PBS but
 	// serves as a hack to trigger the garbage collector only when the heap reaches at least this size.
@@ -141,12 +138,12 @@ func (cfg *Configuration) validate(v *viper.Viper) []error {
 		glog.Warning(`With account_defaults.disabled=true, host-defined accounts must exist and have "disabled":false. All other requests will be rejected.`)
 	}
 
-	if cfg.PriceFloors.Enabled {
-		glog.Warning(`cfg.PriceFloors.Enabled will currently not do anything as price floors feature is still under development.`)
+	if cfg.AccountDefaults.Events.Enabled {
+		glog.Warning(`account_defaults.events has no effect as the feature is under development.`)
 	}
 
-	if len(cfg.AccountDefaults.Events.VASTEvents) > 0 {
-		errs = append(errs, errors.New("account_defaults.Events.VASTEvents has no effect as the feature is under development."))
+	if cfg.PriceFloors.Enabled {
+		glog.Warning(`cfg.PriceFloors.Enabled will currently not do anything as price floors feature is still under development.`)
 	}
 
 	errs = cfg.Experiment.validate(errs)
@@ -411,7 +408,6 @@ func (t *TCF2) PurposeOneTreatmentAccessAllowed() bool {
 
 // Making a purpose struct so purpose specific details can be added later.
 type TCF2Purpose struct {
-	Enabled     bool   `mapstructure:"enabled"` // Deprecated: Use enforce_purpose instead
 	EnforceAlgo string `mapstructure:"enforce_algo"`
 	// Integer representation of enforcement algo for performance improvement on compares
 	EnforceAlgoID  TCF2EnforcementAlgo
@@ -695,9 +691,6 @@ func New(v *viper.Viper, bidderInfos BidderInfos, normalizeBidderName func(strin
 	// Update account defaults and generate base json for patch
 	c.AccountDefaults.CacheTTL = c.CacheURL.DefaultTTLs // comment this out to set explicitly in config
 
-	// Update the deprecated and new events enabled values for account defaults.
-	c.AccountDefaults.EventsEnabled, c.AccountDefaults.Events.Enabled = migrateConfigEventsEnabled(c.AccountDefaults.EventsEnabled, c.AccountDefaults.Events.Enabled)
-
 	if err := c.MarshalAccountDefaults(); err != nil {
 		return nil, err
 	}
@@ -894,6 +887,25 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) {
 	v.SetDefault("category_mapping.filesystem.enabled", true)
 	v.SetDefault("category_mapping.filesystem.directorypath", "./static/category-mapping")
 	v.SetDefault("category_mapping.http.endpoint", "")
+	v.SetDefault("stored_requests.database.connection.driver", "")
+	v.SetDefault("stored_requests.database.connection.dbname", "")
+	v.SetDefault("stored_requests.database.connection.host", "")
+	v.SetDefault("stored_requests.database.connection.port", 0)
+	v.SetDefault("stored_requests.database.connection.user", "")
+	v.SetDefault("stored_requests.database.connection.password", "")
+	v.SetDefault("stored_requests.database.connection.query_string", "")
+	v.SetDefault("stored_requests.database.connection.tls.root_cert", "")
+	v.SetDefault("stored_requests.database.connection.tls.client_cert", "")
+	v.SetDefault("stored_requests.database.connection.tls.client_key", "")
+	v.SetDefault("stored_requests.database.fetcher.query", "")
+	v.SetDefault("stored_requests.database.fetcher.amp_query", "")
+	v.SetDefault("stored_requests.database.initialize_caches.timeout_ms", 0)
+	v.SetDefault("stored_requests.database.initialize_caches.query", "")
+	v.SetDefault("stored_requests.database.initialize_caches.amp_query", "")
+	v.SetDefault("stored_requests.database.poll_for_updates.refresh_rate_seconds", 0)
+	v.SetDefault("stored_requests.database.poll_for_updates.timeout_ms", 0)
+	v.SetDefault("stored_requests.database.poll_for_updates.query", "")
+	v.SetDefault("stored_requests.database.poll_for_updates.amp_query", "")
 	v.SetDefault("stored_requests.filesystem.enabled", false)
 	v.SetDefault("stored_requests.filesystem.directorypath", "./stored_requests/data/by_id")
 	v.SetDefault("stored_requests.directorypath", "./stored_requests/data/by_id")
@@ -911,6 +923,25 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) {
 	v.SetDefault("stored_requests.http_events.timeout_ms", 0)
 	// stored_video is short for stored_video_requests.
 	// PBS is not in the business of storing video content beyond the normal prebid cache system.
+	v.SetDefault("stored_video_req.database.connection.driver", "")
+	v.SetDefault("stored_video_req.database.connection.dbname", "")
+	v.SetDefault("stored_video_req.database.connection.host", "")
+	v.SetDefault("stored_video_req.database.connection.port", 0)
+	v.SetDefault("stored_video_req.database.connection.user", "")
+	v.SetDefault("stored_video_req.database.connection.password", "")
+	v.SetDefault("stored_video_req.database.connection.query_string", "")
+	v.SetDefault("stored_video_req.database.connection.tls.root_cert", "")
+	v.SetDefault("stored_video_req.database.connection.tls.client_cert", "")
+	v.SetDefault("stored_video_req.database.connection.tls.client_key", "")
+	v.SetDefault("stored_video_req.database.fetcher.query", "")
+	v.SetDefault("stored_video_req.database.fetcher.amp_query", "")
+	v.SetDefault("stored_video_req.database.initialize_caches.timeout_ms", 0)
+	v.SetDefault("stored_video_req.database.initialize_caches.query", "")
+	v.SetDefault("stored_video_req.database.initialize_caches.amp_query", "")
+	v.SetDefault("stored_video_req.database.poll_for_updates.refresh_rate_seconds", 0)
+	v.SetDefault("stored_video_req.database.poll_for_updates.timeout_ms", 0)
+	v.SetDefault("stored_video_req.database.poll_for_updates.query", "")
+	v.SetDefault("stored_video_req.database.poll_for_updates.amp_query", "")
 	v.SetDefault("stored_video_req.filesystem.enabled", false)
 	v.SetDefault("stored_video_req.filesystem.directorypath", "")
 	v.SetDefault("stored_video_req.http.endpoint", "")
@@ -924,6 +955,25 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) {
 	v.SetDefault("stored_video_req.http_events.endpoint", "")
 	v.SetDefault("stored_video_req.http_events.refresh_rate_seconds", 0)
 	v.SetDefault("stored_video_req.http_events.timeout_ms", 0)
+	v.SetDefault("stored_responses.database.connection.driver", "")
+	v.SetDefault("stored_responses.database.connection.dbname", "")
+	v.SetDefault("stored_responses.database.connection.host", "")
+	v.SetDefault("stored_responses.database.connection.port", 0)
+	v.SetDefault("stored_responses.database.connection.user", "")
+	v.SetDefault("stored_responses.database.connection.password", "")
+	v.SetDefault("stored_responses.database.connection.query_string", "")
+	v.SetDefault("stored_responses.database.connection.tls.root_cert", "")
+	v.SetDefault("stored_responses.database.connection.tls.client_cert", "")
+	v.SetDefault("stored_responses.database.connection.tls.client_key", "")
+	v.SetDefault("stored_responses.database.fetcher.query", "")
+	v.SetDefault("stored_responses.database.fetcher.amp_query", "")
+	v.SetDefault("stored_responses.database.initialize_caches.timeout_ms", 0)
+	v.SetDefault("stored_responses.database.initialize_caches.query", "")
+	v.SetDefault("stored_responses.database.initialize_caches.amp_query", "")
+	v.SetDefault("stored_responses.database.poll_for_updates.refresh_rate_seconds", 0)
+	v.SetDefault("stored_responses.database.poll_for_updates.timeout_ms", 0)
+	v.SetDefault("stored_responses.database.poll_for_updates.query", "")
+	v.SetDefault("stored_responses.database.poll_for_updates.amp_query", "")
 	v.SetDefault("stored_responses.filesystem.enabled", false)
 	v.SetDefault("stored_responses.filesystem.directorypath", "")
 	v.SetDefault("stored_responses.http.endpoint", "")
@@ -1019,7 +1069,6 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) {
 	v.SetDefault("account_defaults.price_floors.use_dynamic_data", false)
 	v.SetDefault("account_defaults.price_floors.max_rules", 100)
 	v.SetDefault("account_defaults.price_floors.max_schema_dims", 3)
-	v.SetDefault("account_defaults.events_enabled", false)
 	v.SetDefault("account_defaults.privacy.ipv6.anon_keep_bits", 56)
 	v.SetDefault("account_defaults.privacy.ipv4.anon_keep_bits", 24)
 
@@ -1059,8 +1108,6 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) {
 	v.SetDefault("request_validation.ipv4_private_networks", []string{"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "169.254.0.0/16", "127.0.0.0/8"})
 	v.SetDefault("request_validation.ipv6_private_networks", []string{"::1/128", "fc00::/7", "fe80::/10", "ff00::/8", "2001:db8::/32"})
 
-	bindDatabaseEnvVars(v)
-
 	// Set environment variable support:
 	v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
 	v.SetTypeByDefaultValue(true)
@@ -1068,27 +1115,9 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) {
 	v.AutomaticEnv()
 	v.ReadInConfig()
 
-	// Migrate config settings to maintain compatibility with old configs
-	migrateConfig(v)
-	migrateConfigPurposeOneTreatment(v)
-	migrateConfigSpecialFeature1(v)
-	migrateConfigTCF2PurposeFlags(v)
-	migrateConfigDatabaseConnection(v)
-	migrateConfigCompression(v)
-
 	// These defaults must be set after the migrate functions because those functions look for the presence of these
 	// config fields and there isn't a way to detect presence of a config field using the viper package if a default
 	// is set. Viper IsSet and Get functions consider default values.
-	v.SetDefault("gdpr.tcf2.purpose1.enabled", true)
-	v.SetDefault("gdpr.tcf2.purpose2.enabled", true)
-	v.SetDefault("gdpr.tcf2.purpose3.enabled", true)
-	v.SetDefault("gdpr.tcf2.purpose4.enabled", true)
-	v.SetDefault("gdpr.tcf2.purpose5.enabled", true)
-	v.SetDefault("gdpr.tcf2.purpose6.enabled", true)
-	v.SetDefault("gdpr.tcf2.purpose7.enabled", true)
-	v.SetDefault("gdpr.tcf2.purpose8.enabled", true)
-	v.SetDefault("gdpr.tcf2.purpose9.enabled", true)
-	v.SetDefault("gdpr.tcf2.purpose10.enabled", true)
 	v.SetDefault("gdpr.tcf2.purpose1.enforce_algo", TCF2EnforceAlgoFull)
 	v.SetDefault("gdpr.tcf2.purpose2.enforce_algo", TCF2EnforceAlgoFull)
 	v.SetDefault("gdpr.tcf2.purpose3.enforce_algo", TCF2EnforceAlgoFull)
@@ -1115,10 +1144,9 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) {
 	v.SetDefault("gdpr.tcf2.special_feature1.vendor_exceptions", []openrtb_ext.BidderName{})
 	v.SetDefault("price_floors.enabled", false)
 
-	v.SetDefault("enable_gzip", false)
-
 	// Defaults for account_defaults.events.default_url
 	v.SetDefault("account_defaults.events.default_url", "https://PBS_HOST/event?t=##PBS-EVENTTYPE##&vtype=##PBS-VASTEVENT##&b=##PBS-BIDID##&f=i&a=##PBS-ACCOUNTID##&ts=##PBS-TIMESTAMP##&bidder=##PBS-BIDDER##&int=##PBS-INTEGRATION##&mt=##PBS-MEDIATYPE##&ch=##PBS-CHANNEL##&aid=##PBS-AUCTIONID##&l=##PBS-LINEID##")
+	v.SetDefault("account_defaults.events.enabled", false)
 
 	v.SetDefault("experiment.adscert.mode", "off")
 	v.SetDefault("experiment.adscert.inprocess.origin", "")
@@ -1135,303 +1163,6 @@ func SetupViper(v *viper.Viper, filename string, bidderInfos BidderInfos) {
 	}
 }
 
-func migrateConfig(v *viper.Viper) {
-	// if stored_requests.filesystem is not a map in conf file as expected from defaults,
-	// means we have old-style settings; migrate them to new filesystem map to avoid breaking viper
-	if _, ok := v.Get("stored_requests.filesystem").(map[string]interface{}); !ok {
-		glog.Warning("stored_requests.filesystem should be changed to stored_requests.filesystem.enabled")
-		glog.Warning("stored_requests.directorypath should be changed to stored_requests.filesystem.directorypath")
-		m := v.GetStringMap("stored_requests.filesystem")
-		m["enabled"] = v.GetBool("stored_requests.filesystem")
-		m["directorypath"] = v.GetString("stored_requests.directorypath")
-		v.Set("stored_requests.filesystem", m)
-	}
-}
-
-func migrateConfigCompression(v *viper.Viper) {
-	oldField := "enable_gzip"
-	newField := "compression.response.enable_gzip"
-	if v.IsSet(oldField) {
-		oldConfig := v.GetBool(oldField)
-		if v.IsSet(newField) {
-			glog.Warningf("using %s and ignoring deprecated %s", newField, oldField)
-		} else {
-			glog.Warningf("%s is deprecated and should be changed to %s", oldField, newField)
-			v.Set(newField, oldConfig)
-		}
-	}
-}
-
-func migrateConfigPurposeOneTreatment(v *viper.Viper) {
-	if oldConfig, ok := v.Get("gdpr.tcf2.purpose_one_treatement").(map[string]interface{}); ok {
-		if v.IsSet("gdpr.tcf2.purpose_one_treatment") {
-			glog.Warning("using gdpr.tcf2.purpose_one_treatment and ignoring deprecated gdpr.tcf2.purpose_one_treatement")
-		} else {
-			glog.Warning("gdpr.tcf2.purpose_one_treatement.enabled should be changed to gdpr.tcf2.purpose_one_treatment.enabled")
-			glog.Warning("gdpr.tcf2.purpose_one_treatement.access_allowed should be changed to gdpr.tcf2.purpose_one_treatment.access_allowed")
-			v.Set("gdpr.tcf2.purpose_one_treatment", oldConfig)
-		}
-	}
-}
-
-func migrateConfigSpecialFeature1(v *viper.Viper) {
-	if oldConfig, ok := v.Get("gdpr.tcf2.special_purpose1").(map[string]interface{}); ok {
-		if v.IsSet("gdpr.tcf2.special_feature1") {
-			glog.Warning("using gdpr.tcf2.special_feature1 and ignoring deprecated gdpr.tcf2.special_purpose1")
-		} else {
-			glog.Warning("gdpr.tcf2.special_purpose1.enabled is deprecated and should be changed to gdpr.tcf2.special_feature1.enforce")
-			glog.Warning("gdpr.tcf2.special_purpose1.vendor_exceptions is deprecated and should be changed to gdpr.tcf2.special_feature1.vendor_exceptions")
-			v.Set("gdpr.tcf2.special_feature1.enforce", oldConfig["enabled"])
-			v.Set("gdpr.tcf2.special_feature1.vendor_exceptions", oldConfig["vendor_exceptions"])
-		}
-	}
-}
-
-func migrateConfigTCF2PurposeFlags(v *viper.Viper) {
-	migrateConfigTCF2EnforcePurposeFlags(v)
-	migrateConfigTCF2PurposeEnabledFlags(v)
-}
-
-func migrateConfigTCF2EnforcePurposeFlags(v *viper.Viper) {
-	for i := 1; i <= 10; i++ {
-		algoField := fmt.Sprintf("gdpr.tcf2.purpose%d.enforce_algo", i)
-		purposeField := fmt.Sprintf("gdpr.tcf2.purpose%d.enforce_purpose", i)
-
-		if !v.IsSet(purposeField) {
-			continue
-		}
-		if _, ok := v.Get(purposeField).(string); !ok {
-			continue
-		}
-		if v.IsSet(algoField) {
-			glog.Warningf("using %s and ignoring deprecated %s string type", algoField, purposeField)
-		} else {
-			v.Set(algoField, TCF2EnforceAlgoFull)
-
-			glog.Warningf("setting %s to \"%s\" based on deprecated %s string type \"%s\"", algoField, TCF2EnforceAlgoFull, purposeField, v.GetString(purposeField))
-		}
-
-		oldPurposeFieldValue := v.GetString(purposeField)
-		newPurposeFieldValue := "false"
-		if oldPurposeFieldValue == TCF2EnforceAlgoFull {
-			newPurposeFieldValue = "true"
-		}
-
-		glog.Warningf("converting %s from string \"%s\" to bool \"%s\"; string type is deprecated", purposeField, oldPurposeFieldValue, newPurposeFieldValue)
-		v.Set(purposeField, newPurposeFieldValue)
-	}
-}
-
-func migrateConfigTCF2PurposeEnabledFlags(v *viper.Viper) {
-	for i := 1; i <= 10; i++ {
-		oldField := fmt.Sprintf("gdpr.tcf2.purpose%d.enabled", i)
-		newField := fmt.Sprintf("gdpr.tcf2.purpose%d.enforce_purpose", i)
-
-		if v.IsSet(oldField) {
-			oldConfig := v.GetBool(oldField)
-			if v.IsSet(newField) {
-				glog.Warningf("using %s and ignoring deprecated %s", newField, oldField)
-			} else {
-				glog.Warningf("%s is deprecated and should be changed to %s", oldField, newField)
-				v.Set(newField, oldConfig)
-			}
-		}
-
-		if v.IsSet(newField) {
-			v.Set(oldField, strconv.FormatBool(v.GetBool(newField)))
-		}
-	}
-}
-
-func migrateConfigDatabaseConnection(v *viper.Viper) {
-
-	type QueryParamMigration struct {
-		old string
-		new string
-	}
-
-	type QueryMigration struct {
-		name   string
-		params []QueryParamMigration
-	}
-
-	type Migration struct {
-		old             string
-		new             string
-		fields          []string
-		queryMigrations []QueryMigration
-	}
-
-	queryParamMigrations := struct {
-		RequestIdList QueryParamMigration
-		ImpIdList     QueryParamMigration
-		IdList        QueryParamMigration
-		LastUpdated   QueryParamMigration
-	}{
-		RequestIdList: QueryParamMigration{
-			old: "%REQUEST_ID_LIST%",
-			new: "$REQUEST_ID_LIST",
-		},
-		ImpIdList: QueryParamMigration{
-			old: "%IMP_ID_LIST%",
-			new: "$IMP_ID_LIST",
-		},
-		IdList: QueryParamMigration{
-			old: "%ID_LIST%",
-			new: "$ID_LIST",
-		},
-		LastUpdated: QueryParamMigration{
-			old: "$1",
-			new: "$LAST_UPDATED",
-		},
-	}
-
-	queryMigrations := []QueryMigration{
-		{
-			name:   "fetcher.query",
-			params: []QueryParamMigration{queryParamMigrations.RequestIdList, queryParamMigrations.ImpIdList, queryParamMigrations.IdList},
-		},
-		{
-			name:   "fetcher.amp_query",
-			params: []QueryParamMigration{queryParamMigrations.RequestIdList, queryParamMigrations.ImpIdList, queryParamMigrations.IdList},
-		},
-		{
-			name:   "poll_for_updates.query",
-			params: []QueryParamMigration{queryParamMigrations.LastUpdated},
-		},
-		{
-			name:   "poll_for_updates.amp_query",
-			params: []QueryParamMigration{queryParamMigrations.LastUpdated},
-		},
-	}
-
-	migrations := []Migration{
-		{
-			old: "stored_requests.postgres",
-			new: "stored_requests.database",
-			fields: []string{
-				"connection.dbname",
-				"connection.host",
-				"connection.port",
-				"connection.user",
-				"connection.password",
-				"fetcher.query",
-				"fetcher.amp_query",
-				"initialize_caches.timeout_ms",
-				"initialize_caches.query",
-				"initialize_caches.amp_query",
-				"poll_for_updates.refresh_rate_seconds",
-				"poll_for_updates.timeout_ms",
-				"poll_for_updates.query",
-				"poll_for_updates.amp_query",
-			},
-			queryMigrations: queryMigrations,
-		},
-		{
-			old: "stored_video_req.postgres",
-			new: "stored_video_req.database",
-			fields: []string{
-				"connection.dbname",
-				"connection.host",
-				"connection.port",
-				"connection.user",
-				"connection.password",
-				"fetcher.query",
-				"initialize_caches.timeout_ms",
-				"initialize_caches.query",
-				"poll_for_updates.refresh_rate_seconds",
-				"poll_for_updates.timeout_ms",
-				"poll_for_updates.query",
-			},
-			queryMigrations: queryMigrations,
-		},
-		{
-			old: "stored_responses.postgres",
-			new: "stored_responses.database",
-			fields: []string{
-				"connection.dbname",
-				"connection.host",
-				"connection.port",
-				"connection.user",
-				"connection.password",
-				"fetcher.query",
-				"initialize_caches.timeout_ms",
-				"initialize_caches.query",
-				"poll_for_updates.refresh_rate_seconds",
-				"poll_for_updates.timeout_ms",
-				"poll_for_updates.query",
-			},
-			queryMigrations: queryMigrations,
-		},
-	}
-
-	for _, migration := range migrations {
-		driverField := migration.new + ".connection.driver"
-		newConfigInfoPresent := isConfigInfoPresent(v, migration.new, migration.fields)
-		oldConfigInfoPresent := isConfigInfoPresent(v, migration.old, migration.fields)
-
-		if !newConfigInfoPresent && oldConfigInfoPresent {
-			glog.Warning(fmt.Sprintf("%s is deprecated and should be changed to %s", migration.old, migration.new))
-			glog.Warning(fmt.Sprintf("%s is not set, using default (postgres)", driverField))
-			v.Set(driverField, "postgres")
-
-			for _, field := range migration.fields {
-				oldField := migration.old + "." + field
-				newField := migration.new + "." + field
-				if v.IsSet(oldField) {
-					glog.Warning(fmt.Sprintf("%s is deprecated and should be changed to %s", oldField, newField))
-					v.Set(newField, v.Get(oldField))
-				}
-			}
-
-			for _, queryMigration := range migration.queryMigrations {
-				oldQueryField := migration.old + "." + queryMigration.name
-				newQueryField := migration.new + "." + queryMigration.name
-				queryString := v.GetString(oldQueryField)
-				for _, queryParam := range queryMigration.params {
-					if strings.Contains(queryString, queryParam.old) {
-						glog.Warning(fmt.Sprintf("Query param %s for %s is deprecated and should be changed to %s", queryParam.old, oldQueryField, queryParam.new))
-						queryString = strings.ReplaceAll(queryString, queryParam.old, queryParam.new)
-						v.Set(newQueryField, queryString)
-					}
-				}
-			}
-		} else if newConfigInfoPresent && oldConfigInfoPresent {
-			glog.Warning(fmt.Sprintf("using %s and ignoring deprecated %s", migration.new, migration.old))
-
-			for _, field := range migration.fields {
-				oldField := migration.old + "." + field
-				newField := migration.new + "." + field
-				if v.IsSet(oldField) {
-					glog.Warning(fmt.Sprintf("using %s and ignoring deprecated %s", newField, oldField))
-				}
-			}
-		}
-	}
-}
-
-// migrateConfigEventsEnabled is responsible for ensuring backward compatibility of events_enabled field.
-// This function copies the value of newField "events.enabled" and set it to the oldField "events_enabled".
-// This is necessary to achieve the desired order of precedence favoring the account values over the host values
-// given the account fetcher JSON merge mechanics.
-func migrateConfigEventsEnabled(oldFieldValue *bool, newFieldValue *bool) (updatedOldFieldValue, updatedNewFieldValue *bool) {
-	newField := "account_defaults.events.enabled"
-	oldField := "account_defaults.events_enabled"
-
-	updatedOldFieldValue = oldFieldValue
-	if oldFieldValue != nil {
-		glog.Warningf("%s is deprecated and should be changed to %s", oldField, newField)
-	}
-	if newFieldValue != nil {
-		if oldFieldValue != nil {
-			glog.Warningf("using %s and ignoring deprecated %s", newField, oldField)
-		}
-		updatedOldFieldValue = ptrutil.ToPtr(*newFieldValue)
-	}
-
-	return updatedOldFieldValue, nil
-}
-
 func isConfigInfoPresent(v *viper.Viper, prefix string, fields []string) bool {
 	prefix = prefix + "."
 	for _, field := range fields {
@@ -1443,60 +1174,6 @@ func isConfigInfoPresent(v *viper.Viper, prefix string, fields []string) bool {
 	return false
 }
 
-func bindDatabaseEnvVars(v *viper.Viper) {
-	v.BindEnv("stored_requests.database.connection.driver")
-	v.BindEnv("stored_requests.database.connection.dbname")
-	v.BindEnv("stored_requests.database.connection.host")
-	v.BindEnv("stored_requests.database.connection.port")
-	v.BindEnv("stored_requests.database.connection.user")
-	v.BindEnv("stored_requests.database.connection.password")
-	v.BindEnv("stored_requests.database.connection.query_string")
-	v.BindEnv("stored_requests.database.connection.tls.root_cert")
-	v.BindEnv("stored_requests.database.connection.tls.client_cert")
-	v.BindEnv("stored_requests.database.connection.tls.client_key")
-	v.BindEnv("stored_requests.database.fetcher.query")
-	v.BindEnv("stored_requests.database.fetcher.amp_query")
-	v.BindEnv("stored_requests.database.initialize_caches.timeout_ms")
-	v.BindEnv("stored_requests.database.initialize_caches.query")
-	v.BindEnv("stored_requests.database.initialize_caches.amp_query")
-	v.BindEnv("stored_requests.database.poll_for_updates.refresh_rate_seconds")
-	v.BindEnv("stored_requests.database.poll_for_updates.timeout_ms")
-	v.BindEnv("stored_requests.database.poll_for_updates.query")
-	v.BindEnv("stored_requests.database.poll_for_updates.amp_query")
-	v.BindEnv("stored_video_req.database.connection.driver")
-	v.BindEnv("stored_video_req.database.connection.dbname")
-	v.BindEnv("stored_video_req.database.connection.host")
-	v.BindEnv("stored_video_req.database.connection.port")
-	v.BindEnv("stored_video_req.database.connection.user")
-	v.BindEnv("stored_video_req.database.connection.password")
-	v.BindEnv("stored_video_req.database.connection.query_string")
-	v.BindEnv("stored_video_req.database.connection.tls.root_cert")
-	v.BindEnv("stored_video_req.database.connection.tls.client_cert")
-	v.BindEnv("stored_video_req.database.connection.tls.client_key")
-	v.BindEnv("stored_video_req.database.fetcher.query")
-	v.BindEnv("stored_video_req.database.initialize_caches.timeout_ms")
-	v.BindEnv("stored_video_req.database.initialize_caches.query")
-	v.BindEnv("stored_video_req.database.poll_for_updates.refresh_rate_seconds")
-	v.BindEnv("stored_video_req.database.poll_for_updates.timeout_ms")
-	v.BindEnv("stored_video_req.database.poll_for_updates.query")
-	v.BindEnv("stored_responses.database.connection.driver")
-	v.BindEnv("stored_responses.database.connection.dbname")
-	v.BindEnv("stored_responses.database.connection.host")
-	v.BindEnv("stored_responses.database.connection.port")
-	v.BindEnv("stored_responses.database.connection.user")
-	v.BindEnv("stored_responses.database.connection.password")
-	v.BindEnv("stored_responses.database.connection.query_string")
-	v.BindEnv("stored_responses.database.connection.tls.root_cert")
-	v.BindEnv("stored_responses.database.connection.tls.client_cert")
-	v.BindEnv("stored_responses.database.connection.tls.client_key")
-	v.BindEnv("stored_responses.database.fetcher.query")
-	v.BindEnv("stored_responses.database.initialize_caches.timeout_ms")
-	v.BindEnv("stored_responses.database.initialize_caches.query")
-	v.BindEnv("stored_responses.database.poll_for_updates.refresh_rate_seconds")
-	v.BindEnv("stored_responses.database.poll_for_updates.timeout_ms")
-	v.BindEnv("stored_responses.database.poll_for_updates.query")
-}
-
 func setBidderDefaults(v *viper.Viper, bidder string) {
 	adapterCfgPrefix := "adapters." + bidder
 	v.BindEnv(adapterCfgPrefix + ".disabled")
diff --git a/config/events.go b/config/events.go
index 83d2df4b..cf3139d8 100644
--- a/config/events.go
+++ b/config/events.go
@@ -61,14 +61,14 @@ type VASTEvent struct {
 // within the VAST XML
 // Don't enable this feature. It is still under developmment. Please follow https://github.com/prebid/prebid-server/issues/1725 for more updates
 type Events struct {
-	Enabled    *bool       `mapstructure:"enabled" json:"enabled"`
+	Enabled    bool        `mapstructure:"enabled" json:"enabled"`
 	DefaultURL string      `mapstructure:"default_url" json:"default_url"`
 	VASTEvents []VASTEvent `mapstructure:"vast_events" json:"vast_events,omitempty"`
 }
 
 // validate verifies the events object  and returns error if at least one is invalid.
 func (e Events) validate(errs []error) []error {
-	if e.IsEnabled() {
+	if e.Enabled {
 		if !isValidURL(e.DefaultURL) {
 			return append(errs, errors.New("Invalid events.default_url"))
 		}
@@ -147,8 +147,3 @@ func isValidURL(eventURL string) bool {
 func (e VASTEvent) isTrackingEvent() bool {
 	return e.CreateElement == TrackingVASTElement
 }
-
-// IsEnabled function returns the value of events.enabled field
-func (e Events) IsEnabled() bool {
-	return e.Enabled != nil && *e.Enabled
-}
diff --git a/endpoints/events/event.go b/endpoints/events/event.go
index 089d5606..e8084f1b 100644
--- a/endpoints/events/event.go
+++ b/endpoints/events/event.go
@@ -108,7 +108,7 @@ func (e *eventEndpoint) Handle(w http.ResponseWriter, r *http.Request, _ httprou
 	}
 
 	// Check if events are enabled for the account
-	if !account.Events.IsEnabled() {
+	if !account.Events.Enabled {
 		w.WriteHeader(http.StatusUnauthorized)
 		w.Write([]byte(fmt.Sprintf("Account '%s' doesn't support events", eventRequest.AccountID)))
 		return
diff --git a/exchange/events.go b/exchange/events.go
index fd52d6b6..e4f6b0d5 100644
--- a/exchange/events.go
+++ b/exchange/events.go
@@ -28,7 +28,7 @@ type eventTracking struct {
 func getEventTracking(requestExtPrebid *openrtb_ext.ExtRequestPrebid, ts time.Time, account *config.Account, bidderInfos config.BidderInfos, externalURL string) *eventTracking {
 	return &eventTracking{
 		accountID:          account.ID,
-		enabledForAccount:  account.Events.IsEnabled(),
+		enabledForAccount:  account.Events.Enabled,
 		enabledForRequest:  requestExtPrebid != nil && requestExtPrebid.Events != nil,
 		auctionTimestampMs: ts.UnixNano() / 1e+6,
 		integrationType:    getIntegrationType(requestExtPrebid),
@@ -130,7 +130,7 @@ func (ev *eventTracking) makeEventURL(evType analytics.EventType, pbsBid *entiti
 		})
 }
 
-// isEnabled checks if events are enabled by default or on account/request level
+// isEventAllowed checks if events are enabled by default or on account/request level
 func (ev *eventTracking) isEventAllowed() bool {
 	return ev.enabledForAccount || ev.enabledForRequest
 }
diff --git a/metrics/config/metrics.go b/metrics/config/metrics.go
index bf173253..757cde33 100644
--- a/metrics/config/metrics.go
+++ b/metrics/config/metrics.go
@@ -322,11 +322,6 @@ func (me *MultiMetricsEngine) RecordBidValidationSecureMarkupWarn(adapter openrt
 	}
 }
 
-func (me *MultiMetricsEngine) RecordAccountGDPRPurposeWarning(account string, purposeName string) {
-	for _, thisME := range *me {
-		thisME.RecordAccountGDPRPurposeWarning(account, purposeName)
-	}
-}
 func (me *MultiMetricsEngine) RecordAccountGDPRChannelEnabledWarning(account string) {
 	for _, thisME := range *me {
 		thisME.RecordAccountGDPRChannelEnabledWarning(account)
@@ -536,9 +531,6 @@ func (me *NilMetricsEngine) RecordBidValidationSecureMarkupError(adapter openrtb
 func (me *NilMetricsEngine) RecordBidValidationSecureMarkupWarn(adapter openrtb_ext.BidderName, account string) {
 }
 
-func (me *NilMetricsEngine) RecordAccountGDPRPurposeWarning(account string, purposeName string) {
-}
-
 func (me *NilMetricsEngine) RecordAccountGDPRChannelEnabledWarning(account string) {
 }
 
diff --git a/metrics/go_metrics.go b/metrics/go_metrics.go
index 382dc64c..37080b05 100644
--- a/metrics/go_metrics.go
+++ b/metrics/go_metrics.go
@@ -127,19 +127,9 @@ type accountMetrics struct {
 	bidValidationSecureMarkupWarnMeter metrics.Meter
 
 	// Account Deprciation Metrics
-	accountDeprecationWarningsPurpose1Meter  metrics.Meter
-	accountDeprecationWarningsPurpose2Meter  metrics.Meter
-	accountDeprecationWarningsPurpose3Meter  metrics.Meter
-	accountDeprecationWarningsPurpose4Meter  metrics.Meter
-	accountDeprecationWarningsPurpose5Meter  metrics.Meter
-	accountDeprecationWarningsPurpose6Meter  metrics.Meter
-	accountDeprecationWarningsPurpose7Meter  metrics.Meter
-	accountDeprecationWarningsPurpose8Meter  metrics.Meter
-	accountDeprecationWarningsPurpose9Meter  metrics.Meter
-	accountDeprecationWarningsPurpose10Meter metrics.Meter
-	channelEnabledGDPRMeter                  metrics.Meter
-	channelEnabledCCPAMeter                  metrics.Meter
-	accountDeprecationSummaryMeter           metrics.Meter
+	channelEnabledGDPRMeter        metrics.Meter
+	channelEnabledCCPAMeter        metrics.Meter
+	accountDeprecationSummaryMeter metrics.Meter
 }
 
 type ModuleMetrics struct {
@@ -576,16 +566,6 @@ func (me *Metrics) getAccountMetrics(id string) *accountMetrics {
 	am.bidValidationSecureMarkupMeter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.response.validation.secure.err", id), me.MetricsRegistry)
 	am.bidValidationSecureMarkupWarnMeter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.response.validation.secure.warn", id), me.MetricsRegistry)
 
-	am.accountDeprecationWarningsPurpose1Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose1.warn", id), me.MetricsRegistry)
-	am.accountDeprecationWarningsPurpose2Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose2.warn", id), me.MetricsRegistry)
-	am.accountDeprecationWarningsPurpose3Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose3.warn", id), me.MetricsRegistry)
-	am.accountDeprecationWarningsPurpose4Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose4.warn", id), me.MetricsRegistry)
-	am.accountDeprecationWarningsPurpose5Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose5.warn", id), me.MetricsRegistry)
-	am.accountDeprecationWarningsPurpose6Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose6.warn", id), me.MetricsRegistry)
-	am.accountDeprecationWarningsPurpose7Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose7.warn", id), me.MetricsRegistry)
-	am.accountDeprecationWarningsPurpose8Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose8.warn", id), me.MetricsRegistry)
-	am.accountDeprecationWarningsPurpose9Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose9.warn", id), me.MetricsRegistry)
-	am.accountDeprecationWarningsPurpose10Meter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.purpose10.warn", id), me.MetricsRegistry)
 	am.channelEnabledCCPAMeter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.ccpa.channel_enabled.warn", id), me.MetricsRegistry)
 	am.channelEnabledGDPRMeter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.gdpr.channel_enabled.warn", id), me.MetricsRegistry)
 	am.accountDeprecationSummaryMeter = metrics.GetOrRegisterMeter(fmt.Sprintf("account.%s.config.summary", id), me.MetricsRegistry)
@@ -635,34 +615,6 @@ func (me *Metrics) RecordDebugRequest(debugEnabled bool, pubID string) {
 	}
 }
 
-func (me *Metrics) RecordAccountGDPRPurposeWarning(account string, purposeName string) {
-	if account != PublisherUnknown {
-		am := me.getAccountMetrics(account)
-		switch purposeName {
-		case "purpose1":
-			am.accountDeprecationWarningsPurpose1Meter.Mark(1)
-		case "purpose2":
-			am.accountDeprecationWarningsPurpose2Meter.Mark(1)
-		case "purpose3":
-			am.accountDeprecationWarningsPurpose3Meter.Mark(1)
-		case "purpose4":
-			am.accountDeprecationWarningsPurpose4Meter.Mark(1)
-		case "purpose5":
-			am.accountDeprecationWarningsPurpose5Meter.Mark(1)
-		case "purpose6":
-			am.accountDeprecationWarningsPurpose6Meter.Mark(1)
-		case "purpose7":
-			am.accountDeprecationWarningsPurpose7Meter.Mark(1)
-		case "purpose8":
-			am.accountDeprecationWarningsPurpose8Meter.Mark(1)
-		case "purpose9":
-			am.accountDeprecationWarningsPurpose9Meter.Mark(1)
-		case "purpose10":
-			am.accountDeprecationWarningsPurpose10Meter.Mark(1)
-		}
-	}
-}
-
 func (me *Metrics) RecordAccountGDPRChannelEnabledWarning(account string) {
 	if account != PublisherUnknown {
 		am := me.getAccountMetrics(account)
diff --git a/metrics/metrics.go b/metrics/metrics.go
index a73019be..7315fa72 100644
--- a/metrics/metrics.go
+++ b/metrics/metrics.go
@@ -470,7 +470,6 @@ type MetricsEngine interface {
 	RecordModuleSuccessRejected(labels ModuleLabels)
 	RecordModuleExecutionError(labels ModuleLabels)
 	RecordModuleTimeout(labels ModuleLabels)
-	RecordAccountGDPRPurposeWarning(account string, purposeName string)
 	RecordAccountGDPRChannelEnabledWarning(account string)
 	RecordAccountCCPAChannelEnabledWarning(account string)
 	RecordAccountUpgradeStatus(account string)
diff --git a/metrics/metrics_mock.go b/metrics/metrics_mock.go
index a518b98d..f6ecf57e 100644
--- a/metrics/metrics_mock.go
+++ b/metrics/metrics_mock.go
@@ -222,10 +222,6 @@ func (me *MetricsEngineMock) RecordModuleTimeout(labels ModuleLabels) {
 	me.Called(labels)
 }
 
-func (me *MetricsEngineMock) RecordAccountGDPRPurposeWarning(account string, purposeName string) {
-	me.Called(account, purposeName)
-}
-
 func (me *MetricsEngineMock) RecordAccountGDPRChannelEnabledWarning(account string) {
 	me.Called(account)
 }
diff --git a/metrics/prometheus/prometheus.go b/metrics/prometheus/prometheus.go
index c57ba221..363e5527 100644
--- a/metrics/prometheus/prometheus.go
+++ b/metrics/prometheus/prometheus.go
@@ -89,19 +89,9 @@ type Metrics struct {
 	accountBidResponseSecureMarkupWarn    *prometheus.CounterVec
 
 	// Account Deprecation Metrics
-	accountDeprecationWarningsPurpose1  prometheus.Counter
-	accountDeprecationWarningsPurpose2  prometheus.Counter
-	accountDeprecationWarningsPurpose3  prometheus.Counter
-	accountDeprecationWarningsPurpose4  prometheus.Counter
-	accountDeprecationWarningsPurpose5  prometheus.Counter
-	accountDeprecationWarningsPurpose6  prometheus.Counter
-	accountDeprecationWarningsPurpose7  prometheus.Counter
-	accountDeprecationWarningsPurpose8  prometheus.Counter
-	accountDeprecationWarningsPurpose9  prometheus.Counter
-	accountDeprecationWarningsPurpose10 prometheus.Counter
-	channelEnabledGDPR                  prometheus.Counter
-	channelEnabledCCPA                  prometheus.Counter
-	accountDeprecationSummary           prometheus.Counter
+	channelEnabledGDPR        prometheus.Counter
+	channelEnabledCCPA        prometheus.Counter
+	accountDeprecationSummary prometheus.Counter
 
 	// Module Metrics as a map where the key is the module name
 	moduleDuration        map[string]*prometheus.HistogramVec
@@ -512,37 +502,6 @@ func NewMetrics(cfg config.PrometheusMetrics, disabledMetrics config.DisabledMet
 		"Count of AdsCert request, and if they were successfully sent.",
 		[]string{successLabel})
 
-	metrics.accountDeprecationWarningsPurpose1 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose1_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose1 field")
-	metrics.accountDeprecationWarningsPurpose2 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose2_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose2 field")
-	metrics.accountDeprecationWarningsPurpose3 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose3_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose3 field")
-	metrics.accountDeprecationWarningsPurpose4 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose4_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose4 field")
-	metrics.accountDeprecationWarningsPurpose5 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose5_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose5 field")
-	metrics.accountDeprecationWarningsPurpose6 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose6_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose6 field")
-	metrics.accountDeprecationWarningsPurpose7 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose7_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose7 field")
-	metrics.accountDeprecationWarningsPurpose8 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose8_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose8 field")
-	metrics.accountDeprecationWarningsPurpose9 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose9_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose9 field")
-	metrics.accountDeprecationWarningsPurpose10 = newCounterWithoutLabels(cfg, reg,
-		"account_config_gdpr_tcf2_purpose10_warn",
-		"Count of requests referencing an account whose config specifies a deprecated gdpr.tcf2.purpose10 field")
-
 	metrics.channelEnabledCCPA = newCounterWithoutLabels(cfg, reg,
 		"account_config_ccpa_channel_enabled_warn",
 		"Count of requests referencing an account whose config specifies a depreceated ccpa.channel_enabled field")
@@ -734,33 +693,6 @@ func (m *Metrics) RecordDebugRequest(debugEnabled bool, pubID string) {
 	}
 }
 
-func (m *Metrics) RecordAccountGDPRPurposeWarning(account string, purposeName string) {
-	if account != metrics.PublisherUnknown {
-		switch purposeName {
-		case "purpose1":
-			m.accountDeprecationWarningsPurpose1.Inc()
-		case "purpose2":
-			m.accountDeprecationWarningsPurpose2.Inc()
-		case "purpose3":
-			m.accountDeprecationWarningsPurpose3.Inc()
-		case "purpose4":
-			m.accountDeprecationWarningsPurpose4.Inc()
-		case "purpose5":
-			m.accountDeprecationWarningsPurpose5.Inc()
-		case "purpose6":
-			m.accountDeprecationWarningsPurpose6.Inc()
-		case "purpose7":
-			m.accountDeprecationWarningsPurpose7.Inc()
-		case "purpose8":
-			m.accountDeprecationWarningsPurpose8.Inc()
-		case "purpose9":
-			m.accountDeprecationWarningsPurpose9.Inc()
-		case "purpose10":
-			m.accountDeprecationWarningsPurpose10.Inc()
-		}
-	}
-}
-
 func (m *Metrics) RecordAccountGDPRChannelEnabledWarning(account string) {
 	if account != metrics.PublisherUnknown {
 		m.channelEnabledGDPR.Inc()
diff --git a/openrtb_ext/imp_adnuntius.go b/openrtb_ext/imp_adnuntius.go
index 86023c48..49833e90 100644
--- a/openrtb_ext/imp_adnuntius.go
+++ b/openrtb_ext/imp_adnuntius.go
@@ -5,4 +5,5 @@ type ImpExtAdnunitus struct {
 	Network   string `json:"network"`
 	NoCookies bool   `json:"noCookies"`
 	MaxDeals  int    `json:"maxDeals"`
+	BidType   string `json:"bidType,omitempty"`
 }
diff --git a/static/bidder-info/improvedigital.yaml b/static/bidder-info/improvedigital.yaml
index d14356cd..4cd30d7c 100644
--- a/static/bidder-info/improvedigital.yaml
+++ b/static/bidder-info/improvedigital.yaml
@@ -7,14 +7,16 @@ capabilities:
     mediaTypes:
       - banner
       - video
+      - audio
       - native
   site:
     mediaTypes:
       - banner
       - video
+      - audio
       - native
 userSync:
   redirect:
-    url: "https://ad.360yield.com/server_match?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&r={{.RedirectURL}}"
+    url: "https://ad.360yield.com/server_match?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&r={{.RedirectURL}}"
     userMacro: "{PUB_USER_ID}"
 endpointCompression: "GZIP"
\ No newline at end of file
diff --git a/static/bidder-info/orbidder.yaml b/static/bidder-info/orbidder.yaml
index 705d35a5..74348c75 100644
--- a/static/bidder-info/orbidder.yaml
+++ b/static/bidder-info/orbidder.yaml
@@ -10,3 +10,7 @@ capabilities:
     mediaTypes:
       - banner
       - native
+userSync:
+  redirect:
+    url: "https://orbidder.otto.de/pbs-usersync?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&redirect={{.RedirectURL}}"
+    userMacro: "[ODN_ID]"
\ No newline at end of file
diff --git a/static/bidder-params/adnuntius.json b/static/bidder-params/adnuntius.json
index ff975501..f7ab32d2 100644
--- a/static/bidder-params/adnuntius.json
+++ b/static/bidder-params/adnuntius.json
@@ -9,6 +9,10 @@
             "type": "string",
             "description": "Placement ID"
         },
+        "maxDeals": {
+            "type": "integer",
+            "description": "Specify how many deals that you want to return from the auction."
+        },
         "network": {
             "type": "string",
             "description": "Network if required"
@@ -16,6 +20,10 @@
         "noCookies": {
             "type": "boolean",
             "description": "Disable cookies being set by the ad server."
+        },
+        "bidType": {
+            "type": "string",
+            "description": "Allows you to specify Net or Gross bids."
         }
     },
 


Test patch:
diff --git a/account/account_test.go b/account/account_test.go
index d2694abc..d5223f76 100644
--- a/account/account_test.go
+++ b/account/account_test.go
@@ -6,36 +6,23 @@ import (
 	"fmt"
 	"testing"
 
-	"github.com/buger/jsonparser"
 	"github.com/prebid/prebid-server/config"
 	"github.com/prebid/prebid-server/errortypes"
 	"github.com/prebid/prebid-server/metrics"
 	"github.com/prebid/prebid-server/openrtb_ext"
 	"github.com/prebid/prebid-server/stored_requests"
 	"github.com/prebid/prebid-server/util/iputil"
-	"github.com/prebid/prebid-server/util/ptrutil"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/mock"
 )
 
 var mockAccountData = map[string]json.RawMessage{
-	"valid_acct":                                   json.RawMessage(`{"disabled":false}`),
-	"invalid_acct_ipv6_ipv4":                       json.RawMessage(`{"disabled":false, "privacy": {"ipv6": {"anon_keep_bits": -32}, "ipv4": {"anon_keep_bits": -16}}}`),
-	"disabled_acct":                                json.RawMessage(`{"disabled":true}`),
-	"malformed_acct":                               json.RawMessage(`{"disabled":"invalid type"}`),
-	"gdpr_channel_enabled_acct":                    json.RawMessage(`{"disabled":false,"gdpr":{"channel_enabled":{"amp":true}}}`),
-	"ccpa_channel_enabled_acct":                    json.RawMessage(`{"disabled":false,"ccpa":{"channel_enabled":{"amp":true}}}`),
-	"gdpr_channel_enabled_deprecated_purpose_acct": json.RawMessage(`{"disabled":false,"gdpr":{"purpose1":{"enforce_purpose":"full"}, "channel_enabled":{"amp":true}}}`),
-	"gdpr_deprecated_purpose1":                     json.RawMessage(`{"disabled":false,"gdpr":{"purpose1":{"enforce_purpose":"full"}}}`),
-	"gdpr_deprecated_purpose2":                     json.RawMessage(`{"disabled":false,"gdpr":{"purpose2":{"enforce_purpose":"full"}}}`),
-	"gdpr_deprecated_purpose3":                     json.RawMessage(`{"disabled":false,"gdpr":{"purpose3":{"enforce_purpose":"full"}}}`),
-	"gdpr_deprecated_purpose4":                     json.RawMessage(`{"disabled":false,"gdpr":{"purpose4":{"enforce_purpose":"full"}}}`),
-	"gdpr_deprecated_purpose5":                     json.RawMessage(`{"disabled":false,"gdpr":{"purpose5":{"enforce_purpose":"full"}}}`),
-	"gdpr_deprecated_purpose6":                     json.RawMessage(`{"disabled":false,"gdpr":{"purpose6":{"enforce_purpose":"full"}}}`),
-	"gdpr_deprecated_purpose7":                     json.RawMessage(`{"disabled":false,"gdpr":{"purpose7":{"enforce_purpose":"full"}}}`),
-	"gdpr_deprecated_purpose8":                     json.RawMessage(`{"disabled":false,"gdpr":{"purpose8":{"enforce_purpose":"full"}}}`),
-	"gdpr_deprecated_purpose9":                     json.RawMessage(`{"disabled":false,"gdpr":{"purpose9":{"enforce_purpose":"full"}}}`),
-	"gdpr_deprecated_purpose10":                    json.RawMessage(`{"disabled":false,"gdpr":{"purpose10":{"enforce_purpose":"full"}}}`),
+	"valid_acct":                json.RawMessage(`{"disabled":false}`),
+	"invalid_acct_ipv6_ipv4":    json.RawMessage(`{"disabled":false, "privacy": {"ipv6": {"anon_keep_bits": -32}, "ipv4": {"anon_keep_bits": -16}}}`),
+	"disabled_acct":             json.RawMessage(`{"disabled":true}`),
+	"malformed_acct":            json.RawMessage(`{"disabled":"invalid type"}`),
+	"gdpr_channel_enabled_acct": json.RawMessage(`{"disabled":false,"gdpr":{"channel_enabled":{"amp":true}}}`),
+	"ccpa_channel_enabled_acct": json.RawMessage(`{"disabled":false,"ccpa":{"channel_enabled":{"amp":true}}}`),
 }
 
 type mockAccountFetcher struct {
@@ -90,12 +77,6 @@ func TestGetAccount(t *testing.T) {
 		{accountID: "disabled_acct", required: false, disabled: true, err: &errortypes.BlacklistedAcct{}},
 		{accountID: "disabled_acct", required: true, disabled: true, err: &errortypes.BlacklistedAcct{}},
 
-		// pubID given and matches a host account with Disabled: false and GDPR purpose data to convert
-		{accountID: "gdpr_deprecated_purpose1", required: false, disabled: false, err: nil},
-		{accountID: "gdpr_deprecated_purpose1", required: true, disabled: false, err: nil},
-		{accountID: "gdpr_deprecated_purpose1", required: false, disabled: true, err: nil},
-		{accountID: "gdpr_deprecated_purpose1", required: true, disabled: true, err: nil},
-
 		// pubID given and matches a host account that has a malformed config
 		{accountID: "malformed_acct", required: false, disabled: false, err: &errortypes.MalformedAcct{}},
 		{accountID: "malformed_acct", required: true, disabled: false, err: &errortypes.MalformedAcct{}},
@@ -121,7 +102,6 @@ func TestGetAccount(t *testing.T) {
 			assert.NoError(t, cfg.MarshalAccountDefaults())
 
 			metrics := &metrics.MetricsEngineMock{}
-			metrics.Mock.On("RecordAccountGDPRPurposeWarning", mock.Anything, mock.Anything).Return()
 			metrics.Mock.On("RecordAccountUpgradeStatus", mock.Anything, mock.Anything).Return()
 
 			account, errors := GetAccount(context.Background(), cfg, fetcher, test.accountID, metrics)
@@ -239,160 +219,6 @@ func TestSetDerivedConfig(t *testing.T) {
 	}
 }
 
-func TestConvertGDPREnforcePurposeFields(t *testing.T) {
-	enforcePurposeNo := `{"enforce_purpose":"no"}`
-	enforcePurposeNoMapped := `{"enforce_algo":"full", "enforce_purpose":false}`
-	enforcePurposeFull := `{"enforce_purpose":"full"}`
-	enforcePurposeFullMapped := `{"enforce_algo":"full", "enforce_purpose":true}`
-
-	tests := []struct {
-		description       string
-		giveConfig        []byte
-		wantConfig        []byte
-		wantErr           error
-		wantPurposeFields []string
-	}{
-		{
-			description:       "config is nil",
-			giveConfig:        nil,
-			wantConfig:        nil,
-			wantErr:           nil,
-			wantPurposeFields: nil,
-		},
-		{
-			description:       "config is empty - no gdpr key",
-			giveConfig:        []byte(``),
-			wantConfig:        []byte(``),
-			wantErr:           nil,
-			wantPurposeFields: nil,
-		},
-		{
-			description:       "gdpr present but empty",
-			giveConfig:        []byte(`{"gdpr": {}}`),
-			wantConfig:        []byte(`{"gdpr": {}}`),
-			wantErr:           nil,
-			wantPurposeFields: nil,
-		},
-		{
-			description:       "gdpr present but invalid",
-			giveConfig:        []byte(`{"gdpr": {`),
-			wantConfig:        nil,
-			wantErr:           jsonparser.MalformedJsonError,
-			wantPurposeFields: nil,
-		},
-		{
-			description:       "gdpr.purpose1 present but empty",
-			giveConfig:        []byte(`{"gdpr":{"purpose1":{}}}`),
-			wantConfig:        []byte(`{"gdpr":{"purpose1":{}}}`),
-			wantErr:           nil,
-			wantPurposeFields: nil,
-		},
-		{
-			description:       "gdpr.purpose1.enforce_purpose is set to bool",
-			giveConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_purpose":true}}}`),
-			wantConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_purpose":true}}}`),
-			wantErr:           nil,
-			wantPurposeFields: nil,
-		},
-		{
-			description:       "gdpr.purpose1.enforce_purpose is set to string full",
-			giveConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_purpose":"full"}}}`),
-			wantConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_algo":"full", "enforce_purpose":true}}}`),
-			wantErr:           nil,
-			wantPurposeFields: []string{"purpose1"},
-		},
-		{
-			description:       "gdpr.purpose1.enforce_purpose is set to string no",
-			giveConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_purpose":"no"}}}`),
-			wantConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_algo":"full", "enforce_purpose":false}}}`),
-			wantErr:           nil,
-			wantPurposeFields: []string{"purpose1"},
-		},
-		{
-			description:       "gdpr.purpose1.enforce_purpose is set to string no and other fields are untouched during conversion",
-			giveConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_purpose":"no", "enforce_vendors":true}}}`),
-			wantConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_algo":"full", "enforce_purpose":false, "enforce_vendors":true}}}`),
-			wantErr:           nil,
-			wantPurposeFields: []string{"purpose1"},
-		},
-		{
-			description:       "gdpr.purpose1.enforce_purpose is set but invalid",
-			giveConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_purpose":}}}`),
-			wantConfig:        nil,
-			wantErr:           jsonparser.MalformedJsonError,
-			wantPurposeFields: nil,
-		},
-		{
-			description:       "gdpr.purpose1.enforce_algo is set",
-			giveConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_algo":"full"}}}`),
-			wantConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_algo":"full"}}}`),
-			wantErr:           nil,
-			wantPurposeFields: nil,
-		},
-		{
-			description:       "gdpr.purpose1.enforce_purpose is set to string and enforce_algo is set",
-			giveConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_algo":"full", "enforce_purpose":"full"}}}`),
-			wantConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_algo":"full", "enforce_purpose":"full"}}}`),
-			wantErr:           nil,
-			wantPurposeFields: []string{"purpose1"},
-		},
-		{
-			description:       "gdpr.purpose1.enforce_purpose is set to string and enforce_algo is set but invalid",
-			giveConfig:        []byte(`{"gdpr":{"purpose1":{"enforce_algo":, "enforce_purpose":"full"}}}`),
-			wantConfig:        nil,
-			wantErr:           jsonparser.MalformedJsonError,
-			wantPurposeFields: []string{"purpose1"},
-		},
-		{
-			description: "gdpr.purpose{1-10}.enforce_purpose are set to strings no and full alternating",
-			giveConfig: []byte(`{"gdpr":{` +
-				`"purpose1":` + enforcePurposeNo +
-				`,"purpose2":` + enforcePurposeFull +
-				`,"purpose3":` + enforcePurposeNo +
-				`,"purpose4":` + enforcePurposeFull +
-				`,"purpose5":` + enforcePurposeNo +
-				`,"purpose6":` + enforcePurposeFull +
-				`,"purpose7":` + enforcePurposeNo +
-				`,"purpose8":` + enforcePurposeFull +
-				`,"purpose9":` + enforcePurposeNo +
-				`,"purpose10":` + enforcePurposeFull +
-				`}}`),
-			wantConfig: []byte(`{"gdpr":{` +
-				`"purpose1":` + enforcePurposeNoMapped +
-				`,"purpose2":` + enforcePurposeFullMapped +
-				`,"purpose3":` + enforcePurposeNoMapped +
-				`,"purpose4":` + enforcePurposeFullMapped +
-				`,"purpose5":` + enforcePurposeNoMapped +
-				`,"purpose6":` + enforcePurposeFullMapped +
-				`,"purpose7":` + enforcePurposeNoMapped +
-				`,"purpose8":` + enforcePurposeFullMapped +
-				`,"purpose9":` + enforcePurposeNoMapped +
-				`,"purpose10":` + enforcePurposeFullMapped +
-				`}}`),
-			wantErr:           nil,
-			wantPurposeFields: []string{"purpose1", "purpose2", "purpose3", "purpose4", "purpose5", "purpose6", "purpose7", "purpose8", "purpose9", "purpose10"},
-		},
-	}
-
-	for _, tt := range tests {
-		metricsMock := &metrics.MetricsEngineMock{}
-		metricsMock.Mock.On("RecordAccountGDPRPurposeWarning", mock.Anything, mock.Anything).Return()
-		metricsMock.Mock.On("RecordAccountUpgradeStatus", mock.Anything, mock.Anything).Return()
-
-		newConfig, err, deprecatedPurposeFields := ConvertGDPREnforcePurposeFields(tt.giveConfig)
-		if tt.wantErr != nil {
-			assert.Error(t, err, tt.description)
-		}
-
-		if len(tt.wantConfig) == 0 {
-			assert.Equal(t, tt.wantConfig, newConfig, tt.description)
-		} else {
-			assert.JSONEq(t, string(tt.wantConfig), string(newConfig), tt.description)
-		}
-		assert.Equal(t, tt.wantPurposeFields, deprecatedPurposeFields, tt.description)
-	}
-}
-
 func TestGdprCcpaChannelEnabledMetrics(t *testing.T) {
 	cfg := &config.Configuration{}
 	fetcher := &mockAccountFetcher{}
@@ -443,89 +269,6 @@ func TestGdprCcpaChannelEnabledMetrics(t *testing.T) {
 	}
 }
 
-func TestGdprPurposeWarningMetrics(t *testing.T) {
-	cfg := &config.Configuration{}
-	fetcher := &mockAccountFetcher{}
-	assert.NoError(t, cfg.MarshalAccountDefaults())
-
-	testCases := []struct {
-		name                string
-		givenMetric         string
-		givenAccountID      string
-		givenConfig         []byte
-		expectedMetricCount int
-	}{
-		{
-			name:                "Purpose1MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose1",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "Purpose2MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose2",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "Purpose3MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose3",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "Purpose4MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose4",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "Purpose5MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose5",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "Purpose6MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose6",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "Purpose7MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose7",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "Purpose8MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose8",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "Purpose9MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose9",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "Purpose10MetricCalled",
-			givenAccountID:      "gdpr_deprecated_purpose10",
-			expectedMetricCount: 1,
-		},
-		{
-			name:                "PurposeMetricNotCalled",
-			givenAccountID:      "valid_acct",
-			expectedMetricCount: 0,
-		},
-	}
-
-	for _, test := range testCases {
-		t.Run(test.name, func(t *testing.T) {
-			metrics := &metrics.MetricsEngineMock{}
-			metrics.Mock.On("RecordAccountGDPRPurposeWarning", mock.Anything, mock.Anything).Return()
-			metrics.Mock.On("RecordAccountUpgradeStatus", mock.Anything, mock.Anything).Return()
-
-			_, _ = GetAccount(context.Background(), cfg, fetcher, test.givenAccountID, metrics)
-
-			metrics.AssertNumberOfCalls(t, "RecordAccountGDPRPurposeWarning", test.expectedMetricCount)
-		})
-
-	}
-}
-
 func TestAccountUpgradeStatusGetAccount(t *testing.T) {
 	cfg := &config.Configuration{}
 	fetcher := &mockAccountFetcher{}
@@ -537,24 +280,12 @@ func TestAccountUpgradeStatusGetAccount(t *testing.T) {
 		givenMetrics        []string
 		expectedMetricCount int
 	}{
-		{
-			name:                "MultipleDeprecatedConfigs",
-			givenAccountIDs:     []string{"gdpr_channel_enabled_deprecated_purpose_acct"},
-			givenMetrics:        []string{"RecordAccountGDPRChannelEnabledWarning", "RecordAccountGDPRPurposeWarning"},
-			expectedMetricCount: 1,
-		},
 		{
 			name:                "ZeroDeprecatedConfigs",
 			givenAccountIDs:     []string{"valid_acct"},
 			givenMetrics:        []string{},
 			expectedMetricCount: 0,
 		},
-		{
-			name:                "OneDeprecatedConfigPurpose",
-			givenAccountIDs:     []string{"gdpr_deprecated_purpose1"},
-			givenMetrics:        []string{"RecordAccountGDPRPurposeWarning"},
-			expectedMetricCount: 1,
-		},
 		{
 			name:                "OneDeprecatedConfigGDPRChannelEnabled",
 			givenAccountIDs:     []string{"gdpr_channel_enabled_acct"},
@@ -569,8 +300,8 @@ func TestAccountUpgradeStatusGetAccount(t *testing.T) {
 		},
 		{
 			name:                "MultipleAccountsWithDeprecatedConfigs",
-			givenAccountIDs:     []string{"gdpr_channel_enabled_acct", "gdpr_deprecated_purpose1"},
-			givenMetrics:        []string{"RecordAccountGDPRChannelEnabledWarning", "RecordAccountGDPRPurposeWarning"},
+			givenAccountIDs:     []string{"gdpr_channel_enabled_acct", "ccpa_channel_enabled_acct"},
+			givenMetrics:        []string{"RecordAccountGDPRChannelEnabledWarning", "RecordAccountCCPAChannelEnabledWarning"},
 			expectedMetricCount: 2,
 		},
 	}
@@ -590,66 +321,3 @@ func TestAccountUpgradeStatusGetAccount(t *testing.T) {
 		})
 	}
 }
-
-func TestDeprecateEventsEnabledField(t *testing.T) {
-	testCases := []struct {
-		name    string
-		account *config.Account
-		want    *bool
-	}{
-		{
-			name:    "account is nil",
-			account: nil,
-			want:    nil,
-		},
-		{
-			name: "account.EventsEnabled is nil, account.Events.Enabled is nil",
-			account: &config.Account{
-				EventsEnabled: nil,
-				Events: config.Events{
-					Enabled: nil,
-				},
-			},
-			want: nil,
-		},
-		{
-			name: "account.EventsEnabled is nil, account.Events.Enabled is non-nil",
-			account: &config.Account{
-				EventsEnabled: nil,
-				Events: config.Events{
-					Enabled: ptrutil.ToPtr(true),
-				},
-			},
-			want: ptrutil.ToPtr(true),
-		},
-		{
-			name: "account.EventsEnabled is non-nil, account.Events.Enabled is nil",
-			account: &config.Account{
-				EventsEnabled: ptrutil.ToPtr(true),
-				Events: config.Events{
-					Enabled: nil,
-				},
-			},
-			want: ptrutil.ToPtr(true),
-		},
-		{
-			name: "account.EventsEnabled is non-nil, account.Events.Enabled is non-nil",
-			account: &config.Account{
-				EventsEnabled: ptrutil.ToPtr(false),
-				Events: config.Events{
-					Enabled: ptrutil.ToPtr(true),
-				},
-			},
-			want: ptrutil.ToPtr(true),
-		},
-	}
-
-	for _, test := range testCases {
-		t.Run(test.name, func(t *testing.T) {
-			deprecateEventsEnabledField(test.account)
-			if test.account != nil {
-				assert.Equal(t, test.want, test.account.Events.Enabled)
-			}
-		})
-	}
-}
diff --git a/adapters/adnuntius/adnuntiustest/supplemental/check-gross-bids.json b/adapters/adnuntius/adnuntiustest/supplemental/check-gross-bids.json
new file mode 100644
index 00000000..d6301fe7
--- /dev/null
+++ b/adapters/adnuntius/adnuntiustest/supplemental/check-gross-bids.json
@@ -0,0 +1,103 @@
+{
+	"mockBidRequest": {
+		"id": "test-request-id",
+		"user": {
+			"id": "1kjh3429kjh295jkl"
+		},
+		"imp": [
+			{
+				"id": "test-imp-id",
+				"banner": {
+					"format": [
+						{
+							"w": 300,
+							"h": 250
+						},
+						{
+							"w": 300,
+							"h": 600
+						}
+					]
+				},
+				"ext": {
+					"bidder": {
+						"auId": "123",
+						"bidType": "gross"
+					}
+				}
+			}
+		]
+	},
+	"httpCalls": [
+		{
+			"expectedRequest": {
+				"uri": "http://whatever.url?format=json&tzo=0",
+				"body": {
+					"adUnits": [
+						{
+							"auId": "123",
+							"targetId": "123-test-imp-id",
+							"dimensions": [[300,250],[300,600]]
+						}
+					],
+					"metaData": {
+						"usi": "1kjh3429kjh295jkl"
+					},
+					"context": "unknown"
+				}
+			},
+			"mockResponse": {
+				"status": 200,
+				"body": {
+					"adUnits": [
+						{
+							"auId": "0000000000000123",
+							"targetId": "123-test-imp-id",
+							"html": "<ADCODE>",
+							"responseId": "adn-rsp-900646517",
+							"ads": [
+								{
+									"destinationUrls": {
+										"url": "http://www.google.com"
+									},
+									"bid": { "amount": 20.0, "currency": "NOK" },
+									"grossBid": {"amount": 0.1, "currency": "NOK"},
+									"netBid": {"amount": 0.075, "currency": "NOK"},
+									"adId": "adn-id-1559784094",
+									"creativeWidth": "980",
+									"creativeHeight": "240",
+									"creativeId": "jn9hpzvlsf8cpdmm",
+									"lineItemId": "q7y9qm5b0xt9htrv"
+								}
+							]
+						}
+					]
+				}
+			}
+		}
+	],
+	"expectedBidResponses": [
+		{
+			"bids": [
+				{
+					"bid": {
+						"id": "adn-id-1559784094",
+						"impid": "test-imp-id",
+						"price": 100,
+						"adm": "<ADCODE>",
+						"adid": "adn-id-1559784094",
+						"adomain": [
+							"google.com"
+						],
+						"cid": "q7y9qm5b0xt9htrv",
+						"crid": "jn9hpzvlsf8cpdmm",
+						"w": 980,
+						"h": 240
+					},
+					"type": "banner"
+				}
+			],
+			"currency": "NOK"
+		}
+	]
+}
diff --git a/adapters/adnuntius/adnuntiustest/supplemental/check-net-bids.json b/adapters/adnuntius/adnuntiustest/supplemental/check-net-bids.json
new file mode 100644
index 00000000..ebb25b2b
--- /dev/null
+++ b/adapters/adnuntius/adnuntiustest/supplemental/check-net-bids.json
@@ -0,0 +1,103 @@
+{
+	"mockBidRequest": {
+		"id": "test-request-id",
+		"user": {
+			"id": "1kjh3429kjh295jkl"
+		},
+		"imp": [
+			{
+				"id": "test-imp-id",
+				"banner": {
+					"format": [
+						{
+							"w": 300,
+							"h": 250
+						},
+						{
+							"w": 300,
+							"h": 600
+						}
+					]
+				},
+				"ext": {
+					"bidder": {
+						"auId": "123",
+						"bidType": "net"
+					}
+				}
+			}
+		]
+	},
+	"httpCalls": [
+		{
+			"expectedRequest": {
+				"uri": "http://whatever.url?format=json&tzo=0",
+				"body": {
+					"adUnits": [
+						{
+							"auId": "123",
+							"targetId": "123-test-imp-id",
+							"dimensions": [[300,250],[300,600]]
+						}
+					],
+					"metaData": {
+						"usi": "1kjh3429kjh295jkl"
+					},
+					"context": "unknown"
+				}
+			},
+			"mockResponse": {
+				"status": 200,
+				"body": {
+					"adUnits": [
+						{
+							"auId": "0000000000000123",
+							"targetId": "123-test-imp-id",
+							"html": "<ADCODE>",
+							"responseId": "adn-rsp-900646517",
+							"ads": [
+								{
+									"destinationUrls": {
+										"url": "http://www.google.com"
+									},
+									"bid": { "amount": 20.0, "currency": "NOK" },
+									"grossBid": {"amount": 0.1, "currency": "NOK"},
+									"netBid": {"amount": 0.075, "currency": "NOK"},
+									"adId": "adn-id-1559784094",
+									"creativeWidth": "980",
+									"creativeHeight": "240",
+									"creativeId": "jn9hpzvlsf8cpdmm",
+									"lineItemId": "q7y9qm5b0xt9htrv"
+								}
+							]
+						}
+					]
+				}
+			}
+		}
+	],
+	"expectedBidResponses": [
+		{
+			"bids": [
+				{
+					"bid": {
+						"id": "adn-id-1559784094",
+						"impid": "test-imp-id",
+						"price": 75,
+						"adm": "<ADCODE>",
+						"adid": "adn-id-1559784094",
+						"adomain": [
+							"google.com"
+						],
+						"cid": "q7y9qm5b0xt9htrv",
+						"crid": "jn9hpzvlsf8cpdmm",
+						"w": 980,
+						"h": 240
+					},
+					"type": "banner"
+				}
+			],
+			"currency": "NOK"
+		}
+	]
+}
diff --git a/adapters/adnuntius/adnuntiustest/supplemental/check-price-type-error.json b/adapters/adnuntius/adnuntiustest/supplemental/check-price-type-error.json
new file mode 100644
index 00000000..89016087
--- /dev/null
+++ b/adapters/adnuntius/adnuntiustest/supplemental/check-price-type-error.json
@@ -0,0 +1,38 @@
+{
+	"mockBidRequest": {
+		"id": "test-request-id",
+		"user": {
+			"id": "1kjh3429kjh295jkl"
+		},
+		"imp": [
+			{
+				"id": "test-imp-id",
+				"banner": {
+					"format": [
+						{
+							"w": 300,
+							"h": 250
+						},
+						{
+							"w": 300,
+							"h": 600
+						}
+					]
+				},
+				"ext": {
+					"bidder": {
+						"auId": "123",
+						"bidType": 123
+					}
+				}
+			}
+		]
+	},
+	"httpCalls": [],
+	"expectedMakeRequestsErrors": [
+		{
+			"value": "Error unmarshalling ExtImpValues: json: cannot unmarshal number into Go struct field ImpExtAdnunitus.bidType of type string",
+			"comparison": "literal"
+		}
+	]
+}
diff --git a/adapters/improvedigital/improvedigitaltest/exemplary/app-multi.json b/adapters/improvedigital/improvedigitaltest/exemplary/app-multi.json
index 6963e82f..42543504 100644
--- a/adapters/improvedigital/improvedigitaltest/exemplary/app-multi.json
+++ b/adapters/improvedigital/improvedigitaltest/exemplary/app-multi.json
@@ -40,6 +40,28 @@
                         "placementId": 13244
                     }
                 }
+            },
+            {
+                "id": "test-multi-format-id-with-mtype",
+                "banner": {
+                    "format": [
+                        {
+                            "w": 300,
+                            "h": 250
+                        }
+                    ]
+                },
+                "video": {
+                    "mimes": ["video/mp4"],
+                    "protocols": [2, 5],
+                    "w": 1920,
+                    "h": 1080
+                },
+                "ext": {
+                    "bidder": {
+                        "placementId": 13244
+                    }
+                }
             }
         ]
     },
@@ -159,6 +181,71 @@
                     "cur": "USD"
                 }
             }
+        },
+        {
+            "expectedRequest": {
+                "uri": "http://localhost/pbs",
+                "body": {
+                    "id": "test-request-id",
+                    "app": {
+                        "id": "appID",
+                        "publisher": {
+                            "id": "uniq_pub_id"
+                        }
+                    },
+                    "device": {
+                        "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
+                    },
+                    "imp": [
+                        {
+                            "id": "test-multi-format-id-with-mtype",
+                            "banner": {
+                                "format": [
+                                    {
+                                        "w": 300,
+                                        "h": 250
+                                    }
+                                ]
+                            },
+                            "video": {
+                                "mimes": ["video/mp4"],
+                                "protocols": [2, 5],
+                                "w": 1920,
+                                "h": 1080
+                            },
+                            "ext": {
+                                "bidder": {
+                                    "placementId": 13244
+                                }
+                            }
+                        }
+                    ]
+                }
+            },
+            "mockResponse": {
+                "status": 200,
+                "body": {
+                    "id": "test-request-id",
+                    "seatbid": [
+                        {
+                            "seat": "improvedigital",
+                            "bid": [
+                                {
+                                    "id": "randomid2",
+                                    "impid": "test-multi-format-id-with-mtype",
+                                    "price": 0.5,
+                                    "adm": "some-test-ad-vast",
+                                    "crid": "1234567",
+                                    "w": 1920,
+                                    "h": 1080,
+                                    "mtype": 1
+                                }
+                            ]
+                        }
+                    ],
+                    "cur": "USD"
+                }
+            }
         }
     ],
     "expectedBidResponses": [
@@ -197,6 +284,24 @@
                     "type": "video"
                 }
             ]
+        },
+        {
+            "currency": "USD",
+            "bids": [
+                {
+                    "bid": {
+                        "id": "randomid2",
+                        "impid": "test-multi-format-id-with-mtype",
+                        "price": 0.5,
+                        "adm": "some-test-ad-vast",
+                        "crid": "1234567",
+                        "w": 1920,
+                        "h": 1080,
+                        "mtype": 1
+                    },
+                    "type": "banner"
+                }
+            ]
         }
     ]
 }
diff --git a/adapters/improvedigital/improvedigitaltest/exemplary/audio.json b/adapters/improvedigital/improvedigitaltest/exemplary/audio.json
new file mode 100644
index 00000000..9ddbf799
--- /dev/null
+++ b/adapters/improvedigital/improvedigitaltest/exemplary/audio.json
@@ -0,0 +1,169 @@
+{
+  "mockBidRequest": {
+    "id": "26f14780-8ef8-4f41-b70c-c4d062237df6",
+    "source": {
+      "tid": "26f14780-8ef8-4f41-b70c-c4d062237df6",
+      "ext": {
+        "schain": {
+          "ver": "1.0",
+          "complete": 1,
+          "nodes": [
+            { "asi": "example.com", "hp": 1, "sid": "1234abc" }
+          ]
+        }
+      }
+    },
+    "tmax": 1000,
+    "imp": [
+      {
+        "id": "audio",
+        "audio": {
+          "mimes": ["audio/mp3"],
+          "protocols": [2, 5]
+        },
+        "ext": {
+          "bidder": {
+            "placementId": 13244
+          }
+        }
+      }
+    ],
+    "ext": {
+      "prebid": {
+        "targeting": {
+          "includewinners": true,
+          "includebidderkeys": false
+        }
+      }
+    },
+    "site": {
+      "publisher": { "id": "pubid" },
+      "page": "example.com"
+    },
+    "device": { "w": 1581, "h": 922, "ip": "1.1.1.1" },
+    "regs": { "ext": { "gdpr": 0 } },
+    "user": {
+      "ext": {
+        "consent": "XYZ"
+      }
+    }
+  },
+  "httpcalls": [
+    {
+      "expectedRequest": {
+        "uri": "http://localhost/pbs",
+        "body": {
+          "id": "26f14780-8ef8-4f41-b70c-c4d062237df6",
+          "imp": [
+            {
+              "id": "audio",
+              "audio": {
+                "mimes": ["audio/mp3"],
+                "protocols": [2, 5]
+              },
+              "ext": {
+                "bidder": {
+                  "placementId": 13244
+                }
+              }
+            }
+          ],
+          "site": {
+            "page": "example.com",
+            "publisher": { "id": "pubid" }
+          },
+          "device": {
+            "ip": "1.1.1.1",
+            "h": 922,
+            "w": 1581
+          },
+          "user": {
+            "ext": {
+              "consent": "XYZ"
+            }
+          },
+          "tmax": 1000,
+          "source": {
+            "tid": "26f14780-8ef8-4f41-b70c-c4d062237df6",
+            "ext": {
+              "schain": {
+                "ver": "1.0",
+                "complete": 1,
+                "nodes": [
+                  {
+                    "asi": "example.com",
+                    "hp": 1,
+                    "sid": "1234abc"
+                  }
+                ]
+              }
+            }
+          },
+          "regs": { "ext": { "gdpr": 0 } },
+          "ext": {
+            "prebid": {
+              "targeting": {
+                "includewinners": true,
+                "includebidderkeys": false
+              }
+            }
+          }
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "body": {
+          "id": "26f14780-8ef8-4f41-b70c-c4d062237df6",
+          "cur": "USD",
+          "seatbid": [
+            {
+              "bid": [
+                {
+                  "ext": {
+                    "improvedigital": {
+                      "brand_name": "AdvertiserABC",
+                      "bidder_id": 301
+                    }
+                  },
+                  "crid": "14065",
+                  "id": "d4f04449-ba04-4d7c-bb34-dc0fc5240f59",
+                  "price": 0.01,
+                  "adm": "some-test-ad-vast",
+                  "adomain": ["example.com"],
+                  "impid": "audio",
+                  "cid": "25076"
+                }
+              ],
+              "seat": "improvedigital"
+            }
+          ]
+        }
+      }
+    }
+  ],
+  "expectedBidResponses": [
+    {
+      "currency": "USD",
+      "bids": [
+        {
+          "bid": {
+            "id": "d4f04449-ba04-4d7c-bb34-dc0fc5240f59",
+            "impid": "audio",
+            "price": 0.01,
+            "adm": "some-test-ad-vast",
+            "adomain": ["example.com"],
+            "cid": "25076",
+            "crid": "14065",
+            "ext": {
+              "improvedigital": {
+                "brand_name": "AdvertiserABC",
+                "bidder_id": 301
+              }
+            }
+          },
+          "type": "audio"
+        }
+      ]
+    }
+  ]
+}
diff --git a/adapters/improvedigital/improvedigitaltest/exemplary/native.json b/adapters/improvedigital/improvedigitaltest/exemplary/native.json
index 3309b35a..3865d403 100644
--- a/adapters/improvedigital/improvedigitaltest/exemplary/native.json
+++ b/adapters/improvedigital/improvedigitaltest/exemplary/native.json
@@ -17,7 +17,11 @@
     "imp": [
       {
         "id": "native",
-        "ext": { "improvedigital": { "placementId": 1234 } },
+        "ext": {
+          "bidder": {
+            "placementId": 1234
+          }
+        },
         "native": {
           "request": "{\"context\":1,\"plcmttype\":1,\"eventtrackers\":[{\"event\":1,\"methods\":[1]}],\"assets\":[{\"required\":1,\"title\":{\"len\":80}},{\"required\":1,\"data\":{\"type\":2}},{\"required\":0,\"data\":{\"type\":12}},{\"required\":0,\"img\":{\"type\":3,\"wmin\":300,\"hmin\":225,\"ext\":{\"aspectratios\":[\"4:3\"]}}},{\"required\":0,\"img\":{\"type\":1,\"w\":128,\"h\":128}},{\"required\":0,\"data\":{\"type\":3}},{\"required\":0,\"data\":{\"type\":6}}]}",
           "ver": "1.2"
@@ -57,7 +61,11 @@
                 "request": "{\"context\":1,\"plcmttype\":1,\"eventtrackers\":[{\"event\":1,\"methods\":[1]}],\"assets\":[{\"required\":1,\"title\":{\"len\":80}},{\"required\":1,\"data\":{\"type\":2}},{\"required\":0,\"data\":{\"type\":12}},{\"required\":0,\"img\":{\"type\":3,\"wmin\":300,\"hmin\":225,\"ext\":{\"aspectratios\":[\"4:3\"]}}},{\"required\":0,\"img\":{\"type\":1,\"w\":128,\"h\":128}},{\"required\":0,\"data\":{\"type\":3}},{\"required\":0,\"data\":{\"type\":6}}]}",
                 "ver": "1.2"
               },
-              "ext": { "improvedigital": { "placementId": 1234 } }
+              "ext": {
+                "bidder": {
+                  "placementId": 1234
+                }
+              }
             }
           ],
           "site": {
diff --git a/adapters/improvedigital/improvedigitaltest/exemplary/site-multi.json b/adapters/improvedigital/improvedigitaltest/exemplary/site-multi.json
index 0945b4c0..d7131a54 100644
--- a/adapters/improvedigital/improvedigitaltest/exemplary/site-multi.json
+++ b/adapters/improvedigital/improvedigitaltest/exemplary/site-multi.json
@@ -42,6 +42,28 @@
                         "placementId": 13244
                     }
                 }
+            },
+            {
+                "id": "test-multi-format-id-with-mtype",
+                "banner": {
+                    "format": [
+                        {
+                            "w": 300,
+                            "h": 250
+                        }
+                    ]
+                },
+                "video": {
+                    "mimes": ["video/mp4"],
+                    "protocols": [2, 5],
+                    "w": 1920,
+                    "h": 1080
+                },
+                "ext": {
+                    "bidder": {
+                        "placementId": 13245
+                    }
+                }
             }
         ]
     },
@@ -166,6 +188,75 @@
                     "cur": "USD"
                 }
             }
+        },
+        {
+            "expectedRequest": {
+                "uri": "http://localhost/pbs",
+                "body": {
+                    "id": "test-request-id",
+                    "site": {
+                        "page": "https://good.site/url",
+                        "domain": "good.site",
+                        "publisher": {
+                            "id": "uniq_pub_id"
+                        },
+                        "keywords": "omgword",
+                        "ext": {
+                            "amp": 0
+                        }
+                    },
+                    "imp": [
+                        {
+                            "id": "test-multi-format-id-with-mtype",
+                            "banner": {
+                                "format": [
+                                    {
+                                        "w": 300,
+                                        "h": 250
+                                    }
+                                ]
+                            },
+                            "video": {
+                                "mimes": ["video/mp4"],
+                                "protocols": [2, 5],
+                                "w": 1920,
+                                "h": 1080
+                            },
+                            "ext": {
+                                "bidder": {
+                                    "placementId": 13245
+                                }
+                            }
+                        }
+                    ]
+                }
+            },
+            "mockResponse": {
+                "status": 200,
+                "body": {
+                    "id": "test-request-id",
+                    "seatbid": [
+                        {
+                            "seat": "improvedigital",
+                            "bid": [
+                                {
+                                    "id": "randomid1",
+                                    "impid": "test-multi-format-id-with-mtype",
+                                    "price": 0.5,
+                                    "adid": "12345678",
+                                    "adm": "some-test-ad-html",
+                                    "cid": "987",
+                                    "crid": "12345678",
+                                    "h": 250,
+                                    "w": 300,
+                                    "mtype": 1
+                                }
+                            ]
+                        }
+                    ],
+                    "cur": "USD"
+                }
+            }
         }
     ],
 
@@ -205,6 +296,26 @@
                     "type": "video"
                 }
             ]
+        },
+        {
+            "currency": "USD",
+            "bids": [
+                {
+                    "bid": {
+                        "id": "randomid1",
+                        "impid": "test-multi-format-id-with-mtype",
+                        "price": 0.5,
+                        "adm": "some-test-ad-html",
+                        "adid": "12345678",
+                        "cid": "987",
+                        "crid": "12345678",
+                        "w": 300,
+                        "h": 250,
+                        "mtype": 1
+                    },
+                    "type": "banner"
+                }
+            ]
         }
     ]
 }
diff --git a/adapters/improvedigital/improvedigitaltest/supplemental/missing_and_unsupported_mtype.json b/adapters/improvedigital/improvedigitaltest/supplemental/missing_and_unsupported_mtype.json
new file mode 100644
index 00000000..ad82321a
--- /dev/null
+++ b/adapters/improvedigital/improvedigitaltest/supplemental/missing_and_unsupported_mtype.json
@@ -0,0 +1,215 @@
+{
+  "mockBidRequest": {
+    "id": "test-request-id",
+    "imp": [
+      {
+        "id": "test-imp-id",
+        "banner": {
+          "format": [
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "ext": {
+          "bidder": {
+			  "placementId": 13245
+          }
+        }
+      },
+      {
+        "id": "test-multi-format-id-without-mtype",
+        "banner": {
+          "format": [
+            {
+              "w": 300,
+              "h": 250
+            }
+          ]
+        },
+        "video": {
+          "mimes": ["video/mp4"],
+          "protocols": [2, 5],
+          "w": 1920,
+          "h": 1080
+        },
+        "ext": {
+          "bidder": {
+            "placementId": 13244
+          }
+        }
+      },
+      {
+        "id": "test-unsupported-format-id-without-mtype",
+        "ext": {
+          "bidder": {
+            "placementId": 13244
+          }
+        }
+      }
+    ]
+  },
+
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "http://localhost/pbs",
+        "body": {
+          "id": "test-request-id",
+          "imp": [
+            {
+              "id": "test-imp-id",
+              "banner": {
+                "format": [
+                  {
+                    "w": 300,
+                    "h": 250
+                  }
+                ]
+              },
+              "ext": {
+                "bidder": {
+					"placementId": 13245
+                }
+              }
+            }
+          ]
+        }
+      },
+	  "mockResponse": {
+		  "status": 200,
+		  "body": {
+			  "id": "test-request-id",
+			  "seatbid": [{
+				  "seat": "improvedigital",
+				  "bid": [{
+					  "id": "randomid",
+					  "impid": "test-imp-id",
+					  "price": 0.500000,
+					  "adid": "12345678",
+					  "adm": "some-test-ad",
+					  "cid": "987",
+					  "crid": "12345678",
+					  "h": 250,
+					  "w": 300,
+                      "mtype": 5
+				  }]
+			  }],
+			  "cur": "USD"
+		  }
+	  }
+    },
+    {
+      "expectedRequest": {
+        "uri": "http://localhost/pbs",
+        "body": {
+          "id": "test-request-id",
+          "imp": [
+            {
+              "id": "test-multi-format-id-without-mtype",
+              "banner": {
+                "format": [
+                  {
+                    "w": 300,
+                    "h": 250
+                  }
+                ]
+              },
+              "video": {
+                "mimes": ["video/mp4"],
+                "protocols": [2, 5],
+                "w": 1920,
+                "h": 1080
+              },
+              "ext": {
+                "bidder": {
+                  "placementId": 13244
+                }
+              }
+            }
+          ]
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "body": {
+          "id": "test-request-id",
+          "seatbid": [
+            {
+              "seat": "improvedigital",
+              "bid": [
+                {
+                  "id": "randomid2",
+                  "impid": "test-multi-format-id-without-mtype",
+                  "price": 0.5,
+                  "adm": "some-test-ad-vast",
+                  "crid": "1234567",
+                  "w": 1920,
+                  "h": 1080
+                }
+              ]
+            }
+          ],
+          "cur": "USD"
+        }
+      }
+    },
+    {
+      "expectedRequest": {
+        "uri": "http://localhost/pbs",
+        "body": {
+          "id": "test-request-id",
+          "imp": [
+            {
+              "id": "test-unsupported-format-id-without-mtype",
+              "ext": {
+                "bidder": {
+                  "placementId": 13244
+                }
+              }
+            }
+          ]
+        }
+      },
+      "mockResponse": {
+        "status": 200,
+        "body": {
+          "id": "test-request-id",
+          "seatbid": [
+            {
+              "seat": "improvedigital",
+              "bid": [
+                {
+                  "id": "randomid3",
+                  "impid": "test-unsupported-format-id-without-mtype",
+                  "price": 0.5,
+                  "adm": "some-test-ad-vast",
+                  "crid": "1234567",
+                  "w": 1920,
+                  "h": 1080
+                }
+              ]
+            }
+          ],
+          "cur": "USD"
+        }
+      }
+    }
+  ],
+
+  "expectedMakeBidsErrors": [
+    {
+      "value": "Unsupported MType 5 for impression with ID: \"test-imp-id\"",
+      "comparison": "literal"
+    },
+    {
+      "value": "Bid must have non-zero MType for multi format impression with ID: \"test-multi-format-id-without-mtype\"",
+      "comparison": "literal"
+    },
+    {
+      "value": "Could not determine MType from impression with ID: \"test-unsupported-format-id-without-mtype\"",
+      "comparison": "literal"
+    }
+  ]
+}
diff --git a/adapters/rubicon/rubicon_test.go b/adapters/rubicon/rubicon_test.go
index 63474155..893cceb8 100644
--- a/adapters/rubicon/rubicon_test.go
+++ b/adapters/rubicon/rubicon_test.go
@@ -644,97 +644,6 @@ func TestOpenRTBRequestWithBadvOverflowed(t *testing.T) {
 	assert.Equal(t, badvOverflowed[:50], badvRequest, "Unexpected dfp_ad_unit_code: %s")
 }
 
-func TestOpenRTBRequestWithSpecificExtUserEids(t *testing.T) {
-	bidder := new(RubiconAdapter)
-
-	request := &openrtb2.BidRequest{
-		ID: "test-request-id",
-		Imp: []openrtb2.Imp{{
-			ID: "test-imp-id",
-			Banner: &openrtb2.Banner{
-				Format: []openrtb2.Format{
-					{W: 300, H: 250},
-				},
-			},
-			Ext: json.RawMessage(`{"bidder": {
-				"zoneId": 8394,
-				"siteId": 283282,
-				"accountId": 7891
-			}}`),
-		}},
-		App: &openrtb2.App{
-			ID:   "com.test",
-			Name: "testApp",
-		},
-		User: &openrtb2.User{
-			Ext: json.RawMessage(`{"eids": [
-			{
-				"source": "pubcid",
-				"uids": [{
-					"id": "2402fc76-7b39-4f0e-bfc2-060ef7693648"
-				}]
-			},
-			{
-				"source": "adserver.org",
-				"uids": [{
-					"id": "3d50a262-bd8e-4be3-90b8-246291523907",
-					"ext": {
-						"rtiPartner": "TDID"
-					}
-				}]
-			},
-			{
-				"source": "liveintent.com",
-				"uids": [{
-					"id": "T7JiRRvsRAmh88"
-				}],
-				"ext": {
-					"segments": ["999","888"]
-				}
-			},
-			{
-				"source": "liveramp.com",
-				"uids": [{
-					"id": "LIVERAMPID"
-				}],
-				"ext": {
-					"segments": ["111","222"]
-				}
-			}
-			]}`),
-		},
-	}
-
-	reqs, _ := bidder.MakeRequests(request, &adapters.ExtraRequestInfo{})
-
-	rubiconReq := &openrtb2.BidRequest{}
-	if err := json.Unmarshal(reqs[0].Body, rubiconReq); err != nil {
-		t.Fatalf("Unexpected error while decoding request: %s", err)
-	}
-
-	assert.NotNil(t, rubiconReq.User.Ext, "User.Ext object should not be nil.")
-
-	var userExt rubiconUserExt
-	if err := json.Unmarshal(rubiconReq.User.Ext, &userExt); err != nil {
-		t.Fatal("Error unmarshalling request.user.ext object.")
-	}
-
-	assert.NotNil(t, userExt.Eids)
-	assert.Equal(t, 4, len(userExt.Eids), "Eids values are not as expected!")
-
-	// liveramp.com
-	assert.Equal(t, "LIVERAMPID", userExt.LiverampIdl, "Liveramp_idl value is not as expected!")
-
-	userExtRPTarget := make(map[string]interface{})
-	if err := json.Unmarshal(userExt.RP.Target, &userExtRPTarget); err != nil {
-		t.Fatal("Error unmarshalling request.user.ext.rp.target object.")
-	}
-
-	assert.Contains(t, userExtRPTarget, "LIseg", "request.user.ext.rp.target value is not as expected!")
-	assert.Contains(t, userExtRPTarget["LIseg"], "888", "No segment with 888 as expected!")
-	assert.Contains(t, userExtRPTarget["LIseg"], "999", "No segment with 999 as expected!")
-}
-
 func TestOpenRTBRequestWithVideoImpEvenIfImpHasBannerButAllRequiredVideoFields(t *testing.T) {
 	bidder := new(RubiconAdapter)
 
diff --git a/adapters/rubicon/rubicontest/exemplary/user-buyeruid-not-present-but-special-uid-with-other-stype-present.json b/adapters/rubicon/rubicontest/exemplary/user-buyeruid-not-present-but-special-uid-with-other-stype-present.json
deleted file mode 100644
index dea75ac5..00000000
--- a/adapters/rubicon/rubicontest/exemplary/user-buyeruid-not-present-but-special-uid-with-other-stype-present.json
+++ /dev/null
@@ -1,372 +0,0 @@
-{
-  "mockBidRequest": {
-    "id": "test-request-id",
-    "device": {
-      "ip": "123.123.123.123",
-      "ifa": "zxcjbzxmc-zxcbmz-zxbcz-zxczx"
-    },
-    "site": {
-      "page": "somePage",
-      "ref": "someRef",
-      "search": "someSearch"
-    },
-    "user": {
-      "yob": 2000,
-      "geo": {
-        "country": "USA",
-        "lat": 47.627500,
-        "lon": -122.346200
-      },
-      "gender": "f",
-      "data": [
-        {
-          "ext": {
-            "segtax": 4
-          },
-          "segment": [
-            {
-              "id": "idToCopy"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": "someValue"
-          },
-          "segment": [
-            {
-              "id": "shouldNotBeCopied"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": "4"
-          },
-          "segment": [
-            {
-              "id": "shouldNotBeCopied2"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": 4
-          },
-          "segment": [
-            {
-              "id": "idToCopy2"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": [
-              4
-            ]
-          },
-          "segment": [
-            {
-              "id": "shouldNotBeCopied3"
-            }
-          ]
-        }
-      ],
-      "keywords": "someKeywords",
-      "ext": {
-        "rp": {
-          "target": {
-            "someKey": "someValue"
-          }
-        },
-        "data": {
-          "dataKey1": "dataValue1",
-          "dataKey2": [
-            "dataValue2",
-            "dataValue3"
-          ],
-          "dataKey3": true
-        },
-        "eids": [
-          {
-            "source": "rubiconproject.com",
-            "uids": [
-              {
-                "id": "uidId",
-                "ext": {
-                  "stype": "other"
-                }
-              }
-            ]
-          }
-        ]
-      }
-    },
-    "imp": [
-      {
-        "id": "test-imp-id",
-        "instl": 1,
-        "video": {
-          "placement": 3,
-          "mimes": [
-            "video/mp4"
-          ],
-          "protocols": [
-            2,
-            5
-          ],
-          "w": 1024,
-          "h": 576
-        },
-        "ext": {
-          "data": {
-            "adserver": {
-              "name": "gam",
-              "adslot": "someAdSlot"
-            },
-            "dataAttr1": "dataVal1",
-            "dataAttr2": "dataVal2"
-          },
-          "bidder": {
-            "video": {
-            },
-            "accountId": 1001,
-            "siteId": 113932,
-            "zoneId": 535510
-          }
-        }
-      }
-    ]
-  },
-  "httpCalls": [
-    {
-      "expectedRequest": {
-        "uri": "uri?tk_xint=pbs-test-tracker",
-        "body": {
-          "id": "test-request-id",
-          "device": {
-            "ext": {
-              "rp": {
-                "pixelratio": 0
-              }
-            },
-            "ip": "123.123.123.123",
-            "ifa": "zxcjbzxmc-zxcbmz-zxbcz-zxczx"
-          },
-          "site": {
-            "page": "somePage",
-            "ref": "someRef",
-            "search": "someSearch",
-            "ext": {
-              "rp": {
-                "site_id": 113932
-              }
-            },
-            "publisher": {
-              "ext": {
-                "rp": {
-                  "account_id": 1001
-                }
-              }
-            }
-          },
-          "user": {
-            "buyeruid": "uidId",
-            "data": [
-              {
-                "ext": {
-                  "segtax": 4
-                },
-                "segment": [
-                  {
-                    "id": "idToCopy"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": "someValue"
-                },
-                "segment": [
-                  {
-                    "id": "shouldNotBeCopied"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": "4"
-                },
-                "segment": [
-                  {
-                    "id": "shouldNotBeCopied2"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": 4
-                },
-                "segment": [
-                  {
-                    "id": "idToCopy2"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": [
-                    4
-                  ]
-                },
-                "segment": [
-                  {
-                    "id": "shouldNotBeCopied3"
-                  }
-                ]
-              }
-            ],
-            "ext": {
-              "rp": {
-                "target": {
-                  "someKey": "someValue",
-                  "dataKey1": [
-                    "dataValue1"
-                  ],
-                  "dataKey2": [
-                    "dataValue2",
-                    "dataValue3"
-                  ],
-                  "dataKey3": [
-                    "true"
-                  ],
-                  "iab": [
-                    "idToCopy",
-                    "idToCopy2"
-                  ]
-                }
-              },
-              "eids": [
-                {
-                  "source": "rubiconproject.com",
-                  "uids": [
-                    {
-                      "id": "uidId",
-                      "ext": {
-                        "stype": "other"
-                      }
-                    }
-                  ]
-                }
-              ]
-            },
-            "keywords": "someKeywords"
-          },
-          "imp": [
-            {
-              "id": "test-imp-id",
-              "instl": 1,
-              "secure": 1,
-              "video": {
-                "placement": 3,
-                "ext": {
-                  "rp": {
-                    "size_id": 203
-                  }
-                },
-                "mimes": [
-                  "video/mp4"
-                ],
-                "protocols": [
-                  2,
-                  5
-                ],
-                "w": 1024,
-                "h": 576
-              },
-              "ext": {
-                "rp": {
-                  "target": {
-                    "dataAttr1": [
-                      "dataVal1"
-                    ],
-                    "dataAttr2": [
-                      "dataVal2"
-                    ],
-                    "page": [
-                      "somePage"
-                    ],
-                    "ref": [
-                      "someRef"
-                    ],
-                    "search": [
-                      "someSearch"
-                    ],
-                    "dfp_ad_unit_code": "someAdSlot"
-                  },
-                  "track": {
-                    "mint": "",
-                    "mint_version": ""
-                  },
-                  "zone_id": 535510
-                }
-              }
-            }
-          ]
-        }
-      },
-      "mockResponse": {
-        "status": 200,
-        "body": {
-          "id": "test-request-id",
-          "seatbid": [
-            {
-              "bid": [
-                {
-                  "id": "test_bid_id",
-                  "impid": "test-imp-id",
-                  "price": 0.27543,
-                  "adm": "some-test-ad",
-                  "cid": "test_cid",
-                  "crid": "test_crid",
-                  "dealid": "test_dealid",
-                  "ext": {
-                    "prebid": {
-                      "type": "video"
-                    }
-                  }
-                }
-              ],
-              "seat": "adman"
-            }
-          ],
-          "cur": "USD"
-        }
-      }
-    }
-  ],
-  "expectedBidResponses": [
-    {
-      "currency": "USD",
-      "bids": [
-        {
-          "bid": {
-            "id": "test_bid_id",
-            "impid": "test-imp-id",
-            "price": 0.27543,
-            "adm": "some-test-ad",
-            "cid": "test_cid",
-            "crid": "test_crid",
-            "dealid": "test_dealid",
-            "ext": {
-              "prebid": {
-                "type": "video"
-              }
-            }
-          },
-          "type": "video"
-        }
-      ]
-    }
-  ]
-}
diff --git a/adapters/rubicon/rubicontest/exemplary/user-buyeruid-not-present-but-special-uid-with-ppuid-stype-present.json b/adapters/rubicon/rubicontest/exemplary/user-buyeruid-not-present-but-special-uid-with-ppuid-stype-present.json
deleted file mode 100644
index c2b129eb..00000000
--- a/adapters/rubicon/rubicontest/exemplary/user-buyeruid-not-present-but-special-uid-with-ppuid-stype-present.json
+++ /dev/null
@@ -1,372 +0,0 @@
-{
-  "mockBidRequest": {
-    "id": "test-request-id",
-    "device": {
-      "ip": "123.123.123.123",
-      "ifa": "zxcjbzxmc-zxcbmz-zxbcz-zxczx"
-    },
-    "site": {
-      "page": "somePage",
-      "ref": "someRef",
-      "search": "someSearch"
-    },
-    "user": {
-      "yob": 2000,
-      "geo": {
-        "country": "USA",
-        "lat": 47.627500,
-        "lon": -122.346200
-      },
-      "gender": "f",
-      "data": [
-        {
-          "ext": {
-            "segtax": 4
-          },
-          "segment": [
-            {
-              "id": "idToCopy"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": "someValue"
-          },
-          "segment": [
-            {
-              "id": "shouldNotBeCopied"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": "4"
-          },
-          "segment": [
-            {
-              "id": "shouldNotBeCopied2"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": 4
-          },
-          "segment": [
-            {
-              "id": "idToCopy2"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": [
-              4
-            ]
-          },
-          "segment": [
-            {
-              "id": "shouldNotBeCopied3"
-            }
-          ]
-        }
-      ],
-      "keywords": "someKeywords",
-      "ext": {
-        "rp": {
-          "target": {
-            "someKey": "someValue"
-          }
-        },
-        "data": {
-          "dataKey1": "dataValue1",
-          "dataKey2": [
-            "dataValue2",
-            "dataValue3"
-          ],
-          "dataKey3": true
-        },
-        "eids": [
-          {
-            "source": "rubiconproject.com",
-            "uids": [
-              {
-                "id": "uidId",
-                "ext": {
-                  "stype": "ppuid"
-                }
-              }
-            ]
-          }
-        ]
-      }
-    },
-    "imp": [
-      {
-        "id": "test-imp-id",
-        "instl": 1,
-        "video": {
-          "placement": 3,
-          "mimes": [
-            "video/mp4"
-          ],
-          "protocols": [
-            2,
-            5
-          ],
-          "w": 1024,
-          "h": 576
-        },
-        "ext": {
-          "data": {
-            "adserver": {
-              "name": "gam",
-              "adslot": "someAdSlot"
-            },
-            "dataAttr1": "dataVal1",
-            "dataAttr2": "dataVal2"
-          },
-          "bidder": {
-            "video": {
-            },
-            "accountId": 1001,
-            "siteId": 113932,
-            "zoneId": 535510
-          }
-        }
-      }
-    ]
-  },
-  "httpCalls": [
-    {
-      "expectedRequest": {
-        "uri": "uri?tk_xint=pbs-test-tracker",
-        "body": {
-          "id": "test-request-id",
-          "device": {
-            "ext": {
-              "rp": {
-                "pixelratio": 0
-              }
-            },
-            "ip": "123.123.123.123",
-            "ifa": "zxcjbzxmc-zxcbmz-zxbcz-zxczx"
-          },
-          "site": {
-            "page": "somePage",
-            "ref": "someRef",
-            "search": "someSearch",
-            "ext": {
-              "rp": {
-                "site_id": 113932
-              }
-            },
-            "publisher": {
-              "ext": {
-                "rp": {
-                  "account_id": 1001
-                }
-              }
-            }
-          },
-          "user": {
-            "buyeruid": "uidId",
-            "data": [
-              {
-                "ext": {
-                  "segtax": 4
-                },
-                "segment": [
-                  {
-                    "id": "idToCopy"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": "someValue"
-                },
-                "segment": [
-                  {
-                    "id": "shouldNotBeCopied"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": "4"
-                },
-                "segment": [
-                  {
-                    "id": "shouldNotBeCopied2"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": 4
-                },
-                "segment": [
-                  {
-                    "id": "idToCopy2"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": [
-                    4
-                  ]
-                },
-                "segment": [
-                  {
-                    "id": "shouldNotBeCopied3"
-                  }
-                ]
-              }
-            ],
-            "ext": {
-              "rp": {
-                "target": {
-                  "someKey": "someValue",
-                  "dataKey1": [
-                    "dataValue1"
-                  ],
-                  "dataKey2": [
-                    "dataValue2",
-                    "dataValue3"
-                  ],
-                  "dataKey3": [
-                    "true"
-                  ],
-                  "iab": [
-                    "idToCopy",
-                    "idToCopy2"
-                  ]
-                }
-              },
-              "eids": [
-                {
-                  "source": "rubiconproject.com",
-                  "uids": [
-                    {
-                      "id": "uidId",
-                      "ext": {
-                        "stype": "ppuid"
-                      }
-                    }
-                  ]
-                }
-              ]
-            },
-            "keywords": "someKeywords"
-          },
-          "imp": [
-            {
-              "id": "test-imp-id",
-              "instl": 1,
-              "secure": 1,
-              "video": {
-                "placement": 3,
-                "ext": {
-                  "rp": {
-                    "size_id": 203
-                  }
-                },
-                "mimes": [
-                  "video/mp4"
-                ],
-                "protocols": [
-                  2,
-                  5
-                ],
-                "w": 1024,
-                "h": 576
-              },
-              "ext": {
-                "rp": {
-                  "target": {
-                    "dataAttr1": [
-                      "dataVal1"
-                    ],
-                    "dataAttr2": [
-                      "dataVal2"
-                    ],
-                    "page": [
-                      "somePage"
-                    ],
-                    "ref": [
-                      "someRef"
-                    ],
-                    "search": [
-                      "someSearch"
-                    ],
-                    "dfp_ad_unit_code": "someAdSlot"
-                  },
-                  "track": {
-                    "mint": "",
-                    "mint_version": ""
-                  },
-                  "zone_id": 535510
-                }
-              }
-            }
-          ]
-        }
-      },
-      "mockResponse": {
-        "status": 200,
-        "body": {
-          "id": "test-request-id",
-          "seatbid": [
-            {
-              "bid": [
-                {
-                  "id": "test_bid_id",
-                  "impid": "test-imp-id",
-                  "price": 0.27543,
-                  "adm": "some-test-ad",
-                  "cid": "test_cid",
-                  "crid": "test_crid",
-                  "dealid": "test_dealid",
-                  "ext": {
-                    "prebid": {
-                      "type": "video"
-                    }
-                  }
-                }
-              ],
-              "seat": "adman"
-            }
-          ],
-          "cur": "USD"
-        }
-      }
-    }
-  ],
-  "expectedBidResponses": [
-    {
-      "currency": "USD",
-      "bids": [
-        {
-          "bid": {
-            "id": "test_bid_id",
-            "impid": "test-imp-id",
-            "price": 0.27543,
-            "adm": "some-test-ad",
-            "cid": "test_cid",
-            "crid": "test_crid",
-            "dealid": "test_dealid",
-            "ext": {
-              "prebid": {
-                "type": "video"
-              }
-            }
-          },
-          "type": "video"
-        }
-      ]
-    }
-  ]
-}
diff --git a/adapters/rubicon/rubicontest/exemplary/user-buyeruid-present.json b/adapters/rubicon/rubicontest/exemplary/user-buyeruid-present.json
deleted file mode 100644
index 458e19ee..00000000
--- a/adapters/rubicon/rubicontest/exemplary/user-buyeruid-present.json
+++ /dev/null
@@ -1,373 +0,0 @@
-{
-  "mockBidRequest": {
-    "id": "test-request-id",
-    "device": {
-      "ip": "123.123.123.123",
-      "ifa": "zxcjbzxmc-zxcbmz-zxbcz-zxczx"
-    },
-    "site": {
-      "page": "somePage",
-      "ref": "someRef",
-      "search": "someSearch"
-    },
-    "user": {
-      "buyeruid": "buyeruid",
-      "yob": 2000,
-      "geo": {
-        "country": "USA",
-        "lat": 47.627500,
-        "lon": -122.346200
-      },
-      "gender": "f",
-      "data": [
-        {
-          "ext": {
-            "segtax": 4
-          },
-          "segment": [
-            {
-              "id": "idToCopy"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": "someValue"
-          },
-          "segment": [
-            {
-              "id": "shouldNotBeCopied"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": "4"
-          },
-          "segment": [
-            {
-              "id": "shouldNotBeCopied2"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": 4
-          },
-          "segment": [
-            {
-              "id": "idToCopy2"
-            }
-          ]
-        },
-        {
-          "ext": {
-            "segtax": [
-              4
-            ]
-          },
-          "segment": [
-            {
-              "id": "shouldNotBeCopied3"
-            }
-          ]
-        }
-      ],
-      "keywords": "someKeywords",
-      "ext": {
-        "rp": {
-          "target": {
-            "someKey": "someValue"
-          }
-        },
-        "data": {
-          "dataKey1": "dataValue1",
-          "dataKey2": [
-            "dataValue2",
-            "dataValue3"
-          ],
-          "dataKey3": true
-        },
-        "eids": [
-          {
-            "source": "rubiconproject.com",
-            "uids": [
-              {
-                "id": "uidId",
-                "ext": {
-                  "stype": "ppuid"
-                }
-              }
-            ]
-          }
-        ]
-      }
-    },
-    "imp": [
-      {
-        "id": "test-imp-id",
-        "instl": 1,
-        "video": {
-          "placement": 3,
-          "mimes": [
-            "video/mp4"
-          ],
-          "protocols": [
-            2,
-            5
-          ],
-          "w": 1024,
-          "h": 576
-        },
-        "ext": {
-          "data": {
-            "adserver": {
-              "name": "gam",
-              "adslot": "someAdSlot"
-            },
-            "dataAttr1": "dataVal1",
-            "dataAttr2": "dataVal2"
-          },
-          "bidder": {
-            "video": {
-            },
-            "accountId": 1001,
-            "siteId": 113932,
-            "zoneId": 535510
-          }
-        }
-      }
-    ]
-  },
-  "httpCalls": [
-    {
-      "expectedRequest": {
-        "uri": "uri?tk_xint=pbs-test-tracker",
-        "body": {
-          "id": "test-request-id",
-          "device": {
-            "ext": {
-              "rp": {
-                "pixelratio": 0
-              }
-            },
-            "ip": "123.123.123.123",
-            "ifa": "zxcjbzxmc-zxcbmz-zxbcz-zxczx"
-          },
-          "site": {
-            "page": "somePage",
-            "ref": "someRef",
-            "search": "someSearch",
-            "ext": {
-              "rp": {
-                "site_id": 113932
-              }
-            },
-            "publisher": {
-              "ext": {
-                "rp": {
-                  "account_id": 1001
-                }
-              }
-            }
-          },
-          "user": {
-            "buyeruid": "buyeruid",
-            "data": [
-              {
-                "ext": {
-                  "segtax": 4
-                },
-                "segment": [
-                  {
-                    "id": "idToCopy"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": "someValue"
-                },
-                "segment": [
-                  {
-                    "id": "shouldNotBeCopied"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": "4"
-                },
-                "segment": [
-                  {
-                    "id": "shouldNotBeCopied2"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": 4
-                },
-                "segment": [
-                  {
-                    "id": "idToCopy2"
-                  }
-                ]
-              },
-              {
-                "ext": {
-                  "segtax": [
-                    4
-                  ]
-                },
-                "segment": [
-                  {
-                    "id": "shouldNotBeCopied3"
-                  }
-                ]
-              }
-            ],
-            "ext": {
-              "rp": {
-                "target": {
-                  "someKey": "someValue",
-                  "dataKey1": [
-                    "dataValue1"
-                  ],
-                  "dataKey2": [
-                    "dataValue2",
-                    "dataValue3"
-                  ],
-                  "dataKey3": [
-                    "true"
-                  ],
-                  "iab": [
-                    "idToCopy",
-                    "idToCopy2"
-                  ]
-                }
-              },
-              "eids": [
-                {
-                  "source": "rubiconproject.com",
-                  "uids": [
-                    {
-                      "id": "uidId",
-                      "ext": {
-                        "stype": "ppuid"
-                      }
-                    }
-                  ]
-                }
-              ]
-            },
-            "keywords": "someKeywords"
-          },
-          "imp": [
-            {
-              "id": "test-imp-id",
-              "instl": 1,
-              "secure": 1,
-              "video": {
-                "placement": 3,
-                "ext": {
-                  "rp": {
-                    "size_id": 203
-                  }
-                },
-                "mimes": [
-                  "video/mp4"
-                ],
-                "protocols": [
-                  2,
-                  5
-                ],
-                "w": 1024,
-                "h": 576
-              },
-              "ext": {
-                "rp": {
-                  "target": {
-                    "dataAttr1": [
-                      "dataVal1"
-                    ],
-                    "dataAttr2": [
-                      "dataVal2"
-                    ],
-                    "page": [
-                      "somePage"
-                    ],
-                    "ref": [
-                      "someRef"
-                    ],
-                    "search": [
-                      "someSearch"
-                    ],
-                    "dfp_ad_unit_code": "someAdSlot"
-                  },
-                  "track": {
-                    "mint": "",
-                    "mint_version": ""
-                  },
-                  "zone_id": 535510
-                }
-              }
-            }
-          ]
-        }
-      },
-      "mockResponse": {
-        "status": 200,
-        "body": {
-          "id": "test-request-id",
-          "seatbid": [
-            {
-              "bid": [
-                {
-                  "id": "test_bid_id",
-                  "impid": "test-imp-id",
-                  "price": 0.27543,
-                  "adm": "some-test-ad",
-                  "cid": "test_cid",
-                  "crid": "test_crid",
-                  "dealid": "test_dealid",
-                  "ext": {
-                    "prebid": {
-                      "type": "video"
-                    }
-                  }
-                }
-              ],
-              "seat": "adman"
-            }
-          ],
-          "cur": "USD"
-        }
-      }
-    }
-  ],
-  "expectedBidResponses": [
-    {
-      "currency": "USD",
-      "bids": [
-        {
-          "bid": {
-            "id": "test_bid_id",
-            "impid": "test-imp-id",
-            "price": 0.27543,
-            "adm": "some-test-ad",
-            "cid": "test_cid",
-            "crid": "test_crid",
-            "dealid": "test_dealid",
-            "ext": {
-              "prebid": {
-                "type": "video"
-              }
-            }
-          },
-          "type": "video"
-        }
-      ]
-    }
-  ]
-}
diff --git a/config/bidderinfo_test.go b/config/bidderinfo_test.go
index 438ed5af..0900421a 100644
--- a/config/bidderinfo_test.go
+++ b/config/bidderinfo_test.go
@@ -262,12 +262,6 @@ func TestProcessBidderInfo(t *testing.T) {
 					PlatformID: "123",
 					Syncer: &Syncer{
 						Key: "foo",
-						IFrame: &SyncerEndpoint{
-							URL:         "https://foo.com/sync?mode=iframe&r={{.RedirectURL}}",
-							RedirectURL: "https://redirect/setuid/iframe",
-							ExternalURL: "https://iframe.host",
-							UserMacro:   "UID",
-						},
 					},
 					UserSyncURL: "user-url",
 					XAPI: AdapterXAPI{
@@ -293,7 +287,7 @@ func TestProcessBidderInfo(t *testing.T) {
 }
 
 func TestProcessAliasBidderInfo(t *testing.T) {
-	parentBidderInfo := BidderInfo{
+	parentWithSyncerKey := BidderInfo{
 		AppSecret: "app-secret",
 		Capabilities: &CapabilitiesInfo{
 			App: &PlatformInfo{
@@ -389,8 +383,29 @@ func TestProcessAliasBidderInfo(t *testing.T) {
 			Tracker:  "alias-tracker",
 		},
 	}
-	bidderB := parentBidderInfo
+	bidderB := parentWithSyncerKey
 	bidderB.AliasOf = "bidderA"
+	bidderB.Syncer = &Syncer{
+		Key: bidderB.Syncer.Key,
+	}
+
+	parentWithoutSyncerKey := BidderInfo{
+		Syncer: &Syncer{
+			IFrame: &SyncerEndpoint{
+				URL:         "https://foo.com/sync?mode=iframe&r={{.RedirectURL}}",
+				RedirectURL: "https://redirect/setuid/iframe",
+				ExternalURL: "https://iframe.host",
+				UserMacro:   "UID",
+			},
+		},
+	}
+
+	bidderC := parentWithoutSyncerKey
+	bidderC.AliasOf = "bidderA"
+	bidderC.Syncer = &Syncer{
+		Key: "bidderA",
+	}
+
 	testCases := []struct {
 		description         string
 		aliasInfos          map[string]aliasNillableFields
@@ -399,7 +414,7 @@ func TestProcessAliasBidderInfo(t *testing.T) {
 		expectedErr         error
 	}{
 		{
-			description: "inherit all parent info in alias bidder",
+			description: "inherit all parent info in alias bidder, use parent syncer key as syncer alias key",
 			aliasInfos: map[string]aliasNillableFields{
 				"bidderB": {
 					Disabled:                nil,
@@ -409,14 +424,34 @@ func TestProcessAliasBidderInfo(t *testing.T) {
 				},
 			},
 			bidderInfos: BidderInfos{
-				"bidderA": parentBidderInfo,
+				"bidderA": parentWithSyncerKey,
 				"bidderB": BidderInfo{
 					AliasOf: "bidderA",
 					// all other fields should be inherited from parent bidder
 				},
 			},
 			expectedErr:         nil,
-			expectedBidderInfos: BidderInfos{"bidderA": parentBidderInfo, "bidderB": bidderB},
+			expectedBidderInfos: BidderInfos{"bidderA": parentWithSyncerKey, "bidderB": bidderB},
+		},
+		{
+			description: "inherit all parent info in alias bidder, use parent name as syncer alias key",
+			aliasInfos: map[string]aliasNillableFields{
+				"bidderC": {
+					Disabled:                nil,
+					ModifyingVastXmlAllowed: nil,
+					Experiment:              nil,
+					XAPI:                    nil,
+				},
+			},
+			bidderInfos: BidderInfos{
+				"bidderA": parentWithoutSyncerKey,
+				"bidderC": BidderInfo{
+					AliasOf: "bidderA",
+					// all other fields should be inherited from parent bidder
+				},
+			},
+			expectedErr:         nil,
+			expectedBidderInfos: BidderInfos{"bidderA": parentWithoutSyncerKey, "bidderC": bidderC},
 		},
 		{
 			description: "all bidder info specified for alias, do not inherit from parent bidder",
@@ -429,11 +464,11 @@ func TestProcessAliasBidderInfo(t *testing.T) {
 				},
 			},
 			bidderInfos: BidderInfos{
-				"bidderA": parentBidderInfo,
+				"bidderA": parentWithSyncerKey,
 				"bidderB": aliasBidderInfo,
 			},
 			expectedErr:         nil,
-			expectedBidderInfos: BidderInfos{"bidderA": parentBidderInfo, "bidderB": aliasBidderInfo},
+			expectedBidderInfos: BidderInfos{"bidderA": parentWithSyncerKey, "bidderB": aliasBidderInfo},
 		},
 		{
 			description: "invalid alias",
@@ -461,7 +496,7 @@ func TestProcessAliasBidderInfo(t *testing.T) {
 		if test.expectedErr != nil {
 			assert.Equal(t, test.expectedErr, err)
 		} else {
-			assert.Equal(t, test.expectedBidderInfos, bidderInfos)
+			assert.Equal(t, test.expectedBidderInfos, bidderInfos, test.description)
 		}
 	}
 }
diff --git a/config/config_test.go b/config/config_test.go
index 057ed06e..97be28eb 100644
--- a/config/config_test.go
+++ b/config/config_test.go
@@ -5,14 +5,11 @@ import (
 	"errors"
 	"net"
 	"os"
-	"strconv"
-	"strings"
 	"testing"
 	"time"
 
 	"github.com/prebid/go-gdpr/consentconstants"
 	"github.com/prebid/prebid-server/openrtb_ext"
-	"github.com/prebid/prebid-server/util/ptrutil"
 	"github.com/spf13/viper"
 	"github.com/stretchr/testify/assert"
 )
@@ -180,7 +177,6 @@ func TestDefaults(t *testing.T) {
 	cmpBools(t, "price_floors.enabled", false, cfg.PriceFloors.Enabled)
 
 	// Assert compression related defaults
-	cmpBools(t, "enable_gzip", false, cfg.EnableGzip)
 	cmpBools(t, "compression.request.enable_gzip", false, cfg.Compression.Request.GZIP)
 	cmpBools(t, "compression.response.enable_gzip", false, cfg.Compression.Response.GZIP)
 
@@ -191,8 +187,7 @@ func TestDefaults(t *testing.T) {
 	cmpBools(t, "account_defaults.price_floors.use_dynamic_data", false, cfg.AccountDefaults.PriceFloors.UseDynamicData)
 	cmpInts(t, "account_defaults.price_floors.max_rules", 100, cfg.AccountDefaults.PriceFloors.MaxRule)
 	cmpInts(t, "account_defaults.price_floors.max_schema_dims", 3, cfg.AccountDefaults.PriceFloors.MaxSchemaDims)
-	cmpBools(t, "account_defaults.events_enabled", *cfg.AccountDefaults.EventsEnabled, false)
-	cmpNils(t, "account_defaults.events.enabled", cfg.AccountDefaults.Events.Enabled)
+	cmpBools(t, "account_defaults.events.enabled", false, cfg.AccountDefaults.Events.Enabled)
 
 	cmpBools(t, "hooks.enabled", false, cfg.Hooks.Enabled)
 	cmpStrings(t, "validations.banner_creative_max_size", "skip", cfg.Validations.BannerCreativeMaxSize)
@@ -213,7 +208,6 @@ func TestDefaults(t *testing.T) {
 	expectedTCF2 := TCF2{
 		Enabled: true,
 		Purpose1: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -222,7 +216,6 @@ func TestDefaults(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 		},
 		Purpose2: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -231,7 +224,6 @@ func TestDefaults(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 		},
 		Purpose3: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -240,7 +232,6 @@ func TestDefaults(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 		},
 		Purpose4: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -249,7 +240,6 @@ func TestDefaults(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 		},
 		Purpose5: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -258,7 +248,6 @@ func TestDefaults(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 		},
 		Purpose6: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -267,7 +256,6 @@ func TestDefaults(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 		},
 		Purpose7: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -276,7 +264,6 @@ func TestDefaults(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 		},
 		Purpose8: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -285,7 +272,6 @@ func TestDefaults(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 		},
 		Purpose9: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -294,7 +280,6 @@ func TestDefaults(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 		},
 		Purpose10: TCF2Purpose{
-			Enabled:            true,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -339,7 +324,6 @@ gdpr:
       enforce_vendors: false
       vendor_exceptions: ["foo1a", "foo1b"]
     purpose2:
-      enabled: false
       enforce_algo: "full"
       enforce_purpose: false
       enforce_vendors: false
@@ -386,7 +370,6 @@ external_url: http://prebid-server.prebid.org/
 host: prebid-server.prebid.org
 port: 1234
 admin_port: 5678
-enable_gzip: false
 compression:
     request:
         enable_gzip: true
@@ -469,7 +452,6 @@ hooks:
 price_floors:
     enabled: true
 account_defaults:
-    events_enabled: false
     events:
         enabled: true
     price_floors:
@@ -492,12 +474,6 @@ tmax_adjustments:
   pbs_response_preparation_duration_ms: 100
 `)
 
-var oldStoredRequestsConfig = []byte(`
-stored_requests:
-  filesystem: true
-  directorypath: "/somepath"
-`)
-
 func cmpStrings(t *testing.T, key, expected, actual string) {
 	t.Helper()
 	assert.Equal(t, expected, actual, "%s: %s != %s", key, expected, actual)
@@ -588,14 +564,12 @@ func TestFullConfig(t *testing.T) {
 	cmpBools(t, "account_defaults.price_floors.use_dynamic_data", true, cfg.AccountDefaults.PriceFloors.UseDynamicData)
 	cmpInts(t, "account_defaults.price_floors.max_rules", 120, cfg.AccountDefaults.PriceFloors.MaxRule)
 	cmpInts(t, "account_defaults.price_floors.max_schema_dims", 5, cfg.AccountDefaults.PriceFloors.MaxSchemaDims)
-	cmpBools(t, "account_defaults.events_enabled", *cfg.AccountDefaults.EventsEnabled, true)
-	cmpNils(t, "account_defaults.events.enabled", cfg.AccountDefaults.Events.Enabled)
+	cmpBools(t, "account_defaults.events.enabled", true, cfg.AccountDefaults.Events.Enabled)
 
 	cmpInts(t, "account_defaults.privacy.ipv6.anon_keep_bits", 50, cfg.AccountDefaults.Privacy.IPv6Config.AnonKeepBits)
 	cmpInts(t, "account_defaults.privacy.ipv4.anon_keep_bits", 20, cfg.AccountDefaults.Privacy.IPv4Config.AnonKeepBits)
 
 	// Assert compression related defaults
-	cmpBools(t, "enable_gzip", false, cfg.EnableGzip)
 	cmpBools(t, "compression.request.enable_gzip", true, cfg.Compression.Request.GZIP)
 	cmpBools(t, "compression.response.enable_gzip", false, cfg.Compression.Response.GZIP)
 
@@ -623,7 +597,6 @@ func TestFullConfig(t *testing.T) {
 	expectedTCF2 := TCF2{
 		Enabled: true,
 		Purpose1: TCF2Purpose{
-			Enabled:            true, // true by default
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -632,7 +605,6 @@ func TestFullConfig(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderName("foo1a"): {}, openrtb_ext.BidderName("foo1b"): {}},
 		},
 		Purpose2: TCF2Purpose{
-			Enabled:            false,
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     false,
@@ -641,7 +613,6 @@ func TestFullConfig(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderName("foo2"): {}},
 		},
 		Purpose3: TCF2Purpose{
-			Enabled:            true, // true by default
 			EnforceAlgo:        TCF2EnforceAlgoBasic,
 			EnforceAlgoID:      TCF2BasicEnforcement,
 			EnforcePurpose:     true,
@@ -650,7 +621,6 @@ func TestFullConfig(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderName("foo3"): {}},
 		},
 		Purpose4: TCF2Purpose{
-			Enabled:            true, // true by default
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -659,7 +629,6 @@ func TestFullConfig(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderName("foo4"): {}},
 		},
 		Purpose5: TCF2Purpose{
-			Enabled:            true, // true by default
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -668,7 +637,6 @@ func TestFullConfig(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderName("foo5"): {}},
 		},
 		Purpose6: TCF2Purpose{
-			Enabled:            true, // true by default
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -677,7 +645,6 @@ func TestFullConfig(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderName("foo6"): {}},
 		},
 		Purpose7: TCF2Purpose{
-			Enabled:            true, // true by default
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -686,7 +653,6 @@ func TestFullConfig(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderName("foo7"): {}},
 		},
 		Purpose8: TCF2Purpose{
-			Enabled:            true, // true by default
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -695,7 +661,6 @@ func TestFullConfig(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderName("foo8"): {}},
 		},
 		Purpose9: TCF2Purpose{
-			Enabled:            true, // true by default
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -704,7 +669,6 @@ func TestFullConfig(t *testing.T) {
 			VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderName("foo9"): {}},
 		},
 		Purpose10: TCF2Purpose{
-			Enabled:            true, // true by default
 			EnforceAlgo:        TCF2EnforceAlgoFull,
 			EnforceAlgoID:      TCF2FullEnforcement,
 			EnforcePurpose:     true,
@@ -818,36 +782,15 @@ func TestValidateConfig(t *testing.T) {
 	assert.Nil(t, err, "OpenRTB filesystem config should work. %v", err)
 }
 
-func TestMigrateConfig(t *testing.T) {
-	v := viper.New()
-	SetupViper(v, "", bidderInfos)
-	v.Set("gdpr.default_value", "0")
-	v.SetConfigType("yaml")
-	v.ReadConfig(bytes.NewBuffer(oldStoredRequestsConfig))
-	migrateConfig(v)
-	cfg, err := New(v, bidderInfos, mockNormalizeBidderName)
-	assert.NoError(t, err, "Setting up config should work but it doesn't")
-	cmpBools(t, "stored_requests.filesystem.enabled", true, cfg.StoredRequests.Files.Enabled)
-	cmpStrings(t, "stored_requests.filesystem.path", "/somepath", cfg.StoredRequests.Files.Path)
-}
-
 func TestMigrateConfigFromEnv(t *testing.T) {
-	if oldval, ok := os.LookupEnv("PBS_STORED_REQUESTS_FILESYSTEM"); ok {
-		defer os.Setenv("PBS_STORED_REQUESTS_FILESYSTEM", oldval)
-	} else {
-		defer os.Unsetenv("PBS_STORED_REQUESTS_FILESYSTEM")
-	}
-
 	if oldval, ok := os.LookupEnv("PBS_ADAPTERS_BIDDER1_ENDPOINT"); ok {
 		defer os.Setenv("PBS_ADAPTERS_BIDDER1_ENDPOINT", oldval)
 	} else {
 		defer os.Unsetenv("PBS_ADAPTERS_BIDDER1_ENDPOINT")
 	}
 
-	os.Setenv("PBS_STORED_REQUESTS_FILESYSTEM", "true")
 	os.Setenv("PBS_ADAPTERS_BIDDER1_ENDPOINT", "http://bidder1_override.com")
 	cfg, _ := newDefaultConfig(t)
-	cmpBools(t, "stored_requests.filesystem.enabled", true, cfg.StoredRequests.Files.Enabled)
 	cmpStrings(t, "adapters.bidder1.endpoint", "http://bidder1_override.com", cfg.BidderInfos["bidder1"].Endpoint)
 }
 
@@ -979,1692 +922,6 @@ func TestBidderInfoFromEnv(t *testing.T) {
 	assert.Equal(t, "2.6", cfg.BidderInfos["bidder1"].OpenRTB.Version)
 }
 
-func TestMigrateConfigPurposeOneTreatment(t *testing.T) {
-	oldPurposeOneTreatmentConfig := []byte(`
-      gdpr:
-        tcf2:
-          purpose_one_treatement:
-            enabled: true
-            access_allowed: true
-    `)
-	newPurposeOneTreatmentConfig := []byte(`
-      gdpr:
-        tcf2:
-          purpose_one_treatment:
-            enabled: true
-            access_allowed: true
-    `)
-	oldAndNewPurposeOneTreatmentConfig := []byte(`
-      gdpr:
-        tcf2:
-          purpose_one_treatement:
-            enabled: false
-            access_allowed: true
-          purpose_one_treatment:
-            enabled: true
-            access_allowed: false
-    `)
-
-	tests := []struct {
-		description                        string
-		config                             []byte
-		wantPurpose1TreatmentEnabled       bool
-		wantPurpose1TreatmentAccessAllowed bool
-	}{
-		{
-			description: "New config and old config not set",
-			config:      []byte{},
-		},
-		{
-			description:                        "New config not set, old config set",
-			config:                             oldPurposeOneTreatmentConfig,
-			wantPurpose1TreatmentEnabled:       true,
-			wantPurpose1TreatmentAccessAllowed: true,
-		},
-		{
-			description:                        "New config set, old config not set",
-			config:                             newPurposeOneTreatmentConfig,
-			wantPurpose1TreatmentEnabled:       true,
-			wantPurpose1TreatmentAccessAllowed: true,
-		},
-		{
-			description:                        "New config and old config set",
-			config:                             oldAndNewPurposeOneTreatmentConfig,
-			wantPurpose1TreatmentEnabled:       true,
-			wantPurpose1TreatmentAccessAllowed: false,
-		},
-	}
-
-	for _, tt := range tests {
-		v := viper.New()
-		v.SetConfigType("yaml")
-		v.ReadConfig(bytes.NewBuffer(tt.config))
-
-		migrateConfigPurposeOneTreatment(v)
-
-		if len(tt.config) > 0 {
-			assert.Equal(t, tt.wantPurpose1TreatmentEnabled, v.Get("gdpr.tcf2.purpose_one_treatment.enabled").(bool), tt.description)
-			assert.Equal(t, tt.wantPurpose1TreatmentAccessAllowed, v.Get("gdpr.tcf2.purpose_one_treatment.access_allowed").(bool), tt.description)
-		} else {
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose_one_treatment.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose_one_treatment.access_allowed"), tt.description)
-		}
-	}
-}
-
-func TestMigrateConfigSpecialFeature1(t *testing.T) {
-	oldSpecialFeature1Config := []byte(`
-      gdpr:
-        tcf2:
-          special_purpose1:
-            enabled: true
-            vendor_exceptions: ["appnexus"]
-    `)
-	newSpecialFeature1Config := []byte(`
-      gdpr:
-        tcf2:
-          special_feature1:
-            enforce: true
-            vendor_exceptions: ["appnexus"]
-    `)
-	oldAndNewSpecialFeature1Config := []byte(`
-      gdpr:
-        tcf2:
-          special_purpose1:
-            enabled: false
-            vendor_exceptions: ["appnexus"]
-          special_feature1:
-            enforce: true
-            vendor_exceptions: ["rubicon"]
-    `)
-
-	tests := []struct {
-		description                         string
-		config                              []byte
-		wantSpecialFeature1Enforce          bool
-		wantSpecialFeature1VendorExceptions []string
-	}{
-		{
-			description: "New config and old config not set",
-			config:      []byte{},
-		},
-		{
-			description:                         "New config not set, old config set",
-			config:                              oldSpecialFeature1Config,
-			wantSpecialFeature1Enforce:          true,
-			wantSpecialFeature1VendorExceptions: []string{"appnexus"},
-		},
-		{
-			description:                         "New config set, old config not set",
-			config:                              newSpecialFeature1Config,
-			wantSpecialFeature1Enforce:          true,
-			wantSpecialFeature1VendorExceptions: []string{"appnexus"},
-		},
-		{
-			description:                         "New config and old config set",
-			config:                              oldAndNewSpecialFeature1Config,
-			wantSpecialFeature1Enforce:          true,
-			wantSpecialFeature1VendorExceptions: []string{"rubicon"},
-		},
-	}
-
-	for _, tt := range tests {
-		v := viper.New()
-		v.SetConfigType("yaml")
-		v.ReadConfig(bytes.NewBuffer(tt.config))
-
-		migrateConfigSpecialFeature1(v)
-
-		if len(tt.config) > 0 {
-			assert.Equal(t, tt.wantSpecialFeature1Enforce, v.Get("gdpr.tcf2.special_feature1.enforce").(bool), tt.description)
-			assert.Equal(t, tt.wantSpecialFeature1VendorExceptions, v.GetStringSlice("gdpr.tcf2.special_feature1.vendor_exceptions"), tt.description)
-		} else {
-			assert.Nil(t, v.Get("gdpr.tcf2.special_feature1.enforce"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.special_feature1.vendor_exceptions"), tt.description)
-		}
-
-		var c Configuration
-		err := v.Unmarshal(&c)
-		assert.NoError(t, err, tt.description)
-		assert.Equal(t, tt.wantSpecialFeature1Enforce, c.GDPR.TCF2.SpecialFeature1.Enforce, tt.description)
-
-		// convert expected vendor exceptions to type BidderName
-		expectedVendorExceptions := make([]openrtb_ext.BidderName, 0, 0)
-		for _, ve := range tt.wantSpecialFeature1VendorExceptions {
-			expectedVendorExceptions = append(expectedVendorExceptions, openrtb_ext.BidderName(ve))
-		}
-		assert.ElementsMatch(t, expectedVendorExceptions, c.GDPR.TCF2.SpecialFeature1.VendorExceptions, tt.description)
-	}
-}
-
-func TestMigrateConfigTCF2PurposeEnabledFlags(t *testing.T) {
-	trueStr := "true"
-	falseStr := "false"
-
-	tests := []struct {
-		description                 string
-		config                      []byte
-		wantPurpose1EnforcePurpose  string
-		wantPurpose2EnforcePurpose  string
-		wantPurpose3EnforcePurpose  string
-		wantPurpose4EnforcePurpose  string
-		wantPurpose5EnforcePurpose  string
-		wantPurpose6EnforcePurpose  string
-		wantPurpose7EnforcePurpose  string
-		wantPurpose8EnforcePurpose  string
-		wantPurpose9EnforcePurpose  string
-		wantPurpose10EnforcePurpose string
-		wantPurpose1Enabled         string
-		wantPurpose2Enabled         string
-		wantPurpose3Enabled         string
-		wantPurpose4Enabled         string
-		wantPurpose5Enabled         string
-		wantPurpose6Enabled         string
-		wantPurpose7Enabled         string
-		wantPurpose8Enabled         string
-		wantPurpose9Enabled         string
-		wantPurpose10Enabled        string
-	}{
-		{
-			description: "New config and old config flags not set",
-			config:      []byte{},
-		},
-		{
-			description: "New config not set, old config set - use old flags",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enabled: false
-                  purpose2:
-                    enabled: true
-                  purpose3:
-                    enabled: false
-                  purpose4:
-                    enabled: true
-                  purpose5:
-                    enabled: false
-                  purpose6:
-                    enabled: true
-                  purpose7:
-                    enabled: false
-                  purpose8:
-                    enabled: true
-                  purpose9:
-                    enabled: false
-                  purpose10:
-                    enabled: true
-            `),
-			wantPurpose1EnforcePurpose:  falseStr,
-			wantPurpose2EnforcePurpose:  trueStr,
-			wantPurpose3EnforcePurpose:  falseStr,
-			wantPurpose4EnforcePurpose:  trueStr,
-			wantPurpose5EnforcePurpose:  falseStr,
-			wantPurpose6EnforcePurpose:  trueStr,
-			wantPurpose7EnforcePurpose:  falseStr,
-			wantPurpose8EnforcePurpose:  trueStr,
-			wantPurpose9EnforcePurpose:  falseStr,
-			wantPurpose10EnforcePurpose: trueStr,
-			wantPurpose1Enabled:         falseStr,
-			wantPurpose2Enabled:         trueStr,
-			wantPurpose3Enabled:         falseStr,
-			wantPurpose4Enabled:         trueStr,
-			wantPurpose5Enabled:         falseStr,
-			wantPurpose6Enabled:         trueStr,
-			wantPurpose7Enabled:         falseStr,
-			wantPurpose8Enabled:         trueStr,
-			wantPurpose9Enabled:         falseStr,
-			wantPurpose10Enabled:        trueStr,
-		},
-		{
-			description: "New config flags set, old config flags not set - use new flags",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enforce_purpose: true
-                  purpose2:
-                    enforce_purpose: false
-                  purpose3:
-                    enforce_purpose: true
-                  purpose4:
-                    enforce_purpose: false
-                  purpose5:
-                    enforce_purpose: true
-                  purpose6:
-                    enforce_purpose: false
-                  purpose7:
-                    enforce_purpose: true
-                  purpose8:
-                    enforce_purpose: false
-                  purpose9:
-                    enforce_purpose: true
-                  purpose10:
-                    enforce_purpose: false
-            `),
-			wantPurpose1EnforcePurpose:  trueStr,
-			wantPurpose2EnforcePurpose:  falseStr,
-			wantPurpose3EnforcePurpose:  trueStr,
-			wantPurpose4EnforcePurpose:  falseStr,
-			wantPurpose5EnforcePurpose:  trueStr,
-			wantPurpose6EnforcePurpose:  falseStr,
-			wantPurpose7EnforcePurpose:  trueStr,
-			wantPurpose8EnforcePurpose:  falseStr,
-			wantPurpose9EnforcePurpose:  trueStr,
-			wantPurpose10EnforcePurpose: falseStr,
-			wantPurpose1Enabled:         trueStr,
-			wantPurpose2Enabled:         falseStr,
-			wantPurpose3Enabled:         trueStr,
-			wantPurpose4Enabled:         falseStr,
-			wantPurpose5Enabled:         trueStr,
-			wantPurpose6Enabled:         falseStr,
-			wantPurpose7Enabled:         trueStr,
-			wantPurpose8Enabled:         falseStr,
-			wantPurpose9Enabled:         trueStr,
-			wantPurpose10Enabled:        falseStr,
-		},
-		{
-			description: "New config flags and old config flags set - use new flags",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enabled: false
-                    enforce_purpose: true
-                  purpose2:
-                    enabled: false
-                    enforce_purpose: true
-                  purpose3:
-                    enabled: false
-                    enforce_purpose: true
-                  purpose4:
-                    enabled: false
-                    enforce_purpose: true
-                  purpose5:
-                    enabled: false
-                    enforce_purpose: true
-                  purpose6:
-                    enabled: false
-                    enforce_purpose: true
-                  purpose7:
-                    enabled: false
-                    enforce_purpose: true
-                  purpose8:
-                    enabled: false
-                    enforce_purpose: true
-                  purpose9:
-                    enabled: false
-                    enforce_purpose: true
-                  purpose10:
-                    enabled: false
-                    enforce_purpose: true
-              `),
-			wantPurpose1EnforcePurpose:  trueStr,
-			wantPurpose2EnforcePurpose:  trueStr,
-			wantPurpose3EnforcePurpose:  trueStr,
-			wantPurpose4EnforcePurpose:  trueStr,
-			wantPurpose5EnforcePurpose:  trueStr,
-			wantPurpose6EnforcePurpose:  trueStr,
-			wantPurpose7EnforcePurpose:  trueStr,
-			wantPurpose8EnforcePurpose:  trueStr,
-			wantPurpose9EnforcePurpose:  trueStr,
-			wantPurpose10EnforcePurpose: trueStr,
-			wantPurpose1Enabled:         trueStr,
-			wantPurpose2Enabled:         trueStr,
-			wantPurpose3Enabled:         trueStr,
-			wantPurpose4Enabled:         trueStr,
-			wantPurpose5Enabled:         trueStr,
-			wantPurpose6Enabled:         trueStr,
-			wantPurpose7Enabled:         trueStr,
-			wantPurpose8Enabled:         trueStr,
-			wantPurpose9Enabled:         trueStr,
-			wantPurpose10Enabled:        trueStr,
-		},
-	}
-
-	for _, tt := range tests {
-		v := viper.New()
-		v.SetConfigType("yaml")
-		v.ReadConfig(bytes.NewBuffer(tt.config))
-
-		migrateConfigTCF2PurposeEnabledFlags(v)
-
-		if len(tt.config) > 0 {
-			assert.Equal(t, tt.wantPurpose1EnforcePurpose, v.GetString("gdpr.tcf2.purpose1.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose2EnforcePurpose, v.GetString("gdpr.tcf2.purpose2.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose3EnforcePurpose, v.GetString("gdpr.tcf2.purpose3.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose4EnforcePurpose, v.GetString("gdpr.tcf2.purpose4.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose5EnforcePurpose, v.GetString("gdpr.tcf2.purpose5.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose6EnforcePurpose, v.GetString("gdpr.tcf2.purpose6.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose7EnforcePurpose, v.GetString("gdpr.tcf2.purpose7.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose8EnforcePurpose, v.GetString("gdpr.tcf2.purpose8.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose9EnforcePurpose, v.GetString("gdpr.tcf2.purpose9.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose10EnforcePurpose, v.GetString("gdpr.tcf2.purpose10.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose1Enabled, v.GetString("gdpr.tcf2.purpose1.enabled"), tt.description)
-			assert.Equal(t, tt.wantPurpose2Enabled, v.GetString("gdpr.tcf2.purpose2.enabled"), tt.description)
-			assert.Equal(t, tt.wantPurpose3Enabled, v.GetString("gdpr.tcf2.purpose3.enabled"), tt.description)
-			assert.Equal(t, tt.wantPurpose4Enabled, v.GetString("gdpr.tcf2.purpose4.enabled"), tt.description)
-			assert.Equal(t, tt.wantPurpose5Enabled, v.GetString("gdpr.tcf2.purpose5.enabled"), tt.description)
-			assert.Equal(t, tt.wantPurpose6Enabled, v.GetString("gdpr.tcf2.purpose6.enabled"), tt.description)
-			assert.Equal(t, tt.wantPurpose7Enabled, v.GetString("gdpr.tcf2.purpose7.enabled"), tt.description)
-			assert.Equal(t, tt.wantPurpose8Enabled, v.GetString("gdpr.tcf2.purpose8.enabled"), tt.description)
-			assert.Equal(t, tt.wantPurpose9Enabled, v.GetString("gdpr.tcf2.purpose9.enabled"), tt.description)
-			assert.Equal(t, tt.wantPurpose10Enabled, v.GetString("gdpr.tcf2.purpose10.enabled"), tt.description)
-		} else {
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose1.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose2.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose3.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose4.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose5.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose6.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose7.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose8.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose9.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose10.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose1.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose2.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose3.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose4.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose5.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose6.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose7.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose8.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose9.enabled"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose10.enabled"), tt.description)
-		}
-	}
-}
-
-func TestMigrateConfigTCF2PurposeFlags(t *testing.T) {
-	tests := []struct {
-		description                string
-		config                     []byte
-		wantPurpose1EnforceAlgo    string
-		wantPurpose1EnforcePurpose bool
-		wantPurpose1Enabled        bool
-	}{
-		{
-			description: "enforce_purpose does not set enforce_algo but sets enabled",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enforce_algo: "off"
-                    enforce_purpose: "full"
-                    enabled: false
-                  purpose2:
-                    enforce_purpose: "full"
-                    enabled: false
-                  purpose3:
-                    enabled: false
-            `),
-			wantPurpose1EnforceAlgo:    "off",
-			wantPurpose1EnforcePurpose: true,
-			wantPurpose1Enabled:        true,
-		},
-		{
-			description: "enforce_purpose sets enforce_algo and enabled",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enforce_purpose: "full"
-                    enabled: false
-            `),
-			wantPurpose1EnforceAlgo:    "full",
-			wantPurpose1EnforcePurpose: true,
-			wantPurpose1Enabled:        true,
-		},
-		{
-			description: "enforce_purpose does not set enforce_algo or enabled",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enabled: false
-            `),
-			wantPurpose1EnforceAlgo:    "",
-			wantPurpose1EnforcePurpose: false,
-			wantPurpose1Enabled:        false,
-		},
-	}
-
-	for _, tt := range tests {
-		v := viper.New()
-		v.SetConfigType("yaml")
-		v.ReadConfig(bytes.NewBuffer(tt.config))
-
-		migrateConfigTCF2PurposeFlags(v)
-
-		assert.Equal(t, tt.wantPurpose1EnforceAlgo, v.GetString("gdpr.tcf2.purpose1.enforce_algo"), tt.description)
-		assert.Equal(t, tt.wantPurpose1EnforcePurpose, v.GetBool("gdpr.tcf2.purpose1.enforce_purpose"), tt.description)
-		assert.Equal(t, tt.wantPurpose1Enabled, v.GetBool("gdpr.tcf2.purpose1.enabled"), tt.description)
-	}
-
-}
-
-func TestMigrateConfigTCF2EnforcePurposeFlags(t *testing.T) {
-	trueStr := "true"
-	falseStr := "false"
-
-	tests := []struct {
-		description                 string
-		config                      []byte
-		wantEnforceAlgosSet         bool
-		wantPurpose1EnforceAlgo     string
-		wantPurpose2EnforceAlgo     string
-		wantPurpose3EnforceAlgo     string
-		wantPurpose4EnforceAlgo     string
-		wantPurpose5EnforceAlgo     string
-		wantPurpose6EnforceAlgo     string
-		wantPurpose7EnforceAlgo     string
-		wantPurpose8EnforceAlgo     string
-		wantPurpose9EnforceAlgo     string
-		wantPurpose10EnforceAlgo    string
-		wantEnforcePurposesSet      bool
-		wantPurpose1EnforcePurpose  string
-		wantPurpose2EnforcePurpose  string
-		wantPurpose3EnforcePurpose  string
-		wantPurpose4EnforcePurpose  string
-		wantPurpose5EnforcePurpose  string
-		wantPurpose6EnforcePurpose  string
-		wantPurpose7EnforcePurpose  string
-		wantPurpose8EnforcePurpose  string
-		wantPurpose9EnforcePurpose  string
-		wantPurpose10EnforcePurpose string
-	}{
-		{
-			description:            "enforce_algo and enforce_purpose are not set",
-			config:                 []byte{},
-			wantEnforceAlgosSet:    false,
-			wantEnforcePurposesSet: false,
-		},
-		{
-			description: "enforce_algo not set; set it based on enforce_purpose string value",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enforce_purpose: "full"
-                  purpose2:
-                    enforce_purpose: "no"
-                  purpose3:
-                    enforce_purpose: "full"
-                  purpose4:
-                    enforce_purpose: "no"
-                  purpose5:
-                    enforce_purpose: "full"
-                  purpose6:
-                    enforce_purpose: "no"
-                  purpose7:
-                    enforce_purpose: "full"
-                  purpose8:
-                    enforce_purpose: "no"
-                  purpose9:
-                    enforce_purpose: "full"
-                  purpose10:
-                    enforce_purpose: "no"
-            `),
-			wantEnforceAlgosSet:         true,
-			wantPurpose1EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose2EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose3EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose4EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose5EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose6EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose7EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose8EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose9EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose10EnforceAlgo:    TCF2EnforceAlgoFull,
-			wantEnforcePurposesSet:      true,
-			wantPurpose1EnforcePurpose:  trueStr,
-			wantPurpose2EnforcePurpose:  falseStr,
-			wantPurpose3EnforcePurpose:  trueStr,
-			wantPurpose4EnforcePurpose:  falseStr,
-			wantPurpose5EnforcePurpose:  trueStr,
-			wantPurpose6EnforcePurpose:  falseStr,
-			wantPurpose7EnforcePurpose:  trueStr,
-			wantPurpose8EnforcePurpose:  falseStr,
-			wantPurpose9EnforcePurpose:  trueStr,
-			wantPurpose10EnforcePurpose: falseStr,
-		},
-		{
-			description: "enforce_algo not set; don't set it based on enforce_purpose bool value",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enforce_purpose: true
-                  purpose2:
-                    enforce_purpose: false
-                  purpose3:
-                    enforce_purpose: true
-                  purpose4:
-                    enforce_purpose: false
-                  purpose5:
-                    enforce_purpose: true
-                  purpose6:
-                    enforce_purpose: false
-                  purpose7:
-                    enforce_purpose: true
-                  purpose8:
-                    enforce_purpose: false
-                  purpose9:
-                    enforce_purpose: true
-                  purpose10:
-                    enforce_purpose: false
-            `),
-			wantEnforceAlgosSet:         false,
-			wantEnforcePurposesSet:      true,
-			wantPurpose1EnforcePurpose:  trueStr,
-			wantPurpose2EnforcePurpose:  falseStr,
-			wantPurpose3EnforcePurpose:  trueStr,
-			wantPurpose4EnforcePurpose:  falseStr,
-			wantPurpose5EnforcePurpose:  trueStr,
-			wantPurpose6EnforcePurpose:  falseStr,
-			wantPurpose7EnforcePurpose:  trueStr,
-			wantPurpose8EnforcePurpose:  falseStr,
-			wantPurpose9EnforcePurpose:  trueStr,
-			wantPurpose10EnforcePurpose: falseStr,
-		},
-		{
-			description: "enforce_algo is set and enforce_purpose is not; enforce_algo is unchanged",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enforce_algo: "full"
-                  purpose2:
-                    enforce_algo: "full"
-                  purpose3:
-                    enforce_algo: "full"
-                  purpose4:
-                    enforce_algo: "full"
-                  purpose5:
-                    enforce_algo: "full"
-                  purpose6:
-                    enforce_algo: "full"
-                  purpose7:
-                    enforce_algo: "full"
-                  purpose8:
-                    enforce_algo: "full"
-                  purpose9:
-                    enforce_algo: "full"
-                  purpose10:
-                    enforce_algo: "full"
-            `),
-			wantEnforceAlgosSet:      true,
-			wantPurpose1EnforceAlgo:  TCF2EnforceAlgoFull,
-			wantPurpose2EnforceAlgo:  TCF2EnforceAlgoFull,
-			wantPurpose3EnforceAlgo:  TCF2EnforceAlgoFull,
-			wantPurpose4EnforceAlgo:  TCF2EnforceAlgoFull,
-			wantPurpose5EnforceAlgo:  TCF2EnforceAlgoFull,
-			wantPurpose6EnforceAlgo:  TCF2EnforceAlgoFull,
-			wantPurpose7EnforceAlgo:  TCF2EnforceAlgoFull,
-			wantPurpose8EnforceAlgo:  TCF2EnforceAlgoFull,
-			wantPurpose9EnforceAlgo:  TCF2EnforceAlgoFull,
-			wantPurpose10EnforceAlgo: TCF2EnforceAlgoFull,
-			wantEnforcePurposesSet:   false,
-		},
-		{
-			description: "enforce_algo and enforce_purpose are set; enforce_algo is unchanged",
-			config: []byte(`
-              gdpr:
-                tcf2:
-                  purpose1:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-                  purpose2:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-                  purpose3:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-                  purpose4:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-                  purpose5:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-                  purpose6:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-                  purpose7:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-                  purpose8:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-                  purpose9:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-                  purpose10:
-                    enforce_algo: "full"
-                    enforce_purpose: "no"
-            `),
-			wantEnforceAlgosSet:         true,
-			wantPurpose1EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose2EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose3EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose4EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose5EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose6EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose7EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose8EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose9EnforceAlgo:     TCF2EnforceAlgoFull,
-			wantPurpose10EnforceAlgo:    TCF2EnforceAlgoFull,
-			wantEnforcePurposesSet:      true,
-			wantPurpose1EnforcePurpose:  falseStr,
-			wantPurpose2EnforcePurpose:  falseStr,
-			wantPurpose3EnforcePurpose:  falseStr,
-			wantPurpose4EnforcePurpose:  falseStr,
-			wantPurpose5EnforcePurpose:  falseStr,
-			wantPurpose6EnforcePurpose:  falseStr,
-			wantPurpose7EnforcePurpose:  falseStr,
-			wantPurpose8EnforcePurpose:  falseStr,
-			wantPurpose9EnforcePurpose:  falseStr,
-			wantPurpose10EnforcePurpose: falseStr,
-		},
-	}
-
-	for _, tt := range tests {
-		v := viper.New()
-		v.SetConfigType("yaml")
-		v.ReadConfig(bytes.NewBuffer(tt.config))
-
-		migrateConfigTCF2EnforcePurposeFlags(v)
-
-		if tt.wantEnforceAlgosSet {
-			assert.Equal(t, tt.wantPurpose1EnforceAlgo, v.GetString("gdpr.tcf2.purpose1.enforce_algo"), tt.description)
-			assert.Equal(t, tt.wantPurpose2EnforceAlgo, v.GetString("gdpr.tcf2.purpose2.enforce_algo"), tt.description)
-			assert.Equal(t, tt.wantPurpose3EnforceAlgo, v.GetString("gdpr.tcf2.purpose3.enforce_algo"), tt.description)
-			assert.Equal(t, tt.wantPurpose4EnforceAlgo, v.GetString("gdpr.tcf2.purpose4.enforce_algo"), tt.description)
-			assert.Equal(t, tt.wantPurpose5EnforceAlgo, v.GetString("gdpr.tcf2.purpose5.enforce_algo"), tt.description)
-			assert.Equal(t, tt.wantPurpose6EnforceAlgo, v.GetString("gdpr.tcf2.purpose6.enforce_algo"), tt.description)
-			assert.Equal(t, tt.wantPurpose7EnforceAlgo, v.GetString("gdpr.tcf2.purpose7.enforce_algo"), tt.description)
-			assert.Equal(t, tt.wantPurpose8EnforceAlgo, v.GetString("gdpr.tcf2.purpose8.enforce_algo"), tt.description)
-			assert.Equal(t, tt.wantPurpose9EnforceAlgo, v.GetString("gdpr.tcf2.purpose9.enforce_algo"), tt.description)
-			assert.Equal(t, tt.wantPurpose10EnforceAlgo, v.GetString("gdpr.tcf2.purpose10.enforce_algo"), tt.description)
-		} else {
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose1.enforce_algo"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose2.enforce_algo"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose3.enforce_algo"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose4.enforce_algo"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose5.enforce_algo"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose6.enforce_algo"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose7.enforce_algo"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose8.enforce_algo"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose9.enforce_algo"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose10.enforce_algo"), tt.description)
-		}
-
-		if tt.wantEnforcePurposesSet {
-			assert.Equal(t, tt.wantPurpose1EnforcePurpose, v.GetString("gdpr.tcf2.purpose1.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose2EnforcePurpose, v.GetString("gdpr.tcf2.purpose2.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose3EnforcePurpose, v.GetString("gdpr.tcf2.purpose3.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose4EnforcePurpose, v.GetString("gdpr.tcf2.purpose4.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose5EnforcePurpose, v.GetString("gdpr.tcf2.purpose5.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose6EnforcePurpose, v.GetString("gdpr.tcf2.purpose6.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose7EnforcePurpose, v.GetString("gdpr.tcf2.purpose7.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose8EnforcePurpose, v.GetString("gdpr.tcf2.purpose8.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose9EnforcePurpose, v.GetString("gdpr.tcf2.purpose9.enforce_purpose"), tt.description)
-			assert.Equal(t, tt.wantPurpose10EnforcePurpose, v.GetString("gdpr.tcf2.purpose10.enforce_purpose"), tt.description)
-		} else {
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose1.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose2.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose3.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose4.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose5.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose6.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose7.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose8.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose9.enforce_purpose"), tt.description)
-			assert.Nil(t, v.Get("gdpr.tcf2.purpose10.enforce_purpose"), tt.description)
-		}
-	}
-}
-
-func TestMigrateConfigDatabaseConnection(t *testing.T) {
-	type configs struct {
-		old  []byte
-		new  []byte
-		both []byte
-	}
-
-	// Stored Requests Config Migration
-	storedReqestsConfigs := configs{
-		old: []byte(`
-      stored_requests:
-        postgres:
-          connection:
-            dbname: "old_connection_dbname"
-            host: "old_connection_host"
-            port: 1000
-            user: "old_connection_user"
-            password: "old_connection_password"
-          fetcher:
-            query: "old_fetcher_query"
-            amp_query: "old_fetcher_amp_query"
-          initialize_caches:
-            timeout_ms: 1000
-            query: "old_initialize_caches_query"
-            amp_query: "old_initialize_caches_amp_query"
-          poll_for_updates:
-            refresh_rate_seconds: 1000
-            timeout_ms: 1000
-            query: "old_poll_for_updates_query"
-            amp_query: "old_poll_for_updates_amp_query"
-    `),
-		new: []byte(`
-      stored_requests:
-        database:
-          connection:
-            dbname: "new_connection_dbname"
-            host: "new_connection_host"
-            port: 2000
-            user: "new_connection_user"
-            password: "new_connection_password"
-          fetcher:
-            query: "new_fetcher_query"
-            amp_query: "new_fetcher_amp_query"
-          initialize_caches:
-            timeout_ms: 2000
-            query: "new_initialize_caches_query"
-            amp_query: "new_initialize_caches_amp_query"
-          poll_for_updates:
-            refresh_rate_seconds: 2000
-            timeout_ms: 2000
-            query: "new_poll_for_updates_query"
-            amp_query: "new_poll_for_updates_amp_query"
-    `),
-		both: []byte(`
-      stored_requests:
-        postgres:
-          connection:
-            dbname: "old_connection_dbname"
-            host: "old_connection_host"
-            port: 1000
-            user: "old_connection_user"
-            password: "old_connection_password"
-          fetcher:
-            query: "old_fetcher_query"
-            amp_query: "old_fetcher_amp_query"
-          initialize_caches:
-            timeout_ms: 1000
-            query: "old_initialize_caches_query"
-            amp_query: "old_initialize_caches_amp_query"
-          poll_for_updates:
-            refresh_rate_seconds: 1000
-            timeout_ms: 1000
-            query: "old_poll_for_updates_query"
-            amp_query: "old_poll_for_updates_amp_query"
-        database:
-          connection:
-            dbname: "new_connection_dbname"
-            host: "new_connection_host"
-            port: 2000
-            user: "new_connection_user"
-            password: "new_connection_password"
-          fetcher:
-            query: "new_fetcher_query"
-            amp_query: "new_fetcher_amp_query"
-          initialize_caches:
-            timeout_ms: 2000
-            query: "new_initialize_caches_query"
-            amp_query: "new_initialize_caches_amp_query"
-          poll_for_updates:
-            refresh_rate_seconds: 2000
-            timeout_ms: 2000
-            query: "new_poll_for_updates_query"
-            amp_query: "new_poll_for_updates_amp_query"
-    `),
-	}
-
-	storedRequestsTests := []struct {
-		description string
-		config      []byte
-
-		want_connection_dbname                     string
-		want_connection_host                       string
-		want_connection_port                       int
-		want_connection_user                       string
-		want_connection_password                   string
-		want_fetcher_query                         string
-		want_fetcher_amp_query                     string
-		want_initialize_caches_timeout_ms          int
-		want_initialize_caches_query               string
-		want_initialize_caches_amp_query           string
-		want_poll_for_updates_refresh_rate_seconds int
-		want_poll_for_updates_timeout_ms           int
-		want_poll_for_updates_query                string
-		want_poll_for_updates_amp_query            string
-	}{
-		{
-			description: "New config and old config not set",
-			config:      []byte{},
-		},
-		{
-			description: "New config not set, old config set",
-			config:      storedReqestsConfigs.old,
-
-			want_connection_dbname:                     "old_connection_dbname",
-			want_connection_host:                       "old_connection_host",
-			want_connection_port:                       1000,
-			want_connection_user:                       "old_connection_user",
-			want_connection_password:                   "old_connection_password",
-			want_fetcher_query:                         "old_fetcher_query",
-			want_fetcher_amp_query:                     "old_fetcher_amp_query",
-			want_initialize_caches_timeout_ms:          1000,
-			want_initialize_caches_query:               "old_initialize_caches_query",
-			want_initialize_caches_amp_query:           "old_initialize_caches_amp_query",
-			want_poll_for_updates_refresh_rate_seconds: 1000,
-			want_poll_for_updates_timeout_ms:           1000,
-			want_poll_for_updates_query:                "old_poll_for_updates_query",
-			want_poll_for_updates_amp_query:            "old_poll_for_updates_amp_query",
-		},
-		{
-			description: "New config set, old config not set",
-			config:      storedReqestsConfigs.new,
-
-			want_connection_dbname:                     "new_connection_dbname",
-			want_connection_host:                       "new_connection_host",
-			want_connection_port:                       2000,
-			want_connection_user:                       "new_connection_user",
-			want_connection_password:                   "new_connection_password",
-			want_fetcher_query:                         "new_fetcher_query",
-			want_fetcher_amp_query:                     "new_fetcher_amp_query",
-			want_initialize_caches_timeout_ms:          2000,
-			want_initialize_caches_query:               "new_initialize_caches_query",
-			want_initialize_caches_amp_query:           "new_initialize_caches_amp_query",
-			want_poll_for_updates_refresh_rate_seconds: 2000,
-			want_poll_for_updates_timeout_ms:           2000,
-			want_poll_for_updates_query:                "new_poll_for_updates_query",
-			want_poll_for_updates_amp_query:            "new_poll_for_updates_amp_query",
-		},
-		{
-			description: "New config and old config set",
-			config:      storedReqestsConfigs.both,
-
-			want_connection_dbname:                     "new_connection_dbname",
-			want_connection_host:                       "new_connection_host",
-			want_connection_port:                       2000,
-			want_connection_user:                       "new_connection_user",
-			want_connection_password:                   "new_connection_password",
-			want_fetcher_query:                         "new_fetcher_query",
-			want_fetcher_amp_query:                     "new_fetcher_amp_query",
-			want_initialize_caches_timeout_ms:          2000,
-			want_initialize_caches_query:               "new_initialize_caches_query",
-			want_initialize_caches_amp_query:           "new_initialize_caches_amp_query",
-			want_poll_for_updates_refresh_rate_seconds: 2000,
-			want_poll_for_updates_timeout_ms:           2000,
-			want_poll_for_updates_query:                "new_poll_for_updates_query",
-			want_poll_for_updates_amp_query:            "new_poll_for_updates_amp_query",
-		},
-	}
-
-	for _, tt := range storedRequestsTests {
-		v := viper.New()
-		v.SetConfigType("yaml")
-		v.ReadConfig(bytes.NewBuffer(tt.config))
-
-		migrateConfigDatabaseConnection(v)
-
-		if len(tt.config) > 0 {
-			assert.Equal(t, tt.want_connection_dbname, v.GetString("stored_requests.database.connection.dbname"), tt.description)
-			assert.Equal(t, tt.want_connection_host, v.GetString("stored_requests.database.connection.host"), tt.description)
-			assert.Equal(t, tt.want_connection_port, v.GetInt("stored_requests.database.connection.port"), tt.description)
-			assert.Equal(t, tt.want_connection_user, v.GetString("stored_requests.database.connection.user"), tt.description)
-			assert.Equal(t, tt.want_connection_password, v.GetString("stored_requests.database.connection.password"), tt.description)
-			assert.Equal(t, tt.want_fetcher_query, v.GetString("stored_requests.database.fetcher.query"), tt.description)
-			assert.Equal(t, tt.want_fetcher_amp_query, v.GetString("stored_requests.database.fetcher.amp_query"), tt.description)
-			assert.Equal(t, tt.want_initialize_caches_timeout_ms, v.GetInt("stored_requests.database.initialize_caches.timeout_ms"), tt.description)
-			assert.Equal(t, tt.want_initialize_caches_query, v.GetString("stored_requests.database.initialize_caches.query"), tt.description)
-			assert.Equal(t, tt.want_initialize_caches_amp_query, v.GetString("stored_requests.database.initialize_caches.amp_query"), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_refresh_rate_seconds, v.GetInt("stored_requests.database.poll_for_updates.refresh_rate_seconds"), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_timeout_ms, v.GetInt("stored_requests.database.poll_for_updates.timeout_ms"), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_query, v.GetString("stored_requests.database.poll_for_updates.query"), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_amp_query, v.GetString("stored_requests.database.poll_for_updates.amp_query"), tt.description)
-		} else {
-			assert.Nil(t, v.Get("stored_requests.database.connection.dbname"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.connection.host"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.connection.port"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.connection.user"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.connection.password"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.fetcher.query"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.fetcher.amp_query"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.initialize_caches.timeout_ms"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.initialize_caches.query"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.initialize_caches.amp_query"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.poll_for_updates.refresh_rate_seconds"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.poll_for_updates.timeout_ms"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.poll_for_updates.query"), tt.description)
-			assert.Nil(t, v.Get("stored_requests.database.poll_for_updates.amp_query"), tt.description)
-		}
-	}
-
-	// Stored Video Reqs Config Migration
-	storedVideoReqsConfigs := configs{
-		old: []byte(`
-      stored_video_req:
-        postgres:
-          connection:
-            dbname: "old_connection_dbname"
-            host: "old_connection_host"
-            port: 1000
-            user: "old_connection_user"
-            password: "old_connection_password"
-          fetcher:
-            query: "old_fetcher_query"
-          initialize_caches:
-            timeout_ms: 1000
-            query: "old_initialize_caches_query"
-          poll_for_updates:
-            refresh_rate_seconds: 1000
-            timeout_ms: 1000
-            query: "old_poll_for_updates_query"
-    `),
-		new: []byte(`
-      stored_video_req:
-        database:
-          connection:
-            dbname: "new_connection_dbname"
-            host: "new_connection_host"
-            port: 2000
-            user: "new_connection_user"
-            password: "new_connection_password"
-          fetcher:
-            query: "new_fetcher_query"
-          initialize_caches:
-            timeout_ms: 2000
-            query: "new_initialize_caches_query"
-          poll_for_updates:
-            refresh_rate_seconds: 2000
-            timeout_ms: 2000
-            query: "new_poll_for_updates_query"
-    `),
-		both: []byte(`
-      stored_video_req:
-        postgres:
-          connection:
-            dbname: "old_connection_dbname"
-            host: "old_connection_host"
-            port: 1000
-            user: "old_connection_user"
-            password: "old_connection_password"
-          fetcher:
-            query: "old_fetcher_query"
-          initialize_caches:
-            timeout_ms: 1000
-            query: "old_initialize_caches_query"
-          poll_for_updates:
-            refresh_rate_seconds: 1000
-            timeout_ms: 1000
-            query: "old_poll_for_updates_query"
-        database:
-          connection:
-            dbname: "new_connection_dbname"
-            host: "new_connection_host"
-            port: 2000
-            user: "new_connection_user"
-            password: "new_connection_password"
-          fetcher:
-            query: "new_fetcher_query"
-          initialize_caches:
-            timeout_ms: 2000
-            query: "new_initialize_caches_query"
-          poll_for_updates:
-            refresh_rate_seconds: 2000
-            timeout_ms: 2000
-            query: "new_poll_for_updates_query"
-    `),
-	}
-
-	storedVideoReqsTests := []struct {
-		description string
-		config      []byte
-
-		want_connection_dbname                     string
-		want_connection_host                       string
-		want_connection_port                       int
-		want_connection_user                       string
-		want_connection_password                   string
-		want_fetcher_query                         string
-		want_initialize_caches_timeout_ms          int
-		want_initialize_caches_query               string
-		want_poll_for_updates_refresh_rate_seconds int
-		want_poll_for_updates_timeout_ms           int
-		want_poll_for_updates_query                string
-	}{
-		{
-			description: "New config and old config not set",
-			config:      []byte{},
-		},
-		{
-			description: "New config not set, old config set",
-			config:      storedVideoReqsConfigs.old,
-
-			want_connection_dbname:                     "old_connection_dbname",
-			want_connection_host:                       "old_connection_host",
-			want_connection_port:                       1000,
-			want_connection_user:                       "old_connection_user",
-			want_connection_password:                   "old_connection_password",
-			want_fetcher_query:                         "old_fetcher_query",
-			want_initialize_caches_timeout_ms:          1000,
-			want_initialize_caches_query:               "old_initialize_caches_query",
-			want_poll_for_updates_refresh_rate_seconds: 1000,
-			want_poll_for_updates_timeout_ms:           1000,
-			want_poll_for_updates_query:                "old_poll_for_updates_query",
-		},
-		{
-			description: "New config set, old config not set",
-			config:      storedVideoReqsConfigs.new,
-
-			want_connection_dbname:                     "new_connection_dbname",
-			want_connection_host:                       "new_connection_host",
-			want_connection_port:                       2000,
-			want_connection_user:                       "new_connection_user",
-			want_connection_password:                   "new_connection_password",
-			want_fetcher_query:                         "new_fetcher_query",
-			want_initialize_caches_timeout_ms:          2000,
-			want_initialize_caches_query:               "new_initialize_caches_query",
-			want_poll_for_updates_refresh_rate_seconds: 2000,
-			want_poll_for_updates_timeout_ms:           2000,
-			want_poll_for_updates_query:                "new_poll_for_updates_query",
-		},
-		{
-			description: "New config and old config set",
-			config:      storedVideoReqsConfigs.both,
-
-			want_connection_dbname:                     "new_connection_dbname",
-			want_connection_host:                       "new_connection_host",
-			want_connection_port:                       2000,
-			want_connection_user:                       "new_connection_user",
-			want_connection_password:                   "new_connection_password",
-			want_fetcher_query:                         "new_fetcher_query",
-			want_initialize_caches_timeout_ms:          2000,
-			want_initialize_caches_query:               "new_initialize_caches_query",
-			want_poll_for_updates_refresh_rate_seconds: 2000,
-			want_poll_for_updates_timeout_ms:           2000,
-			want_poll_for_updates_query:                "new_poll_for_updates_query",
-		},
-	}
-
-	for _, tt := range storedVideoReqsTests {
-		v := viper.New()
-		v.SetConfigType("yaml")
-		v.ReadConfig(bytes.NewBuffer(tt.config))
-
-		migrateConfigDatabaseConnection(v)
-
-		if len(tt.config) > 0 {
-			assert.Equal(t, tt.want_connection_dbname, v.Get("stored_video_req.database.connection.dbname").(string), tt.description)
-			assert.Equal(t, tt.want_connection_host, v.Get("stored_video_req.database.connection.host").(string), tt.description)
-			assert.Equal(t, tt.want_connection_port, v.Get("stored_video_req.database.connection.port").(int), tt.description)
-			assert.Equal(t, tt.want_connection_user, v.Get("stored_video_req.database.connection.user").(string), tt.description)
-			assert.Equal(t, tt.want_connection_password, v.Get("stored_video_req.database.connection.password").(string), tt.description)
-			assert.Equal(t, tt.want_fetcher_query, v.Get("stored_video_req.database.fetcher.query").(string), tt.description)
-			assert.Equal(t, tt.want_initialize_caches_timeout_ms, v.Get("stored_video_req.database.initialize_caches.timeout_ms").(int), tt.description)
-			assert.Equal(t, tt.want_initialize_caches_query, v.Get("stored_video_req.database.initialize_caches.query").(string), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_refresh_rate_seconds, v.Get("stored_video_req.database.poll_for_updates.refresh_rate_seconds").(int), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_timeout_ms, v.Get("stored_video_req.database.poll_for_updates.timeout_ms").(int), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_query, v.Get("stored_video_req.database.poll_for_updates.query").(string), tt.description)
-		} else {
-			assert.Nil(t, v.Get("stored_video_req.database.connection.dbname"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.connection.host"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.connection.port"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.connection.user"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.connection.password"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.fetcher.query"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.initialize_caches.timeout_ms"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.initialize_caches.query"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.poll_for_updates.refresh_rate_seconds"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.poll_for_updates.timeout_ms"), tt.description)
-			assert.Nil(t, v.Get("stored_video_req.database.poll_for_updates.query"), tt.description)
-		}
-	}
-
-	// Stored Responses Config Migration
-	storedResponsesConfigs := configs{
-		old: []byte(`
-      stored_responses:
-        postgres:
-          connection:
-            dbname: "old_connection_dbname"
-            host: "old_connection_host"
-            port: 1000
-            user: "old_connection_user"
-            password: "old_connection_password"
-          fetcher:
-            query: "old_fetcher_query"
-          initialize_caches:
-            timeout_ms: 1000
-            query: "old_initialize_caches_query"
-          poll_for_updates:
-            refresh_rate_seconds: 1000
-            timeout_ms: 1000
-            query: "old_poll_for_updates_query"
-    `),
-		new: []byte(`
-      stored_responses:
-        database:
-          connection:
-            dbname: "new_connection_dbname"
-            host: "new_connection_host"
-            port: 2000
-            user: "new_connection_user"
-            password: "new_connection_password"
-          fetcher:
-            query: "new_fetcher_query"
-          initialize_caches:
-            timeout_ms: 2000
-            query: "new_initialize_caches_query"
-          poll_for_updates:
-            refresh_rate_seconds: 2000
-            timeout_ms: 2000
-            query: "new_poll_for_updates_query"
-    `),
-		both: []byte(`
-      stored_responses:
-        postgres:
-          connection:
-            dbname: "old_connection_dbname"
-            host: "old_connection_host"
-            port: 1000
-            user: "old_connection_user"
-            password: "old_connection_password"
-          fetcher:
-            query: "old_fetcher_query"
-          initialize_caches:
-            timeout_ms: 1000
-            query: "old_initialize_caches_query"
-          poll_for_updates:
-            refresh_rate_seconds: 1000
-            timeout_ms: 1000
-            query: "old_poll_for_updates_query"
-        database:
-          connection:
-            dbname: "new_connection_dbname"
-            host: "new_connection_host"
-            port: 2000
-            user: "new_connection_user"
-            password: "new_connection_password"
-          fetcher:
-            query: "new_fetcher_query"
-          initialize_caches:
-            timeout_ms: 2000
-            query: "new_initialize_caches_query"
-          poll_for_updates:
-            refresh_rate_seconds: 2000
-            timeout_ms: 2000
-            query: "new_poll_for_updates_query"
-    `),
-	}
-
-	storedResponsesTests := []struct {
-		description string
-		config      []byte
-
-		want_connection_dbname                     string
-		want_connection_host                       string
-		want_connection_port                       int
-		want_connection_user                       string
-		want_connection_password                   string
-		want_fetcher_query                         string
-		want_initialize_caches_timeout_ms          int
-		want_initialize_caches_query               string
-		want_poll_for_updates_refresh_rate_seconds int
-		want_poll_for_updates_timeout_ms           int
-		want_poll_for_updates_query                string
-	}{
-		{
-			description: "New config and old config not set",
-			config:      []byte{},
-		},
-		{
-			description: "New config not set, old config set",
-			config:      storedResponsesConfigs.old,
-
-			want_connection_dbname:                     "old_connection_dbname",
-			want_connection_host:                       "old_connection_host",
-			want_connection_port:                       1000,
-			want_connection_user:                       "old_connection_user",
-			want_connection_password:                   "old_connection_password",
-			want_fetcher_query:                         "old_fetcher_query",
-			want_initialize_caches_timeout_ms:          1000,
-			want_initialize_caches_query:               "old_initialize_caches_query",
-			want_poll_for_updates_refresh_rate_seconds: 1000,
-			want_poll_for_updates_timeout_ms:           1000,
-			want_poll_for_updates_query:                "old_poll_for_updates_query",
-		},
-		{
-			description: "New config set, old config not set",
-			config:      storedResponsesConfigs.new,
-
-			want_connection_dbname:                     "new_connection_dbname",
-			want_connection_host:                       "new_connection_host",
-			want_connection_port:                       2000,
-			want_connection_user:                       "new_connection_user",
-			want_connection_password:                   "new_connection_password",
-			want_fetcher_query:                         "new_fetcher_query",
-			want_initialize_caches_timeout_ms:          2000,
-			want_initialize_caches_query:               "new_initialize_caches_query",
-			want_poll_for_updates_refresh_rate_seconds: 2000,
-			want_poll_for_updates_timeout_ms:           2000,
-			want_poll_for_updates_query:                "new_poll_for_updates_query",
-		},
-		{
-			description: "New config and old config set",
-			config:      storedResponsesConfigs.both,
-
-			want_connection_dbname:                     "new_connection_dbname",
-			want_connection_host:                       "new_connection_host",
-			want_connection_port:                       2000,
-			want_connection_user:                       "new_connection_user",
-			want_connection_password:                   "new_connection_password",
-			want_fetcher_query:                         "new_fetcher_query",
-			want_initialize_caches_timeout_ms:          2000,
-			want_initialize_caches_query:               "new_initialize_caches_query",
-			want_poll_for_updates_refresh_rate_seconds: 2000,
-			want_poll_for_updates_timeout_ms:           2000,
-			want_poll_for_updates_query:                "new_poll_for_updates_query",
-		},
-	}
-
-	for _, tt := range storedResponsesTests {
-		v := viper.New()
-		v.SetConfigType("yaml")
-		v.ReadConfig(bytes.NewBuffer(tt.config))
-
-		migrateConfigDatabaseConnection(v)
-
-		if len(tt.config) > 0 {
-			assert.Equal(t, tt.want_connection_dbname, v.Get("stored_responses.database.connection.dbname").(string), tt.description)
-			assert.Equal(t, tt.want_connection_host, v.Get("stored_responses.database.connection.host").(string), tt.description)
-			assert.Equal(t, tt.want_connection_port, v.Get("stored_responses.database.connection.port").(int), tt.description)
-			assert.Equal(t, tt.want_connection_user, v.Get("stored_responses.database.connection.user").(string), tt.description)
-			assert.Equal(t, tt.want_connection_password, v.Get("stored_responses.database.connection.password").(string), tt.description)
-			assert.Equal(t, tt.want_fetcher_query, v.Get("stored_responses.database.fetcher.query").(string), tt.description)
-			assert.Equal(t, tt.want_initialize_caches_timeout_ms, v.Get("stored_responses.database.initialize_caches.timeout_ms").(int), tt.description)
-			assert.Equal(t, tt.want_initialize_caches_query, v.Get("stored_responses.database.initialize_caches.query").(string), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_refresh_rate_seconds, v.Get("stored_responses.database.poll_for_updates.refresh_rate_seconds").(int), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_timeout_ms, v.Get("stored_responses.database.poll_for_updates.timeout_ms").(int), tt.description)
-			assert.Equal(t, tt.want_poll_for_updates_query, v.Get("stored_responses.database.poll_for_updates.query").(string), tt.description)
-		} else {
-			assert.Nil(t, v.Get("stored_responses.database.connection.dbname"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.connection.host"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.connection.port"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.connection.user"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.connection.password"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.fetcher.query"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.initialize_caches.timeout_ms"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.initialize_caches.query"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.poll_for_updates.refresh_rate_seconds"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.poll_for_updates.timeout_ms"), tt.description)
-			assert.Nil(t, v.Get("stored_responses.database.poll_for_updates.query"), tt.description)
-		}
-	}
-}
-
-func TestMigrateConfigDatabaseConnectionUsingEnvVars(t *testing.T) {
-	tests := []struct {
-		description        string
-		prefix             string
-		setDatabaseEnvVars bool
-		setPostgresEnvVars bool
-	}{
-		{
-			description:        "stored requests old config set",
-			prefix:             "stored_requests",
-			setPostgresEnvVars: true,
-		},
-		{
-			description:        "stored requests new config set",
-			prefix:             "stored_requests",
-			setDatabaseEnvVars: true,
-		},
-		{
-			description:        "stored requests old and new config set",
-			prefix:             "stored_requests",
-			setDatabaseEnvVars: true,
-			setPostgresEnvVars: true,
-		},
-		{
-			description:        "stored video requests old config set",
-			prefix:             "stored_video_req",
-			setPostgresEnvVars: true,
-		},
-		{
-			description:        "stored video requests new config set",
-			prefix:             "stored_video_req",
-			setDatabaseEnvVars: true,
-		},
-		{
-			description:        "stored video requests old and new config set",
-			prefix:             "stored_video_req",
-			setDatabaseEnvVars: true,
-			setPostgresEnvVars: true,
-		},
-		{
-			description:        "stored responses old config set",
-			prefix:             "stored_responses",
-			setPostgresEnvVars: true,
-		},
-		{
-			description:        "stored responses new config set",
-			prefix:             "stored_responses",
-			setDatabaseEnvVars: true,
-		},
-		{
-			description:        "stored responses old and new config set",
-			prefix:             "stored_responses",
-			setDatabaseEnvVars: true,
-			setPostgresEnvVars: true,
-		},
-	}
-
-	pgValues := map[string]string{
-		"CONNECTION_DBNAME":                     "pg-dbname",
-		"CONNECTION_HOST":                       "pg-host",
-		"CONNECTION_PORT":                       "1",
-		"CONNECTION_USER":                       "pg-user",
-		"CONNECTION_PASSWORD":                   "pg-password",
-		"FETCHER_QUERY":                         "pg-fetcher-query",
-		"FETCHER_AMP_QUERY":                     "pg-fetcher-amp-query",
-		"INITIALIZE_CACHES_TIMEOUT_MS":          "2",
-		"INITIALIZE_CACHES_QUERY":               "pg-init-caches-query",
-		"INITIALIZE_CACHES_AMP_QUERY":           "pg-init-caches-amp-query",
-		"POLL_FOR_UPDATES_REFRESH_RATE_SECONDS": "3",
-		"POLL_FOR_UPDATES_TIMEOUT_MS":           "4",
-		"POLL_FOR_UPDATES_QUERY":                "pg-poll-query $LAST_UPDATED",
-		"POLL_FOR_UPDATES_AMP_QUERY":            "pg-poll-amp-query $LAST_UPDATED",
-	}
-	dbValues := map[string]string{
-		"CONNECTION_DBNAME":                     "db-dbname",
-		"CONNECTION_HOST":                       "db-host",
-		"CONNECTION_PORT":                       "5",
-		"CONNECTION_USER":                       "db-user",
-		"CONNECTION_PASSWORD":                   "db-password",
-		"FETCHER_QUERY":                         "db-fetcher-query",
-		"FETCHER_AMP_QUERY":                     "db-fetcher-amp-query",
-		"INITIALIZE_CACHES_TIMEOUT_MS":          "6",
-		"INITIALIZE_CACHES_QUERY":               "db-init-caches-query",
-		"INITIALIZE_CACHES_AMP_QUERY":           "db-init-caches-amp-query",
-		"POLL_FOR_UPDATES_REFRESH_RATE_SECONDS": "7",
-		"POLL_FOR_UPDATES_TIMEOUT_MS":           "8",
-		"POLL_FOR_UPDATES_QUERY":                "db-poll-query $LAST_UPDATED",
-		"POLL_FOR_UPDATES_AMP_QUERY":            "db-poll-amp-query $LAST_UPDATED",
-	}
-
-	for _, tt := range tests {
-		t.Run(tt.description, func(t *testing.T) {
-			prefix := "PBS_" + strings.ToUpper(tt.prefix)
-
-			// validation rules require in memory cache type to not be "none"
-			// given that we want to set the poll for update queries to non-empty values
-			envVarName := prefix + "_IN_MEMORY_CACHE_TYPE"
-			if oldval, ok := os.LookupEnv(envVarName); ok {
-				defer os.Setenv(envVarName, oldval)
-			} else {
-				defer os.Unsetenv(envVarName)
-			}
-			os.Setenv(envVarName, "unbounded")
-
-			if tt.setPostgresEnvVars {
-				for suffix, v := range pgValues {
-					envVarName := prefix + "_POSTGRES_" + suffix
-					if oldval, ok := os.LookupEnv(envVarName); ok {
-						defer os.Setenv(envVarName, oldval)
-					} else {
-						defer os.Unsetenv(envVarName)
-					}
-					os.Setenv(envVarName, v)
-				}
-			}
-			if tt.setDatabaseEnvVars {
-				for suffix, v := range dbValues {
-					envVarName := prefix + "_DATABASE_" + suffix
-					if oldval, ok := os.LookupEnv(envVarName); ok {
-						defer os.Setenv(envVarName, oldval)
-					} else {
-						defer os.Unsetenv(envVarName)
-					}
-					os.Setenv(envVarName, v)
-				}
-			}
-
-			c, _ := newDefaultConfig(t)
-
-			expectedDatabaseValues := map[string]string{}
-			if tt.setDatabaseEnvVars {
-				expectedDatabaseValues = dbValues
-			} else if tt.setPostgresEnvVars {
-				expectedDatabaseValues = pgValues
-			}
-
-			if tt.prefix == "stored_requests" {
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_DBNAME"], c.StoredRequests.Database.ConnectionInfo.Database, tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_HOST"], c.StoredRequests.Database.ConnectionInfo.Host, tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_PORT"], strconv.Itoa(c.StoredRequests.Database.ConnectionInfo.Port), tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_USER"], c.StoredRequests.Database.ConnectionInfo.Username, tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_PASSWORD"], c.StoredRequests.Database.ConnectionInfo.Password, tt.description)
-				assert.Equal(t, expectedDatabaseValues["FETCHER_QUERY"], c.StoredRequests.Database.FetcherQueries.QueryTemplate, tt.description)
-				assert.Equal(t, expectedDatabaseValues["INITIALIZE_CACHES_TIMEOUT_MS"], strconv.Itoa(c.StoredRequests.Database.CacheInitialization.Timeout), tt.description)
-				assert.Equal(t, expectedDatabaseValues["INITIALIZE_CACHES_QUERY"], c.StoredRequests.Database.CacheInitialization.Query, tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_REFRESH_RATE_SECONDS"], strconv.Itoa(c.StoredRequests.Database.PollUpdates.RefreshRate), tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_TIMEOUT_MS"], strconv.Itoa(c.StoredRequests.Database.PollUpdates.Timeout), tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_QUERY"], c.StoredRequests.Database.PollUpdates.Query, tt.description)
-				// AMP queries are only migrated for stored requests
-				assert.Equal(t, expectedDatabaseValues["FETCHER_AMP_QUERY"], c.StoredRequests.Database.FetcherQueries.AmpQueryTemplate, tt.description)
-				assert.Equal(t, expectedDatabaseValues["INITIALIZE_CACHES_AMP_QUERY"], c.StoredRequests.Database.CacheInitialization.AmpQuery, tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_AMP_QUERY"], c.StoredRequests.Database.PollUpdates.AmpQuery, tt.description)
-			} else if tt.prefix == "stored_video_req" {
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_DBNAME"], c.StoredVideo.Database.ConnectionInfo.Database, tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_HOST"], c.StoredVideo.Database.ConnectionInfo.Host, tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_PORT"], strconv.Itoa(c.StoredVideo.Database.ConnectionInfo.Port), tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_USER"], c.StoredVideo.Database.ConnectionInfo.Username, tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_PASSWORD"], c.StoredVideo.Database.ConnectionInfo.Password, tt.description)
-				assert.Equal(t, expectedDatabaseValues["FETCHER_QUERY"], c.StoredVideo.Database.FetcherQueries.QueryTemplate, tt.description)
-				assert.Equal(t, expectedDatabaseValues["INITIALIZE_CACHES_TIMEOUT_MS"], strconv.Itoa(c.StoredVideo.Database.CacheInitialization.Timeout), tt.description)
-				assert.Equal(t, expectedDatabaseValues["INITIALIZE_CACHES_QUERY"], c.StoredVideo.Database.CacheInitialization.Query, tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_REFRESH_RATE_SECONDS"], strconv.Itoa(c.StoredVideo.Database.PollUpdates.RefreshRate), tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_TIMEOUT_MS"], strconv.Itoa(c.StoredVideo.Database.PollUpdates.Timeout), tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_QUERY"], c.StoredVideo.Database.PollUpdates.Query, tt.description)
-				assert.Empty(t, c.StoredVideo.Database.FetcherQueries.AmpQueryTemplate, tt.description)
-				assert.Empty(t, c.StoredVideo.Database.CacheInitialization.AmpQuery, tt.description)
-				assert.Empty(t, c.StoredVideo.Database.PollUpdates.AmpQuery, tt.description)
-			} else {
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_DBNAME"], c.StoredResponses.Database.ConnectionInfo.Database, tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_HOST"], c.StoredResponses.Database.ConnectionInfo.Host, tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_PORT"], strconv.Itoa(c.StoredResponses.Database.ConnectionInfo.Port), tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_USER"], c.StoredResponses.Database.ConnectionInfo.Username, tt.description)
-				assert.Equal(t, expectedDatabaseValues["CONNECTION_PASSWORD"], c.StoredResponses.Database.ConnectionInfo.Password, tt.description)
-				assert.Equal(t, expectedDatabaseValues["FETCHER_QUERY"], c.StoredResponses.Database.FetcherQueries.QueryTemplate, tt.description)
-				assert.Equal(t, expectedDatabaseValues["INITIALIZE_CACHES_TIMEOUT_MS"], strconv.Itoa(c.StoredResponses.Database.CacheInitialization.Timeout), tt.description)
-				assert.Equal(t, expectedDatabaseValues["INITIALIZE_CACHES_QUERY"], c.StoredResponses.Database.CacheInitialization.Query, tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_REFRESH_RATE_SECONDS"], strconv.Itoa(c.StoredResponses.Database.PollUpdates.RefreshRate), tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_TIMEOUT_MS"], strconv.Itoa(c.StoredResponses.Database.PollUpdates.Timeout), tt.description)
-				assert.Equal(t, expectedDatabaseValues["POLL_FOR_UPDATES_QUERY"], c.StoredResponses.Database.PollUpdates.Query, tt.description)
-				assert.Empty(t, c.StoredResponses.Database.FetcherQueries.AmpQueryTemplate, tt.description)
-				assert.Empty(t, c.StoredResponses.Database.CacheInitialization.AmpQuery, tt.description)
-				assert.Empty(t, c.StoredResponses.Database.PollUpdates.AmpQuery, tt.description)
-			}
-		})
-	}
-}
-
-func TestMigrateConfigDatabaseQueryParams(t *testing.T) {
-
-	config := []byte(`
-    stored_requests:
-      postgres:
-        fetcher:
-          query:
-            SELECT * FROM Table1 WHERE id in (%REQUEST_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table2 WHERE id in (%IMP_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table3 WHERE id in (%ID_LIST%)
-          amp_query:
-            SELECT * FROM Table1 WHERE id in (%REQUEST_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table2 WHERE id in (%IMP_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table3 WHERE id in (%ID_LIST%)
-        poll_for_updates:
-          query: "SELECT * FROM Table1 WHERE last_updated > $1 UNION ALL SELECT * FROM Table2 WHERE last_updated > $1"
-          amp_query: "SELECT * FROM Table1 WHERE last_updated > $1 UNION ALL SELECT * FROM Table2 WHERE last_updated > $1"
-    stored_video_req:
-      postgres:
-        fetcher:
-          query:
-            SELECT * FROM Table1 WHERE id in (%REQUEST_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table2 WHERE id in (%IMP_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table3 WHERE id in (%ID_LIST%)
-          amp_query:
-            SELECT * FROM Table1 WHERE id in (%REQUEST_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table2 WHERE id in (%IMP_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table3 WHERE id in (%ID_LIST%)
-        poll_for_updates:
-          query: "SELECT * FROM Table1 WHERE last_updated > $1 UNION ALL SELECT * FROM Table2 WHERE last_updated > $1"
-          amp_query: "SELECT * FROM Table1 WHERE last_updated > $1 UNION ALL SELECT * FROM Table2 WHERE last_updated > $1"
-    stored_responses:
-      postgres:
-        fetcher:
-          query: 
-            SELECT * FROM Table1 WHERE id in (%REQUEST_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table2 WHERE id in (%IMP_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table3 WHERE id in (%ID_LIST%)
-          amp_query:
-            SELECT * FROM Table1 WHERE id in (%REQUEST_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table2 WHERE id in (%IMP_ID_LIST%)
-            UNION ALL
-            SELECT * FROM Table3 WHERE id in (%ID_LIST%)
-        poll_for_updates:
-          query: "SELECT * FROM Table1 WHERE last_updated > $1 UNION ALL SELECT * FROM Table2 WHERE last_updated > $1"
-          amp_query: "SELECT * FROM Table1 WHERE last_updated > $1 UNION ALL SELECT * FROM Table2 WHERE last_updated > $1"
-  `)
-
-	want_queries := struct {
-		fetcher_query              string
-		fetcher_amp_query          string
-		poll_for_updates_query     string
-		poll_for_updates_amp_query string
-	}{
-		fetcher_query: "SELECT * FROM Table1 WHERE id in ($REQUEST_ID_LIST) " +
-			"UNION ALL " +
-			"SELECT * FROM Table2 WHERE id in ($IMP_ID_LIST) " +
-			"UNION ALL " +
-			"SELECT * FROM Table3 WHERE id in ($ID_LIST)",
-		fetcher_amp_query: "SELECT * FROM Table1 WHERE id in ($REQUEST_ID_LIST) " +
-			"UNION ALL " +
-			"SELECT * FROM Table2 WHERE id in ($IMP_ID_LIST) " +
-			"UNION ALL " +
-			"SELECT * FROM Table3 WHERE id in ($ID_LIST)",
-		poll_for_updates_query:     "SELECT * FROM Table1 WHERE last_updated > $LAST_UPDATED UNION ALL SELECT * FROM Table2 WHERE last_updated > $LAST_UPDATED",
-		poll_for_updates_amp_query: "SELECT * FROM Table1 WHERE last_updated > $LAST_UPDATED UNION ALL SELECT * FROM Table2 WHERE last_updated > $LAST_UPDATED",
-	}
-
-	v := viper.New()
-	v.SetConfigType("yaml")
-	err := v.ReadConfig(bytes.NewBuffer(config))
-	assert.NoError(t, err)
-
-	migrateConfigDatabaseConnection(v)
-
-	// stored_requests queries
-	assert.Equal(t, want_queries.fetcher_query, v.GetString("stored_requests.database.fetcher.query"))
-	assert.Equal(t, want_queries.fetcher_amp_query, v.GetString("stored_requests.database.fetcher.amp_query"))
-	assert.Equal(t, want_queries.poll_for_updates_query, v.GetString("stored_requests.database.poll_for_updates.query"))
-	assert.Equal(t, want_queries.poll_for_updates_amp_query, v.GetString("stored_requests.database.poll_for_updates.amp_query"))
-
-	// stored_video_req queries
-	assert.Equal(t, want_queries.fetcher_query, v.GetString("stored_video_req.database.fetcher.query"))
-	assert.Equal(t, want_queries.fetcher_amp_query, v.GetString("stored_video_req.database.fetcher.amp_query"))
-	assert.Equal(t, want_queries.poll_for_updates_query, v.GetString("stored_video_req.database.poll_for_updates.query"))
-	assert.Equal(t, want_queries.poll_for_updates_amp_query, v.GetString("stored_video_req.database.poll_for_updates.amp_query"))
-
-	// stored_responses queries
-	assert.Equal(t, want_queries.fetcher_query, v.GetString("stored_responses.database.fetcher.query"))
-	assert.Equal(t, want_queries.fetcher_amp_query, v.GetString("stored_responses.database.fetcher.amp_query"))
-	assert.Equal(t, want_queries.poll_for_updates_query, v.GetString("stored_responses.database.poll_for_updates.query"))
-	assert.Equal(t, want_queries.poll_for_updates_amp_query, v.GetString("stored_responses.database.poll_for_updates.amp_query"))
-}
-
-func TestMigrateConfigCompression(t *testing.T) {
-	testCases := []struct {
-		desc                string
-		config              []byte
-		wantEnableGZIP      bool
-		wantReqGZIPEnabled  bool
-		wantRespGZIPEnabled bool
-	}{
-
-		{
-			desc:                "New config and old config not set",
-			config:              []byte{},
-			wantEnableGZIP:      false,
-			wantReqGZIPEnabled:  false,
-			wantRespGZIPEnabled: false,
-		},
-		{
-			desc: "Old config set, new config not set",
-			config: []byte(`
-                    enable_gzip: true
-                    `),
-			wantEnableGZIP:      true,
-			wantRespGZIPEnabled: true,
-			wantReqGZIPEnabled:  false,
-		},
-		{
-			desc: "Old config not set, new config set",
-			config: []byte(`
-                    compression:
-                        response:
-                            enable_gzip: true
-                        request:
-                            enable_gzip: false
-                    `),
-			wantEnableGZIP:      false,
-			wantRespGZIPEnabled: true,
-			wantReqGZIPEnabled:  false,
-		},
-		{
-			desc: "Old config set and new config set",
-			config: []byte(`
-                    enable_gzip: true
-                    compression:
-                        response:
-                            enable_gzip: false
-                        request:
-                            enable_gzip: true
-                    `),
-			wantEnableGZIP:      true,
-			wantRespGZIPEnabled: false,
-			wantReqGZIPEnabled:  true,
-		},
-	}
-
-	for _, test := range testCases {
-		v := viper.New()
-		v.SetConfigType("yaml")
-		err := v.ReadConfig(bytes.NewBuffer(test.config))
-		assert.NoError(t, err)
-
-		migrateConfigCompression(v)
-
-		assert.Equal(t, test.wantEnableGZIP, v.GetBool("enable_gzip"), test.desc)
-		assert.Equal(t, test.wantReqGZIPEnabled, v.GetBool("compression.request.enable_gzip"), test.desc)
-		assert.Equal(t, test.wantRespGZIPEnabled, v.GetBool("compression.response.enable_gzip"), test.desc)
-	}
-}
-
 func TestIsConfigInfoPresent(t *testing.T) {
 	configPrefix1Field2Only := []byte(`
       prefix1:
@@ -3314,52 +1571,3 @@ func TestTCF2FeatureOneVendorException(t *testing.T) {
 		assert.Equal(t, tt.wantIsVendorException, value, tt.description)
 	}
 }
-
-func TestMigrateConfigEventsEnabled(t *testing.T) {
-	testCases := []struct {
-		name                  string
-		oldFieldValue         *bool
-		newFieldValue         *bool
-		expectedOldFieldValue *bool
-		expectedNewFieldValue *bool
-	}{
-		{
-			name:                  "Both old and new fields are nil",
-			oldFieldValue:         nil,
-			newFieldValue:         nil,
-			expectedOldFieldValue: nil,
-			expectedNewFieldValue: nil,
-		},
-		{
-			name:                  "Only old field is set",
-			oldFieldValue:         ptrutil.ToPtr(true),
-			newFieldValue:         nil,
-			expectedOldFieldValue: ptrutil.ToPtr(true),
-			expectedNewFieldValue: nil,
-		},
-		{
-			name:                  "Only new field is set",
-			oldFieldValue:         nil,
-			newFieldValue:         ptrutil.ToPtr(true),
-			expectedOldFieldValue: ptrutil.ToPtr(true),
-			expectedNewFieldValue: nil,
-		},
-		{
-			name:                  "Both old and new fields are set, override old field with new field value",
-			oldFieldValue:         ptrutil.ToPtr(false),
-			newFieldValue:         ptrutil.ToPtr(true),
-			expectedOldFieldValue: ptrutil.ToPtr(true),
-			expectedNewFieldValue: nil,
-		},
-	}
-
-	for _, tc := range testCases {
-		t.Run(tc.name, func(t *testing.T) {
-			updatedOldFieldValue, updatedNewFieldValue := migrateConfigEventsEnabled(tc.oldFieldValue, tc.newFieldValue)
-
-			assert.Equal(t, tc.expectedOldFieldValue, updatedOldFieldValue)
-			assert.Nil(t, updatedNewFieldValue)
-			assert.Nil(t, tc.expectedNewFieldValue)
-		})
-	}
-}
diff --git a/config/events_test.go b/config/events_test.go
index 4baa9066..b4c196e9 100644
--- a/config/events_test.go
+++ b/config/events_test.go
@@ -3,7 +3,6 @@ package config
 import (
 	"testing"
 
-	"github.com/prebid/prebid-server/util/ptrutil"
 	"github.com/stretchr/testify/assert"
 )
 
@@ -262,29 +261,22 @@ func TestValidate(t *testing.T) {
 		{
 			description: "Empty default URL",
 			events: Events{
-				Enabled: ptrutil.ToPtr(true),
+				Enabled: true,
 			},
 			expectErr: true,
 		},
 		{
 			description: "Events are disabled. Skips validations",
 			events: Events{
-				Enabled:    ptrutil.ToPtr(false),
+				Enabled:    false,
 				DefaultURL: "",
 			},
 			expectErr: false,
 		},
-		{
-			description: "Events are nil. Skip validations",
-			events: Events{
-				Enabled: nil,
-			},
-			expectErr: false,
-		},
 		{
 			description: "No VAST Events and default URL present",
 			events: Events{
-				Enabled:    ptrutil.ToPtr(true),
+				Enabled:    true,
 				DefaultURL: "http://prebid.org",
 			},
 			expectErr: false,
@@ -292,7 +284,7 @@ func TestValidate(t *testing.T) {
 		{
 			description: "Invalid VAST Event",
 			events: Events{
-				Enabled:    ptrutil.ToPtr(true),
+				Enabled:    true,
 				DefaultURL: "http://prebid.org",
 				VASTEvents: []VASTEvent{
 					{},
@@ -335,34 +327,3 @@ func TestValidateVASTEvents(t *testing.T) {
 		assert.Equal(t, !test.expectErr, err == nil, test.description)
 	}
 }
-
-func TestIsEnabled(t *testing.T) {
-	testCases := []struct {
-		name     string
-		events   Events
-		expected bool
-	}{
-		{
-			name:     "nil pointer",
-			events:   Events{},
-			expected: false,
-		},
-		{
-			name:     "event false",
-			events:   Events{Enabled: ptrutil.ToPtr(false)},
-			expected: false,
-		},
-		{
-			name:     "event true",
-			events:   Events{Enabled: ptrutil.ToPtr(true)},
-			expected: true,
-		},
-	}
-
-	for _, tc := range testCases {
-		t.Run(tc.name, func(t *testing.T) {
-			actual := tc.events.IsEnabled()
-			assert.Equal(t, tc.expected, actual)
-		})
-	}
-}
diff --git a/exchange/exchange_test.go b/exchange/exchange_test.go
index c4b85ebe..6e6e8afe 100644
--- a/exchange/exchange_test.go
+++ b/exchange/exchange_test.go
@@ -2359,7 +2359,7 @@ func runSpec(t *testing.T, filename string, spec *exchangeSpec) {
 		Account: config.Account{
 			ID: "testaccount",
 			Events: config.Events{
-				Enabled: &spec.EventsEnabled,
+				Enabled: spec.EventsEnabled,
 			},
 			DebugAllow:  true,
 			PriceFloors: config.AccountPriceFloors{Enabled: spec.AccountFloorsEnabled},
diff --git a/metrics/go_metrics_test.go b/metrics/go_metrics_test.go
index 515691fe..3564f9fa 100644
--- a/metrics/go_metrics_test.go
+++ b/metrics/go_metrics_test.go
@@ -1066,94 +1066,6 @@ func TestRecordModuleAccountMetrics(t *testing.T) {
 	}
 }
 
-func TestRecordAccountGDPRPurposeWarningMetrics(t *testing.T) {
-	testCases := []struct {
-		name                   string
-		givenPurposeName       string
-		expectedP1MetricCount  int64
-		expectedP2MetricCount  int64
-		expectedP3MetricCount  int64
-		expectedP4MetricCount  int64
-		expectedP5MetricCount  int64
-		expectedP6MetricCount  int64
-		expectedP7MetricCount  int64
-		expectedP8MetricCount  int64
-		expectedP9MetricCount  int64
-		expectedP10MetricCount int64
-	}{
-		{
-			name:                  "Purpose1MetricIncremented",
-			givenPurposeName:      "purpose1",
-			expectedP1MetricCount: 1,
-		},
-		{
-			name:                  "Purpose2MetricIncremented",
-			givenPurposeName:      "purpose2",
-			expectedP2MetricCount: 1,
-		},
-		{
-			name:                  "Purpose3MetricIncremented",
-			givenPurposeName:      "purpose3",
-			expectedP3MetricCount: 1,
-		},
-		{
-			name:                  "Purpose4MetricIncremented",
-			givenPurposeName:      "purpose4",
-			expectedP4MetricCount: 1,
-		},
-		{
-			name:                  "Purpose5MetricIncremented",
-			givenPurposeName:      "purpose5",
-			expectedP5MetricCount: 1,
-		},
-		{
-			name:                  "Purpose6MetricIncremented",
-			givenPurposeName:      "purpose6",
-			expectedP6MetricCount: 1,
-		},
-		{
-			name:                  "Purpose7MetricIncremented",
-			givenPurposeName:      "purpose7",
-			expectedP7MetricCount: 1,
-		},
-		{
-			name:                  "Purpose8MetricIncremented",
-			givenPurposeName:      "purpose8",
-			expectedP8MetricCount: 1,
-		},
-		{
-			name:                  "Purpose9MetricIncremented",
-			givenPurposeName:      "purpose9",
-			expectedP9MetricCount: 1,
-		},
-		{
-			name:                   "Purpose10MetricIncremented",
-			givenPurposeName:       "purpose10",
-			expectedP10MetricCount: 1,
-		},
-	}
-	for _, test := range testCases {
-		t.Run(test.name, func(t *testing.T) {
-			registry := metrics.NewRegistry()
-			m := NewMetrics(registry, []openrtb_ext.BidderName{openrtb_ext.BidderAppnexus}, config.DisabledMetrics{}, nil, nil)
-
-			m.RecordAccountGDPRPurposeWarning("acct-id", test.givenPurposeName)
-			am := m.getAccountMetrics("acct-id")
-
-			assert.Equal(t, test.expectedP1MetricCount, am.accountDeprecationWarningsPurpose1Meter.Count())
-			assert.Equal(t, test.expectedP2MetricCount, am.accountDeprecationWarningsPurpose2Meter.Count())
-			assert.Equal(t, test.expectedP3MetricCount, am.accountDeprecationWarningsPurpose3Meter.Count())
-			assert.Equal(t, test.expectedP4MetricCount, am.accountDeprecationWarningsPurpose4Meter.Count())
-			assert.Equal(t, test.expectedP5MetricCount, am.accountDeprecationWarningsPurpose5Meter.Count())
-			assert.Equal(t, test.expectedP6MetricCount, am.accountDeprecationWarningsPurpose6Meter.Count())
-			assert.Equal(t, test.expectedP7MetricCount, am.accountDeprecationWarningsPurpose7Meter.Count())
-			assert.Equal(t, test.expectedP8MetricCount, am.accountDeprecationWarningsPurpose8Meter.Count())
-			assert.Equal(t, test.expectedP9MetricCount, am.accountDeprecationWarningsPurpose9Meter.Count())
-			assert.Equal(t, test.expectedP10MetricCount, am.accountDeprecationWarningsPurpose10Meter.Count())
-		})
-	}
-}
-
 func TestRecordAccountGDPRChannelEnabledWarningMetrics(t *testing.T) {
 	testCases := []struct {
 		name                string
diff --git a/metrics/prometheus/prometheus_test.go b/metrics/prometheus/prometheus_test.go
index 32f7848c..90d331fe 100644
--- a/metrics/prometheus/prometheus_test.go
+++ b/metrics/prometheus/prometheus_test.go
@@ -1977,91 +1977,6 @@ func TestRecordModuleMetrics(t *testing.T) {
 	}
 }
 
-func TestRecordAccountGDPRPurposeWarningMetrics(t *testing.T) {
-	testCases := []struct {
-		name                   string
-		givenPurposeName       string
-		expectedP1MetricCount  float64
-		expectedP2MetricCount  float64
-		expectedP3MetricCount  float64
-		expectedP4MetricCount  float64
-		expectedP5MetricCount  float64
-		expectedP6MetricCount  float64
-		expectedP7MetricCount  float64
-		expectedP8MetricCount  float64
-		expectedP9MetricCount  float64
-		expectedP10MetricCount float64
-	}{
-		{
-			name:                  "Purpose1MetricIncremented",
-			givenPurposeName:      "purpose1",
-			expectedP1MetricCount: 1,
-		},
-		{
-			name:                  "Purpose2MetricIncremented",
-			givenPurposeName:      "purpose2",
-			expectedP2MetricCount: 1,
-		},
-		{
-			name:                  "Purpose3MetricIncremented",
-			givenPurposeName:      "purpose3",
-			expectedP3MetricCount: 1,
-		},
-		{
-			name:                  "Purpose4MetricIncremented",
-			givenPurposeName:      "purpose4",
-			expectedP4MetricCount: 1,
-		},
-		{
-			name:                  "Purpose5MetricIncremented",
-			givenPurposeName:      "purpose5",
-			expectedP5MetricCount: 1,
-		},
-		{
-			name:                  "Purpose6MetricIncremented",
-			givenPurposeName:      "purpose6",
-			expectedP6MetricCount: 1,
-		},
-		{
-			name:                  "Purpose7MetricIncremented",
-			givenPurposeName:      "purpose7",
-			expectedP7MetricCount: 1,
-		},
-		{
-			name:                  "Purpose8MetricIncremented",
-			givenPurposeName:      "purpose8",
-			expectedP8MetricCount: 1,
-		},
-		{
-			name:                  "Purpose9MetricIncremented",
-			givenPurposeName:      "purpose9",
-			expectedP9MetricCount: 1,
-		},
-		{
-			name:                   "Purpose10MetricIncremented",
-			givenPurposeName:       "purpose10",
-			expectedP10MetricCount: 1,
-		},
-	}
-	for _, test := range testCases {
-		t.Run(test.name, func(t *testing.T) {
-			m := createMetricsForTesting()
-			m.RecordAccountGDPRPurposeWarning("acct-id", test.givenPurposeName)
-
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose1, test.expectedP1MetricCount)
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose2, test.expectedP2MetricCount)
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose3, test.expectedP3MetricCount)
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose4, test.expectedP4MetricCount)
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose5, test.expectedP5MetricCount)
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose6, test.expectedP6MetricCount)
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose7, test.expectedP7MetricCount)
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose8, test.expectedP8MetricCount)
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose9, test.expectedP9MetricCount)
-			assertCounterValue(t, "", "Account Deprecation Warnings", m.accountDeprecationWarningsPurpose10, test.expectedP10MetricCount)
-		})
-	}
-}
-
 func TestRecordAccountGDPRChannelEnabledWarningMetrics(t *testing.T) {
 	testCases := []struct {
 		name                string
diff --git a/server/server_test.go b/server/server_test.go
index 23b45656..7af892d3 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -192,7 +192,6 @@ func TestListen(t *testing.T) {
 			Port:             8000,
 			UnixSocketEnable: false,
 			UnixSocketName:   "prebid_socket",
-			EnableGzip:       false,
 		}
 	)