Repository: prebid/prebid-server
Pull request #2133 (2022-01-13 06:40:13)

New Adapter: Medianet
Adds Media.Net Bidder Adapter.
Vendor ID: 142
Maintainer Email: prebid-support@media.net


Patch:
diff --git a/account/account.go b/account/account.go
index 25a504ca..1b2cf158 100644
--- a/account/account.go
+++ b/account/account.go
@@ -5,7 +5,7 @@ import (
 	"encoding/json"
 	"fmt"
 
-	jsonpatch "github.com/evanphx/json-patch"
+	jsonpatch "github.com/evanphx/json-patch/v5"
 	"github.com/prebid/prebid-server/config"
 	"github.com/prebid/prebid-server/errortypes"
 	"github.com/prebid/prebid-server/metrics"
diff --git a/adapters/medianet/medianet.go b/adapters/medianet/medianet.go
new file mode 100644
index 00000000..091cca2f
--- /dev/null
+++ b/adapters/medianet/medianet.go
@@ -0,0 +1,121 @@
+package medianet
+
+import (
+	"encoding/json"
+	"fmt"
+	"net/http"
+	"net/url"
+
+	"github.com/mxmCherry/openrtb/v15/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"
+)
+
+type adapter struct {
+	endpoint string
+}
+
+func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
+	var errs []error
+
+	reqJson, err := json.Marshal(request)
+	if err != nil {
+		errs = append(errs, err)
+		return nil, errs
+	}
+
+	headers := http.Header{}
+	headers.Add("Content-Type", "application/json;charset=utf-8")
+
+	return []*adapters.RequestData{{
+		Method:  "POST",
+		Uri:     a.endpoint,
+		Body:    reqJson,
+		Headers: headers,
+	}}, errs
+}
+
+func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) {
+	var errs []error
+
+	if response.StatusCode == http.StatusNoContent {
+		return nil, nil
+	}
+
+	if response.StatusCode == http.StatusBadRequest {
+		return nil, []error{&errortypes.BadInput{
+			Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info", response.StatusCode),
+		}}
+	}
+
+	if response.StatusCode != http.StatusOK {
+		return nil, []error{&errortypes.BadServerResponse{
+			Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info", response.StatusCode),
+		}}
+	}
+
+	var bidResp openrtb2.BidResponse
+
+	if err := json.Unmarshal(response.Body, &bidResp); err != nil {
+		return nil, []error{err}
+	}
+
+	bidResponse := adapters.NewBidderResponse()
+
+	for _, sb := range bidResp.SeatBid {
+		for i := range sb.Bid {
+			bidType, err := getMediaTypeForImp(sb.Bid[i].ImpID, internalRequest.Imp)
+			if err != nil {
+				errs = append(errs, err)
+			} else {
+				b := &adapters.TypedBid{
+					Bid:     &sb.Bid[i],
+					BidType: bidType,
+				}
+				bidResponse.Bids = append(bidResponse.Bids, b)
+			}
+		}
+	}
+	return bidResponse, errs
+}
+
+// Builder builds a new instance of the Medianet adapter for the given bidder with the given config.
+func Builder(bidderName openrtb_ext.BidderName, config config.Adapter) (adapters.Bidder, error) {
+	url := buildEndpoint(config.Endpoint, config.ExtraAdapterInfo)
+	return &adapter{
+		endpoint: url,
+	}, nil
+}
+
+func getMediaTypeForImp(impID string, imps []openrtb2.Imp) (openrtb_ext.BidType, error) {
+	mediaType := openrtb_ext.BidTypeBanner
+	for _, imp := range imps {
+		if imp.ID == impID {
+			if imp.Banner == nil && imp.Video != nil {
+				mediaType = openrtb_ext.BidTypeVideo
+			}
+			return mediaType, nil
+		}
+	}
+
+	return "", &errortypes.BadInput{
+		Message: fmt.Sprintf("Failed to find impression \"%s\" ", impID),
+	}
+}
+
+func buildEndpoint(mnetUrl, hostUrl string) string {
+
+	if len(hostUrl) == 0 {
+		return mnetUrl
+	}
+	urlObject, err := url.Parse(mnetUrl)
+	if err != nil {
+		return mnetUrl
+	}
+	values := urlObject.Query()
+	values.Add("src", hostUrl)
+	urlObject.RawQuery = values.Encode()
+	return urlObject.String()
+}
diff --git a/adapters/richaudience/richaudience.go b/adapters/richaudience/richaudience.go
index 333df564..d2fa68c3 100644
--- a/adapters/richaudience/richaudience.go
+++ b/adapters/richaudience/richaudience.go
@@ -26,36 +26,86 @@ func Builder(bidderName openrtb_ext.BidderName, config config.Adapter) (adapters
 }
 
 func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
-	raiHeaders := http.Header{}
+	var requestDataRequest []*adapters.RequestData
+
+	errs := make([]error, 0, len(request.Imp))
 
+	raiHeaders := http.Header{}
 	setHeaders(&raiHeaders)
 
 	isUrlSecure := getIsUrlSecure(request)
 
-	resImps, err := setImp(request, isUrlSecure)
-	if err != nil {
-		return nil, []error{err}
+	if err := validateDevice(request); err != nil {
+		errs = append(errs, &errortypes.BadInput{
+			Message: err.Error(),
+		})
+		return nil, errs
 	}
 
-	request.Imp = resImps
+	for _, imp := range request.Imp {
+		var secure = int8(0)
 
-	if err = validateDevice(request); err != nil {
-		return nil, []error{err}
-	}
+		raiExt, err := parseImpExt(&imp)
+		if err != nil {
+			errs = append(errs, &errortypes.BadInput{
+				Message: err.Error(),
+			})
+			return nil, errs
+		}
 
-	req, err := json.Marshal(request)
-	if err != nil {
-		return nil, []error{err}
-	}
+		if raiExt != nil {
+			if raiExt.Pid != "" {
+				imp.TagID = raiExt.Pid
+			}
+
+			if raiExt.Test {
+				request.Device.IP = "11.222.33.44"
+				request.Test = int8(1)
+			}
+
+			if raiExt.BidFloorCur != "" {
+				imp.BidFloorCur = raiExt.BidFloorCur
+			} else if imp.BidFloorCur == "" {
+				imp.BidFloorCur = "USD"
+			}
+		}
+		if isUrlSecure {
+			secure = int8(1)
+		}
+
+		imp.Secure = &secure
+
+		if imp.Banner != nil {
+			if imp.Banner.W == nil && imp.Banner.H == nil {
+				if len(imp.Banner.Format) == 0 {
+					errs = append(errs, &errortypes.BadInput{
+						Message: "request.Banner.Format is required",
+					})
+					return nil, errs
+				}
+			}
+		}
+
+		request.Imp = []openrtb2.Imp{imp}
+
+		req, err := json.Marshal(request)
+		if err != nil {
+			errs = append(errs, &errortypes.BadInput{
+				Message: err.Error(),
+			})
+			return nil, errs
+		}
+
+		requestDataRequest = append(requestDataRequest, &adapters.RequestData{
+			Method:  "POST",
+			Uri:     a.endpoint,
+			Body:    req,
+			Headers: raiHeaders,
+		})
 
-	requestData := &adapters.RequestData{
-		Method:  "POST",
-		Uri:     a.endpoint,
-		Body:    req,
-		Headers: raiHeaders,
 	}
 
-	return []*adapters.RequestData{requestData}, nil
+	return requestDataRequest, nil
 }
 
 func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) {
@@ -96,7 +146,7 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R
 		for i := range seatBid.Bid {
 			b := &adapters.TypedBid{
 				Bid:     &seatBid.Bid[i],
-				BidType: openrtb_ext.BidTypeBanner,
+				BidType: getMediaType(seatBid.Bid[i].ImpID, request.Imp),
 			}
 			bidResponse.Bids = append(bidResponse.Bids, b)
 		}
@@ -111,50 +161,6 @@ func setHeaders(raiHeaders *http.Header) {
 	raiHeaders.Add("X-Openrtb-Version", "2.5")
 }
 
-func setImp(request *openrtb2.BidRequest, isUrlSecure bool) (resImps []openrtb2.Imp, err error) {
-	for _, imp := range request.Imp {
-		var secure = int8(0)
-		raiExt, errImp := parseImpExt(&imp)
-		if errImp != nil {
-			return nil, errImp
-		}
-
-		if raiExt != nil {
-			if raiExt.Pid != "" {
-				imp.TagID = raiExt.Pid
-			}
-
-			if raiExt.Test {
-				request.Test = int8(1)
-			}
-
-			if raiExt.BidFloorCur != "" {
-				imp.BidFloorCur = raiExt.BidFloorCur
-			} else if imp.BidFloorCur == "" {
-				imp.BidFloorCur = "USD"
-			}
-		}
-		if isUrlSecure {
-			secure = int8(1)
-		}
-
-		imp.Secure = &secure
-
-		if imp.Banner.W == nil && imp.Banner.H == nil {
-			if len(imp.Banner.Format) == 0 {
-				err = &errortypes.BadInput{
-					Message: "request.Banner.Format is required",
-				}
-				return nil, err
-			}
-		}
-
-		resImps = append(resImps, imp)
-
-	}
-	return resImps, nil
-}
-
 func getIsUrlSecure(request *openrtb2.BidRequest) (isUrlSecure bool) {
 	if request.Site != nil {
 		if request.Site.Page != "" {
@@ -171,7 +177,6 @@ func getIsUrlSecure(request *openrtb2.BidRequest) (isUrlSecure bool) {
 }
 
 func validateDevice(request *openrtb2.BidRequest) (err error) {
-
 	if request.Device != nil && request.Device.IP == "" && request.Device.IPv6 == "" {
 		err = &errortypes.BadInput{
 			Message: "request.Device.IP is required",
@@ -200,3 +205,15 @@ func parseImpExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpRichaudience, error) {
 
 	return &richaudienceExt, nil
 }
+
+func getMediaType(impId string, imps []openrtb2.Imp) openrtb_ext.BidType {
+	for _, imp := range imps {
+		if imp.ID == impId {
+			if imp.Video != nil {
+				return openrtb_ext.BidTypeVideo
+			}
+			return openrtb_ext.BidTypeBanner
+		}
+	}
+	return openrtb_ext.BidTypeBanner
+}
diff --git a/adapters/rubicon/rubicon.go b/adapters/rubicon/rubicon.go
index 89e4f31d..14cc5704 100644
--- a/adapters/rubicon/rubicon.go
+++ b/adapters/rubicon/rubicon.go
@@ -268,6 +268,7 @@ type rubiconUserExtEidExt struct {
 // defines the contract for bidrequest.user.ext.eids[i].uids[j].ext
 type rubiconUserExtEidUidExt struct {
 	RtiPartner string `json:"rtiPartner,omitempty"`
+	Stype      string `json:"stype"`
 }
 
 type mappedRubiconUidsParam struct {
@@ -458,6 +459,7 @@ func (a *RubiconAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ada
 			}
 
 			userExtRP := rubiconUserExt{RP: rubiconUserExtRP{Target: target}}
+			userBuyerUID := userCopy.BuyerUID
 
 			if request.User.Ext != nil {
 				var userExt *openrtb_ext.ExtUser
@@ -472,6 +474,10 @@ func (a *RubiconAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ada
 
 				// set user.ext.tpid
 				if len(userExt.Eids) > 0 {
+					if userBuyerUID == "" {
+						userBuyerUID = extractUserBuyerUID(userExt.Eids)
+					}
+
 					mappedRubiconUidsParam, errors := getTpIdsAndSegments(userExt.Eids)
 					if len(errors) > 0 {
 						errs = append(errs, errors...)
@@ -495,6 +501,7 @@ func (a *RubiconAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ada
 			userCopy.Geo = nil
 			userCopy.Yob = 0
 			userCopy.Gender = ""
+			userCopy.BuyerUID = userBuyerUID
 
 			rubiconRequest.User = &userCopy
 		}
@@ -891,6 +898,28 @@ func contains(s []int, e int) bool {
 	return false
 }
 
+func extractUserBuyerUID(eids []openrtb_ext.ExtUserEid) string {
+	for _, eid := range eids {
+		if eid.Source != "rubiconproject.com" {
+			continue
+		}
+
+		for _, uid := range eid.Uids {
+			var uidExt rubiconUserExtEidUidExt
+			err := json.Unmarshal(uid.Ext, &uidExt)
+			if err != nil {
+				continue
+			}
+
+			if uidExt.Stype == "ppuid" || uidExt.Stype == "other" {
+				return uid.ID
+			}
+		}
+	}
+
+	return ""
+}
+
 func getTpIdsAndSegments(eids []openrtb_ext.ExtUserEid) (mappedRubiconUidsParam, []error) {
 	rubiconUidsParam := mappedRubiconUidsParam{
 		tpIds:    make([]rubiconExtUserTpID, 0),
diff --git a/adapters/tappx/tappx.go b/adapters/tappx/tappx.go
index 4e519c2b..0f80e5ab 100644
--- a/adapters/tappx/tappx.go
+++ b/adapters/tappx/tappx.go
@@ -5,8 +5,8 @@ import (
 	"fmt"
 	"net/http"
 	"net/url"
+	"regexp"
 	"strconv"
-	"strings"
 	"text/template"
 	"time"
 
@@ -18,7 +18,7 @@ import (
 	"github.com/prebid/prebid-server/openrtb_ext"
 )
 
-const TAPPX_BIDDER_VERSION = "1.3"
+const TAPPX_BIDDER_VERSION = "1.4"
 const TYPE_CNN = "prebid"
 
 type TappxAdapter struct {
@@ -119,12 +119,6 @@ func (a *TappxAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapt
 // Builds enpoint url based on adapter-specific pub settings from imp.ext
 func (a *TappxAdapter) buildEndpointURL(params *openrtb_ext.ExtImpTappx, test int) (string, error) {
 
-	if params.Host == "" {
-		return "", &errortypes.BadInput{
-			Message: "Tappx host undefined",
-		}
-	}
-
 	if params.Endpoint == "" {
 		return "", &errortypes.BadInput{
 			Message: "Tappx endpoint undefined",
@@ -137,7 +131,15 @@ func (a *TappxAdapter) buildEndpointURL(params *openrtb_ext.ExtImpTappx, test in
 		}
 	}
 
-	endpointParams := macros.EndpointTemplateParams{Host: params.Host}
+	tappxHost := "tappx.com"
+	isNewEndpoint, err := regexp.Match(`^(zz|vz)[0-9]{3,}([a-z]{2}|test)$`, []byte(params.Endpoint))
+	if isNewEndpoint {
+		tappxHost = params.Endpoint + ".pub." + tappxHost + "/rtb/"
+	} else {
+		tappxHost = "ssp.api." + tappxHost + "/rtb/v2/"
+	}
+
+	endpointParams := macros.EndpointTemplateParams{Host: tappxHost}
 	host, err := macros.ResolveMacros(a.endpointTemplate, endpointParams)
 
 	if err != nil {
@@ -147,15 +149,14 @@ func (a *TappxAdapter) buildEndpointURL(params *openrtb_ext.ExtImpTappx, test in
 	}
 
 	thisURI, err := url.Parse(host)
-
 	if err != nil {
 		return "", &errortypes.BadInput{
 			Message: "Malformed URL: " + err.Error(),
 		}
 	}
 
-	if !(strings.Contains(strings.ToLower(thisURI.Host), strings.ToLower(params.Endpoint))) {
-		thisURI.Path += params.Endpoint //Now version is backward compatible. In future, this condition and content will be delete
+	if !isNewEndpoint {
+		thisURI.Path += params.Endpoint
 	}
 
 	queryParams := url.Values{}
diff --git a/config/config.go b/config/config.go
index e7a9effa..416bc913 100644
--- a/config/config.go
+++ b/config/config.go
@@ -892,6 +892,8 @@ func SetupViper(v *viper.Viper, filename string) {
 	v.SetDefault("adapters.madvertise.endpoint", "https://mobile.mng-ads.com/bidrequest{{.ZoneID}}")
 	v.SetDefault("adapters.marsmedia.endpoint", "https://bid306.rtbsrv.com/bidder/?bid=f3xtet")
 	v.SetDefault("adapters.mediafuse.endpoint", "http://ghb.hbmp.mediafuse.com/pbs/ortb")
+	v.SetDefault("adapters.medianet.endpoint", "https://prebid-adapter.media.net/rtb/pb/prebids2s")
+	v.SetDefault("adapters.medianet.extra_info", "https://medianet.golang.pbs.com")
 	v.SetDefault("adapters.mgid.endpoint", "https://prebid.mgid.com/prebid/")
 	v.SetDefault("adapters.mobilefuse.endpoint", "http://mfx.mobilefuse.com/openrtb?pub_id={{.PublisherID}}")
 	v.SetDefault("adapters.mobfoxpb.endpoint", "http://bes.mobfox.com/?c=__route__&m=__method__&key=__key__")
diff --git a/endpoints/openrtb2/auction.go b/endpoints/openrtb2/auction.go
index 3f0a35e8..9e6bacf9 100644
--- a/endpoints/openrtb2/auction.go
+++ b/endpoints/openrtb2/auction.go
@@ -17,7 +17,7 @@ import (
 	"github.com/prebid/prebid-server/version"
 
 	"github.com/buger/jsonparser"
-	jsonpatch "github.com/evanphx/json-patch"
+	jsonpatch "github.com/evanphx/json-patch/v5"
 	"github.com/gofrs/uuid"
 	"github.com/golang/glog"
 	"github.com/julienschmidt/httprouter"
@@ -514,6 +514,10 @@ func (deps *endpointDeps) validateRequest(req *openrtb_ext.RequestWrapper, isAmp
 			return []error{err}
 		}
 
+		if err := deps.validateAliasesGVLIDs(reqPrebid.AliasGVLIDs, aliases); err != nil {
+			return []error{err}
+		}
+
 		if err := deps.validateBidAdjustmentFactors(reqPrebid.BidAdjustmentFactors, aliases); err != nil {
 			return []error{err}
 		}
@@ -1267,6 +1271,20 @@ func (deps *endpointDeps) validateAliases(aliases map[string]string) error {
 	return nil
 }
 
+func (deps *endpointDeps) validateAliasesGVLIDs(aliasesGVLIDs map[string]uint16, aliases map[string]string) error {
+	for alias, vendorId := range aliasesGVLIDs {
+
+		if _, aliasExist := aliases[alias]; !aliasExist {
+			return fmt.Errorf("request.ext.prebid.aliasgvlids. vendorId %d refers to unknown bidder alias: %s", vendorId, alias)
+		}
+
+		if vendorId < 1 {
+			return fmt.Errorf("request.ext.prebid.aliasgvlids. Invalid vendorId %d for alias: %s. Choose a different vendorId, or remove this entry.", vendorId, alias)
+		}
+	}
+	return nil
+}
+
 func (deps *endpointDeps) validateSite(req *openrtb_ext.RequestWrapper) error {
 	if req.Site == nil {
 		return nil
diff --git a/endpoints/openrtb2/video_auction.go b/endpoints/openrtb2/video_auction.go
index 1f16f92a..15fe118c 100644
--- a/endpoints/openrtb2/video_auction.go
+++ b/endpoints/openrtb2/video_auction.go
@@ -5,7 +5,6 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
-	"github.com/prebid/prebid-server/stored_requests/backends/empty_fetcher"
 	"io"
 	"io/ioutil"
 	"net/http"
@@ -16,25 +15,26 @@ import (
 	"time"
 
 	"github.com/buger/jsonparser"
-	jsonpatch "github.com/evanphx/json-patch"
+	jsonpatch "github.com/evanphx/json-patch/v5"
 	"github.com/gofrs/uuid"
-	"github.com/mxmCherry/openrtb/v15/openrtb2"
-	"github.com/prebid/prebid-server/errortypes"
-	"github.com/prebid/prebid-server/util/iputil"
-	"github.com/prebid/prebid-server/util/uuidutil"
-	"github.com/prebid/prebid-server/version"
-
 	"github.com/golang/glog"
 	"github.com/julienschmidt/httprouter"
+	"github.com/mxmCherry/openrtb/v15/openrtb2"
+
 	accountService "github.com/prebid/prebid-server/account"
 	"github.com/prebid/prebid-server/analytics"
 	"github.com/prebid/prebid-server/config"
+	"github.com/prebid/prebid-server/errortypes"
 	"github.com/prebid/prebid-server/exchange"
 	"github.com/prebid/prebid-server/metrics"
 	"github.com/prebid/prebid-server/openrtb_ext"
 	"github.com/prebid/prebid-server/prebid_cache_client"
 	"github.com/prebid/prebid-server/stored_requests"
+	"github.com/prebid/prebid-server/stored_requests/backends/empty_fetcher"
 	"github.com/prebid/prebid-server/usersync"
+	"github.com/prebid/prebid-server/util/iputil"
+	"github.com/prebid/prebid-server/util/uuidutil"
+	"github.com/prebid/prebid-server/version"
 )
 
 var defaultRequestTimeout int64 = 5000
diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go
index 850b41ab..3aad7e77 100755
--- a/exchange/adapter_builders.go
+++ b/exchange/adapter_builders.go
@@ -81,6 +81,7 @@ import (
 	"github.com/prebid/prebid-server/adapters/lunamedia"
 	"github.com/prebid/prebid-server/adapters/madvertise"
 	"github.com/prebid/prebid-server/adapters/marsmedia"
+	"github.com/prebid/prebid-server/adapters/medianet"
 	"github.com/prebid/prebid-server/adapters/mgid"
 	"github.com/prebid/prebid-server/adapters/mobfoxpb"
 	"github.com/prebid/prebid-server/adapters/mobilefuse"
@@ -224,6 +225,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
 		openrtb_ext.BidderMadvertise:        madvertise.Builder,
 		openrtb_ext.BidderMarsmedia:         marsmedia.Builder,
 		openrtb_ext.BidderMediafuse:         adtelligent.Builder,
+		openrtb_ext.BidderMedianet:          medianet.Builder,
 		openrtb_ext.BidderMgid:              mgid.Builder,
 		openrtb_ext.BidderMobfoxpb:          mobfoxpb.Builder,
 		openrtb_ext.BidderMobileFuse:        mobilefuse.Builder,
diff --git a/exchange/events.go b/exchange/events.go
index bedafddf..c765bff6 100644
--- a/exchange/events.go
+++ b/exchange/events.go
@@ -4,7 +4,7 @@ import (
 	"encoding/json"
 	"time"
 
-	"github.com/evanphx/json-patch"
+	jsonpatch "github.com/evanphx/json-patch/v5"
 	"github.com/prebid/prebid-server/analytics"
 	"github.com/prebid/prebid-server/config"
 	"github.com/prebid/prebid-server/endpoints/events"
diff --git a/exchange/utils.go b/exchange/utils.go
index 44737af3..3a4a1eaf 100644
--- a/exchange/utils.go
+++ b/exchange/utils.go
@@ -57,6 +57,11 @@ func cleanOpenRTBRequests(ctx context.Context,
 		return
 	}
 
+	aliasesGVLIDs, errs := parseAliasesGVLIDs(req.BidRequest)
+	if len(errs) > 0 {
+		return
+	}
+
 	var allBidderRequests []BidderRequest
 	allBidderRequests, errs = getAuctionBidderRequests(req, requestExt, bidderToSyncerKey, impsByBidder, aliases)
 
@@ -123,7 +128,7 @@ func cleanOpenRTBRequests(ctx context.Context,
 				}
 			}
 			var publisherID = req.LegacyLabels.PubID
-			bidReq, geo, id, err := gDPR.AuctionActivitiesAllowed(ctx, bidderRequest.BidderCoreName, publisherID, gdprSignal, consent, weakVendorEnforcement)
+			bidReq, geo, id, err := gDPR.AuctionActivitiesAllowed(ctx, bidderRequest.BidderCoreName, bidderRequest.BidderName, publisherID, gdprSignal, consent, weakVendorEnforcement, aliasesGVLIDs)
 			bidRequestAllowed = bidReq
 
 			if err == nil {
@@ -593,6 +598,19 @@ func parseAliases(orig *openrtb2.BidRequest) (map[string]string, []error) {
 	return aliases, nil
 }
 
+// parseAliasesGVLIDs parses the Bidder Alias GVLIDs from the BidRequest
+func parseAliasesGVLIDs(orig *openrtb2.BidRequest) (map[string]uint16, []error) {
+	var aliasesGVLIDs map[string]uint16
+	if value, dataType, _, err := jsonparser.Get(orig.Ext, openrtb_ext.PrebidExtKey, "aliasgvlids"); dataType == jsonparser.Object && err == nil {
+		if err := json.Unmarshal(value, &aliasesGVLIDs); err != nil {
+			return nil, []error{err}
+		}
+	} else if dataType != jsonparser.NotExist && err != jsonparser.KeyPathNotFoundError {
+		return nil, []error{err}
+	}
+	return aliasesGVLIDs, nil
+}
+
 func GetValidBidders(aliases map[string]string) map[string]struct{} {
 	validBidders := openrtb_ext.BuildBidderNameHashSet()
 
diff --git a/firstpartydata/first_party_data.go b/firstpartydata/first_party_data.go
index dc5b6f31..89498d06 100644
--- a/firstpartydata/first_party_data.go
+++ b/firstpartydata/first_party_data.go
@@ -3,7 +3,8 @@ package firstpartydata
 import (
 	"encoding/json"
 	"fmt"
-	"github.com/evanphx/json-patch"
+
+	jsonpatch "github.com/evanphx/json-patch/v5"
 	"github.com/mxmCherry/openrtb/v15/openrtb2"
 	"github.com/prebid/prebid-server/errortypes"
 	"github.com/prebid/prebid-server/openrtb_ext"
diff --git a/gdpr/gdpr.go b/gdpr/gdpr.go
index 46f4934d..0e203d88 100644
--- a/gdpr/gdpr.go
+++ b/gdpr/gdpr.go
@@ -24,7 +24,7 @@ type Permissions interface {
 	// Determines whether or not to send PI information to a bidder, or mask it out.
 	//
 	// If the consent string was nonsensical, the returned error will be an ErrorMalformedConsent.
-	AuctionActivitiesAllowed(ctx context.Context, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal Signal, consent string, weakVendorEnforcement bool) (allowBidReq bool, passGeo bool, passID bool, err error)
+	AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal Signal, consent string, weakVendorEnforcement bool, aliasGVLIDs map[string]uint16) (allowBidReq bool, passGeo bool, passID bool, err error)
 }
 
 // Versions of the GDPR TCF technical specification.
diff --git a/gdpr/impl.go b/gdpr/impl.go
index c85c9d28..c580c380 100644
--- a/gdpr/impl.go
+++ b/gdpr/impl.go
@@ -49,12 +49,7 @@ func (p *permissionsImpl) BidderSyncAllowed(ctx context.Context, bidder openrtb_
 	return false, nil
 }
 
-func (p *permissionsImpl) AuctionActivitiesAllowed(ctx context.Context,
-	bidder openrtb_ext.BidderName,
-	PublisherID string,
-	gdprSignal Signal,
-	consent string,
-	weakVendorEnforcement bool) (allowBidRequest bool, passGeo bool, passID bool, err error) {
+func (p *permissionsImpl) AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal Signal, consent string, weakVendorEnforcement bool, aliasGVLIDs map[string]uint16) (allowBidReq bool, passGeo bool, passID bool, err error) {
 	if _, ok := p.cfg.NonStandardPublisherMap[PublisherID]; ok {
 		return true, true, true, nil
 	}
@@ -69,10 +64,10 @@ func (p *permissionsImpl) AuctionActivitiesAllowed(ctx context.Context,
 		return false, false, false, nil
 	}
 
-	if id, ok := p.vendorIDs[bidder]; ok {
-		return p.allowActivities(ctx, id, bidder, consent, weakVendorEnforcement)
+	if id, ok := p.resolveVendorId(bidderCoreName, bidder, aliasGVLIDs); ok {
+		return p.allowActivities(ctx, id, bidderCoreName, consent, weakVendorEnforcement)
 	} else if weakVendorEnforcement {
-		return p.allowActivities(ctx, 0, bidder, consent, weakVendorEnforcement)
+		return p.allowActivities(ctx, 0, bidderCoreName, consent, weakVendorEnforcement)
 	}
 
 	return p.defaultVendorPermissions()
@@ -82,6 +77,16 @@ func (p *permissionsImpl) defaultVendorPermissions() (allowBidRequest bool, pass
 	return false, false, false, nil
 }
 
+func (p *permissionsImpl) resolveVendorId(bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName, aliasGVLIDs map[string]uint16) (id uint16, ok bool) {
+	if id, ok = aliasGVLIDs[string(bidder)]; ok {
+		return id, ok
+	}
+
+	id, ok = p.vendorIDs[bidderCoreName]
+
+	return id, ok
+}
+
 func (p *permissionsImpl) allowSync(ctx context.Context, vendorID uint16, consent string, vendorException bool) (bool, error) {
 	if consent == "" {
 		return false, nil
@@ -276,7 +281,7 @@ func (a AlwaysAllow) BidderSyncAllowed(ctx context.Context, bidder openrtb_ext.B
 	return true, nil
 }
 
-func (a AlwaysAllow) AuctionActivitiesAllowed(ctx context.Context, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal Signal, consent string, weakVendorEnforcement bool) (allowBidRequest bool, passGeo bool, passID bool, err error) {
+func (a AlwaysAllow) AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal Signal, consent string, weakVendorEnforcement bool, aliasGVLIDs map[string]uint16) (allowBidReq bool, passGeo bool, passID bool, err error) {
 	return true, true, true, nil
 }
 
diff --git a/go.mod b/go.mod
index 589f4f3c..8fd571c7 100644
--- a/go.mod
+++ b/go.mod
@@ -3,29 +3,28 @@ module github.com/prebid/prebid-server
 go 1.16
 
 require (
-	github.com/DATA-DOG/go-sqlmock v1.3.0
+	github.com/DATA-DOG/go-sqlmock v1.5.0
 	github.com/NYTimes/gziphandler v1.1.1
 	github.com/OneOfOne/xxhash v1.2.5 // indirect
-	github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf
+	github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
 	github.com/buger/jsonparser v1.1.1
-	github.com/cespare/xxhash v1.0.0 // indirect
 	github.com/chasex/glog v0.0.0-20160217080310-c62392af379c
-	github.com/coocood/freecache v1.0.1
+	github.com/coocood/freecache v1.2.0
 	github.com/docker/go-units v0.4.0
-	github.com/evanphx/json-patch v0.0.0-20180720181644-f195058310bd
-	github.com/gofrs/uuid v3.2.0+incompatible
-	github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
+	github.com/evanphx/json-patch/v5 v5.6.0
+	github.com/gofrs/uuid v4.2.0+incompatible
+	github.com/golang/glog v1.0.0
 	github.com/influxdata/influxdb v1.6.1
 	github.com/julienschmidt/httprouter v1.3.0
 	github.com/lib/pq v1.0.0
 	github.com/mattn/go-colorable v0.1.2 // indirect
 	github.com/mitchellh/copystructure v1.1.2
-	github.com/mxmCherry/openrtb/v15 v15.0.0
+	github.com/mxmCherry/openrtb/v15 v15.0.1
 	github.com/prebid/go-gdpr v1.11.0
 	github.com/prometheus/client_golang v1.11.0
 	github.com/prometheus/client_model v0.2.0
 	github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165
-	github.com/rs/cors v1.5.0
+	github.com/rs/cors v1.8.2
 	github.com/sergi/go-diff v1.0.0 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
 	github.com/spf13/viper v1.8.1
diff --git a/go.sum b/go.sum
index 0bbfb4e9..d5e0ab9b 100644
--- a/go.sum
+++ b/go.sum
@@ -39,10 +39,11 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/DATA-DOG/go-sqlmock v1.3.0 h1:ljjRxlddjfChBJdFKJs5LuCwCWPLaC1UZLwAo3PBBMk=
-github.com/DATA-DOG/go-sqlmock v1.3.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
+github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
+github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
 github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
 github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
+github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
 github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI=
 github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
 github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
@@ -54,8 +55,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
 github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
-github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzsP1G42dRafH3vf+al2vQIJU0YHX+1Tw87oco=
-github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
+github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ=
+github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
 github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
 github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -65,8 +66,8 @@ github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqO
 github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
 github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash v1.0.0 h1:naDmySfoNg0nKS62/ujM6e71ZgM2AoVdaqGwMG0w18A=
-github.com/cespare/xxhash v1.0.0/go.mod h1:fX/lfQBkSCDXZSUgv6jVIu/EVA3/JNseAX5asI4c4T4=
+github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
+github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
 github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
 github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
 github.com/chasex/glog v0.0.0-20160217080310-c62392af379c h1:eXqCBUHfmjbeDqcuvzjsd+bM6A+bnwo5N9FVbV6m5/s=
@@ -78,8 +79,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
 github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
 github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
 github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/coocood/freecache v1.0.1 h1:oFyo4msX2c0QIKU+kuMJUwsKamJ+AKc2JJrKcMszJ5M=
-github.com/coocood/freecache v1.0.1/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI=
+github.com/coocood/freecache v1.2.0 h1:p8RhjN6Y4DRBIMzdRlm1y+M7h7YJxye3lGW8/VvzCz0=
+github.com/coocood/freecache v1.2.0/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY=
 github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -94,8 +95,8 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
 github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
 github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/evanphx/json-patch v0.0.0-20180720181644-f195058310bd h1:biTJQdqouE5by89AAffXG8++TY+9Fsdrg5rinbt3tHk=
-github.com/evanphx/json-patch v0.0.0-20180720181644-f195058310bd/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
+github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
 github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
@@ -113,12 +114,13 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
-github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
-github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
+github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=
+github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
+github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
 github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
 github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
 github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -210,6 +212,7 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
 github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
 github.com/influxdata/influxdb v1.6.1 h1:OseoBlzI5ftNI/bczyxSWq6PKRCNEeiXvyWP/wS5fB0=
 github.com/influxdata/influxdb v1.6.1/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY=
+github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
 github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
 github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
 github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
@@ -264,8 +267,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
 github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/mxmCherry/openrtb/v15 v15.0.0 h1:inLuQ3Bsima9HLB2v6WjbtEFF69SWOT5Dux4QZtYdrw=
-github.com/mxmCherry/openrtb/v15 v15.0.0/go.mod h1:TVgncsz6MOzbL7lhun1lNuUBzVBlVDbxf9Fyy1TyhZA=
+github.com/mxmCherry/openrtb/v15 v15.0.1 h1:RnMj/n8Sv0wqaiWQCbmUwzeO6T4Bk3d9RokKvla1CDc=
+github.com/mxmCherry/openrtb/v15 v15.0.1/go.mod h1:TVgncsz6MOzbL7lhun1lNuUBzVBlVDbxf9Fyy1TyhZA=
 github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
 github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
 github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
@@ -282,6 +285,7 @@ github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5d
 github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
 github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -312,8 +316,8 @@ github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 h1:nkcn14uNmFE
 github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
 github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rs/cors v1.5.0 h1:dgSHE6+ia18arGOTIYQKKGWLvEbGvmbNE6NfxhoNHUY=
-github.com/rs/cors v1.5.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
+github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
+github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
 github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
 github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
@@ -325,6 +329,7 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykE
 github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
 github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
+github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
 github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
 github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
 github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go
index 7cb7a07b..3bc876bd 100644
--- a/openrtb_ext/bidders.go
+++ b/openrtb_ext/bidders.go
@@ -162,6 +162,7 @@ const (
 	BidderMgid              BidderName = "mgid"
 	BidderMobfoxpb          BidderName = "mobfoxpb"
 	BidderMobileFuse        BidderName = "mobilefuse"
+	BidderMedianet          BidderName = "medianet"
 	BidderNanoInteractive   BidderName = "nanointeractive"
 	BidderNextMillennium    BidderName = "nextmillennium"
 	BidderNinthDecimal      BidderName = "ninthdecimal"
@@ -305,6 +306,7 @@ func CoreBidderNames() []BidderName {
 		BidderMadvertise,
 		BidderMarsmedia,
 		BidderMediafuse,
+		BidderMedianet,
 		BidderMgid,
 		BidderMobfoxpb,
 		BidderMobileFuse,
diff --git a/openrtb_ext/imp_medianet.go b/openrtb_ext/imp_medianet.go
new file mode 100644
index 00000000..7eb9c93d
--- /dev/null
+++ b/openrtb_ext/imp_medianet.go
@@ -0,0 +1,6 @@
+package openrtb_ext
+
+type ExtImpMedianet struct {
+	Cid  string `json:"cid"`
+	Crid string `json:"crid"`
+}
diff --git a/openrtb_ext/imp_tappx.go b/openrtb_ext/imp_tappx.go
index ca8693ab..e877e385 100644
--- a/openrtb_ext/imp_tappx.go
+++ b/openrtb_ext/imp_tappx.go
@@ -1,7 +1,7 @@
 package openrtb_ext
 
 type ExtImpTappx struct {
-	Host     string   `json:"host"`
+	Host     string   `json:"host,omitempty"` //DEPRECATED
 	TappxKey string   `json:"tappxkey"`
 	Endpoint string   `json:"endpoint"`
 	BidFloor float64  `json:"bidfloor,omitempty"`
diff --git a/openrtb_ext/request.go b/openrtb_ext/request.go
index ecd913b1..f4513fcf 100644
--- a/openrtb_ext/request.go
+++ b/openrtb_ext/request.go
@@ -31,6 +31,7 @@ type ExtRequest struct {
 // ExtRequestPrebid defines the contract for bidrequest.ext.prebid
 type ExtRequestPrebid struct {
 	Aliases              map[string]string         `json:"aliases,omitempty"`
+	AliasGVLIDs          map[string]uint16         `json:"aliasgvlids,omitempty"`
 	BidAdjustmentFactors map[string]float64        `json:"bidadjustmentfactors,omitempty"`
 	Cache                *ExtRequestPrebidCache    `json:"cache,omitempty"`
 	Channel              *ExtRequestPrebidChannel  `json:"channel,omitempty"`
diff --git a/static/bidder-info/medianet.yaml b/static/bidder-info/medianet.yaml
new file mode 100644
index 00000000..b9363510
--- /dev/null
+++ b/static/bidder-info/medianet.yaml
@@ -0,0 +1,19 @@
+maintainer:
+  email: "prebid-support@media.net"
+gvlVendorID: 142
+modifyingVastXmlAllowed: true
+capabilities:
+  app:
+    mediaTypes:
+      - banner
+      - video
+      - native
+  site:
+    mediaTypes:
+      - banner
+      - video
+      - native
+userSync:
+  redirect:
+    url: https://hbx.media.net/cksync.php?cs=1&type=pbs&ovsid=setstatuscode&bidder=medianet&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}
+    userMacro: "${UUID}"
\ No newline at end of file
diff --git a/static/bidder-info/richaudience.yaml b/static/bidder-info/richaudience.yaml
index 6b51aaa8..3e45dc0b 100644
--- a/static/bidder-info/richaudience.yaml
+++ b/static/bidder-info/richaudience.yaml
@@ -6,9 +6,11 @@ capabilities:
   site:
     mediaTypes:
       - banner
+      - video
   app:
     mediaTypes:
       - banner
+      - video
 userSync:
   iframe:
     url: "https://sync.richaudience.com/74889303289e27f327ad0c6de7be7264/?consentString={{.GDPRConsent}}&r={{.RedirectURL}}"
diff --git a/static/bidder-params/medianet.json b/static/bidder-params/medianet.json
new file mode 100644
index 00000000..2f9f1811
--- /dev/null
+++ b/static/bidder-params/medianet.json
@@ -0,0 +1,22 @@
+{
+    "$schema": "http://json-schema.org/draft-04/schema#",
+    "title": "Medianet Adapter Params",
+    "description": "A schema which validates params accepted by the Medianet adapter",
+    "type": "object",
+    "properties": {
+      "cid": {
+        "type": "string",
+        "minLength": 1,
+        "description": "The customer id provided by Media.net."
+      },
+      "crid": {
+        "type": "string",
+        "minLength": 1,
+        "description": "The placement id provided by Media.net."
+      }
+    },
+    "required": [
+      "cid",
+      "crid"
+    ]
+}
\ No newline at end of file
diff --git a/static/bidder-params/tappx.json b/static/bidder-params/tappx.json
index 1cf101a4..77eb4eea 100644
--- a/static/bidder-params/tappx.json
+++ b/static/bidder-params/tappx.json
@@ -39,5 +39,5 @@
 			}
 		}
 	},
-	"required": ["host","tappxkey","endpoint"]
+	"required": ["tappxkey","endpoint"]
 }


Test patch:
diff --git a/adapters/medianet/medianet_test.go b/adapters/medianet/medianet_test.go
new file mode 100644
index 00000000..82bb1978
--- /dev/null
+++ b/adapters/medianet/medianet_test.go
@@ -0,0 +1,30 @@
+package medianet
+
+import (
+	"github.com/stretchr/testify/assert"
+	"testing"
+
+	"github.com/prebid/prebid-server/adapters/adapterstest"
+	"github.com/prebid/prebid-server/config"
+	"github.com/prebid/prebid-server/openrtb_ext"
+)
+
+func TestJsonSamples(t *testing.T) {
+	bidder, buildErr := Builder(openrtb_ext.BidderMedianet, config.Adapter{
+		Endpoint:         "https://example.media.net/rtb/prebid",
+		ExtraAdapterInfo: "http://localhost:8080/extrnal_url",
+	})
+
+	if buildErr != nil {
+		t.Fatalf("Builder returned unexpected error %v", buildErr)
+	}
+
+	adapterstest.RunJSONBidderTest(t, "medianettest", bidder)
+}
+
+func TestEndpointTemplateMalformed(t *testing.T) {
+	_, buildErr := Builder(openrtb_ext.BidderMedianet, config.Adapter{
+		Endpoint: "{{Malformed}}"})
+
+	assert.Nil(t, buildErr)
+}
diff --git a/adapters/medianet/medianettest/exemplary/multi-format.json b/adapters/medianet/medianettest/exemplary/multi-format.json
new file mode 100644
index 00000000..72b5ddf7
--- /dev/null
+++ b/adapters/medianet/medianettest/exemplary/multi-format.json
@@ -0,0 +1,83 @@
+{
+    "mockBidRequest": {
+        "id": "test-request-id",
+        "imp": [
+            {
+                "id": "1",
+                "banner": {
+                    "format": [
+                        {
+                            "w": 320,
+                            "h": 50
+                        }
+                    ]
+                },
+                "video": {
+                    "mimes": [
+                        "video/mp4"
+                    ],
+                    "protocols": [
+                        2,
+                        5
+                    ],
+                    "w": 320,
+                    "h": 480
+                },
+                "ext": {
+                    "bidder": {
+                        "cid": "8CUTSTCID",
+                        "crid": "999999999"
+                    }
+                }
+            }
+        ]
+    },
+
+    "httpCalls": [
+        {
+            "expectedRequest": {
+                "uri": "https://example.media.net/rtb/prebid?src=http%3A%2F%2Flocalhost%3A8080%2Fextrnal_url",
+                "body": {
+                    "id": "test-request-id",
+                    "imp": [
+                        {
+                            "id": "1",
+                            "banner": {
+                                "format": [
+                                    {
+                                        "w": 320,
+                                        "h": 50
+                                    }
+                                ]
+                            },
+                            "video": {
+                                "mimes": [
+                                    "video/mp4"
+                                ],
+                                "protocols": [
+                                    2,
+                                    5
+                                ],
+                                "w": 320,
+                                "h": 480
+                            },
+                            "ext": {
+                                "bidder": {
+                                    "cid": "8CUTSTCID",
+                                    "crid": "999999999"
+                                }
+                            }
+                        }
+                    ]
+                }
+            },
+
+            "mockResponse": {
+                "status": 204,
+                "body": ""
+            }
+        }
+    ],
+
+    "expectedBidResponses": []
+}
diff --git a/adapters/medianet/medianettest/exemplary/multi-imps.json b/adapters/medianet/medianettest/exemplary/multi-imps.json
new file mode 100644
index 00000000..84a378d2
--- /dev/null
+++ b/adapters/medianet/medianettest/exemplary/multi-imps.json
@@ -0,0 +1,132 @@
+{
+    "mockBidRequest": {
+        "id": "test-request-id",
+        "imp": [
+            {
+                "id": "1",
+                "banner": {
+                    "format": [
+                        {
+                            "w": 320,
+                            "h": 50
+                        }
+                    ]
+                },
+                "ext": {
+                    "bidder": {
+                        "cid": "8CUTSTCID",
+                        "crid": "999999999"
+                    }
+                }
+            },
+            {
+                "id": "2",
+                "banner": {
+                    "format": [
+                        {
+                            "w": 300,
+                            "h": 50
+                        }
+                    ]
+                },
+                "ext": {
+                    "bidder": {
+                        "cid": "8CUTSESHA",
+                        "crid": "9999999789"
+                    }
+                }
+            }
+        ]
+    },
+
+    "httpCalls": [
+        {
+            "expectedRequest": {
+                "uri": "https://example.media.net/rtb/prebid?src=http%3A%2F%2Flocalhost%3A8080%2Fextrnal_url",
+                "body": {
+                    "id": "test-request-id",
+                    "imp": [
+                        {
+                            "id": "1",
+                            "banner": {
+                                "format": [
+                                    {
+                                        "w": 320,
+                                        "h": 50
+                                    }
+                                ]
+                            },
+                            "ext": {
+                                "bidder": {
+                                    "cid": "8CUTSTCID",
+                                    "crid": "999999999"
+                                }
+                            }
+                        },
+                        {
+                            "id": "2",
+                            "banner": {
+                                "format": [
+                                    {
+                                        "w": 300,
+                                        "h": 50
+                                    }
+                                ]
+                            },
+                            "ext": {
+                                "bidder": {
+                                    "cid": "8CUTSESHA",
+                                    "crid": "9999999789"
+                                }
+                            }
+                        }
+                    ]
+                }
+            },
+
+            "mockResponse": {
+                "status": 200,
+                "body": {
+                    "id": "test-request-id",
+                    "seatbid": [
+                        {
+                            "seat": "medianet",
+                            "bid": [
+                                {
+                                    "id": "test-bid-id",
+                                    "impid": "1",
+                                    "price": 1.50,
+                                    "adm": "some-test-ad",
+                                    "crid": "test-crid",
+                                    "h": 50,
+                                    "w": 320
+                                }
+                            ]
+                        }
+                    ],
+                    "cur": "USD"
+                }
+            }
+        }
+    ],
+
+    "expectedBidResponses": [
+        {
+            "currency": "USD",
+            "bids": [
+                {
+                    "bid": {
+                        "id": "test-bid-id",
+                        "impid": "1",
+                        "price": 1.50,
+                        "adm": "some-test-ad",
+                        "crid": "test-crid",
+                        "w": 320,
+                        "h": 50
+                    },
+                    "type": "banner"
+                }
+            ]
+        }
+    ]
+}
diff --git a/adapters/medianet/medianettest/exemplary/no-bid.json b/adapters/medianet/medianettest/exemplary/no-bid.json
new file mode 100644
index 00000000..00c11eec
--- /dev/null
+++ b/adapters/medianet/medianettest/exemplary/no-bid.json
@@ -0,0 +1,60 @@
+{
+    "mockBidRequest": {
+        "id": "test-request-id",
+        "imp": [
+            {
+                "id": "1",
+                "banner": {
+                    "format": [
+                        {
+                            "w": 300,
+                            "h": 250
+                        }
+                    ]
+                },
+                "ext": {
+                    "bidder": {
+                        "cid": "8CUTSTCID",
+                        "crid": "999999999"
+                    }
+                }
+            }
+        ]
+    },
+
+    "httpCalls": [
+        {
+            "expectedRequest": {
+                "uri": "https://example.media.net/rtb/prebid?src=http%3A%2F%2Flocalhost%3A8080%2Fextrnal_url",
+                "body": {
+                    "id": "test-request-id",
+                    "imp": [
+                        {
+                            "id": "1",
+                            "banner": {
+                                "format": [
+                                    {
+                                        "w": 300,
+                                        "h": 250
+                                    }
+                                ]
+                            },
+                            "ext": {
+                                "bidder": {
+                                    "cid": "8CUTSTCID",
+                                    "crid": "999999999"
+                                }
+                            }
+                        }
+                    ]
+                }
+            },
+            "mockResponse": {
+                "status": 204,
+                "body": {}
+            }
+        }
+    ],
+
+    "expectedBidResponses": []
+}
diff --git a/adapters/medianet/medianettest/exemplary/optional-params.json b/adapters/medianet/medianettest/exemplary/optional-params.json
new file mode 100644
index 00000000..b560cac9
--- /dev/null
+++ b/adapters/medianet/medianettest/exemplary/optional-params.json
@@ -0,0 +1,62 @@
+{
+    "mockBidRequest": {
+        "id": "test-request-id",
+        "imp": [
+            {
+                "id": "1",
+                "banner": {
+                    "format": [
+                        {
+                            "w": 300,
+                            "h": 250
+                        }
+                    ]
+                },
+                "ext": {
+                    "bidder": {
+                        "cid": "8CUTSTCID",
+                        "crid": "999999999",
+                        "tagid_src": "ext"
+                    }
+                }
+            }
+        ]
+    },
+
+    "httpCalls": [
+        {
+            "expectedRequest": {
+                "uri": "https://example.media.net/rtb/prebid?src=http%3A%2F%2Flocalhost%3A8080%2Fextrnal_url",
+                "body": {
+                    "id": "test-request-id",
+                    "imp": [
+                        {
+                            "id": "1",
+                            "banner": {
+                                "format": [
+                                    {
+                                        "w": 300,
+                                        "h": 250
+                                    }
+                                ]
+                            },
+                            "ext": {
+                                "bidder": {
+                                    "cid": "8CUTSTCID",
+                                    "crid": "999999999",
+                                    "tagid_src": "ext"
+                                }
+                            }
+                        }
+                    ]
+                }
+            },
+            "mockResponse": {
+                "status": 204,
+                "body": {}
+            }
+        }
+    ],
+
+    "expectedBidResponses": []
+}
diff --git a/adapters/medianet/medianettest/exemplary/simple-banner.json b/adapters/medianet/medianettest/exemplary/simple-banner.json
new file mode 100644
index 00000000..1548a959
--- /dev/null
+++ b/adapters/medianet/medianettest/exemplary/simple-banner.json
@@ -0,0 +1,98 @@
+{
+    "mockBidRequest": {
+        "id": "test-request-id",
+        "imp": [
+            {
+                "id": "1",
+                "banner": {
+                    "format": [
+                        {
+                            "w": 320,
+                            "h": 50
+                        }
+                    ]
+                },
+                "ext": {
+                    "bidder": {
+                        "cid": "8CUTSTCID",
+                        "crid": "999999999"
+                    }
+                }
+            }
+        ]
+    },
+
+    "httpCalls": [
+        {
+            "expectedRequest": {
+                "uri": "https://example.media.net/rtb/prebid?src=http%3A%2F%2Flocalhost%3A8080%2Fextrnal_url",
+                "body": {
+                    "id": "test-request-id",
+                    "imp": [
+                        {
+                            "id": "1",
+                            "banner": {
+                                "format": [
+                                    {
+                                        "w": 320,
+                                        "h": 50
+                                    }
+                                ]
+                            },
+                            "ext": {
+                                "bidder": {
+                                    "cid": "8CUTSTCID",
+                                    "crid": "999999999"
+                                }
+                            }
+                        }
+                    ]
+                }
+            },
+
+            "mockResponse": {
+                "status": 200,
+                "body": {
+                    "id": "test-request-id",
+                    "seatbid": [
+                        {
+                            "seat": "medianet",
+                            "bid": [
+                                {
+                                    "id": "test-bid-id",
+                                    "impid": "1",
+                                    "price": 1.50,
+                                    "adm": "some-test-ad",
+                                    "crid": "test-crid",
+                                    "h": 50,
+                                    "w": 320
+                                }
+                            ]
+                        }
+                    ],
+                    "cur": "USD"
+                }
+            }
+        }
+    ],
+
+    "expectedBidResponses": [
+        {
+            "currency": "USD",
+            "bids": [
+                {
+                    "bid": {
+                        "id": "test-bid-id",
+                        "impid": "1",
+                        "price": 1.50,
+                        "adm": "some-test-ad",
+                        "crid": "test-crid",
+                        "w": 320,
+                        "h": 50
+                    },
+                    "type": "banner"
+                }
+            ]
+        }
+    ]
+}
diff --git a/adapters/medianet/medianettest/exemplary/simple-video.json b/adapters/medianet/medianettest/exemplary/simple-video.json
new file mode 100644
index 00000000..ef609698
--- /dev/null
+++ b/adapters/medianet/medianettest/exemplary/simple-video.json
@@ -0,0 +1,101 @@
+{
+    "mockBidRequest": {
+        "id": "test-request-id",
+        "imp": [
+            {
+                "id": "1",
+                "video": {
+                    "mimes": [
+                        "video/mp4"
+                    ],
+                    "protocols": [
+                        2,
+                        5
+                    ],
+                    "w": 320,
+                    "h": 480
+                },
+                "ext": {
+                    "bidder": {
+                        "cid": "8CUTSTCID",
+                        "crid": "999999999"
+                    }
+                }
+            }
+        ]
+    },
+    "httpCalls": [
+        {
+            "expectedRequest": {
+                "uri": "https://example.media.net/rtb/prebid?src=http%3A%2F%2Flocalhost%3A8080%2Fextrnal_url",
+                "body": {
+                    "id": "test-request-id",
+                    "imp": [
+                        {
+                            "id": "1",
+                            "video": {
+                                "mimes": [
+                                    "video/mp4"
+                                ],
+                                "protocols": [
+                                    2,
+                                    5
+                                ],
+                                "w": 320,
+                                "h": 480
+                            },
+                            "ext": {
+                                "bidder": {
+                                    "cid": "8CUTSTCID",
+                                    "crid": "999999999"
+                                }
+                            }
+                        }
+                    ]
+                }
+            },
+            "mockResponse": {
+                "status": 200,
+                "body": {
+                    "id": "test-request-id",
+                    "cur": "USD",
+                    "seatbid": [
+                        {
+                            "seat": "medianet",
+                            "bid": [
+                                {
+                                    "id": "test-bid-id",
+                                    "impid": "1",
+                                    "price": 2.50,
+                                    "adm": "some-test-ad",
+                                    "crid": "test-crid",
+                                    "w": 320,
+                                    "h": 480
+                                }
+                            ]
+                        }
+                    ]
+                }
+            }
+        }
+    ],
+    "expectedBidResponses": [
+        {
+            "currency": "USD",
+            "bids": [
+                {
+                    "bid": {
+                        "id": "test-bid-id",
+                        "impid": "1",
+                        "price": 2.50,
+                        "adm": "some-test-ad",
+                        "crid": "test-crid",
+                        "w": 320,
+                        "h": 480
+                    },
+                    "type": "video"
+                }
+            ]
+        }
+    ]
+}
diff --git a/adapters/medianet/medianettest/supplemental/invalid-req-400-status-code-bad-request.json b/adapters/medianet/medianettest/supplemental/invalid-req-400-status-code-bad-request.json
new file mode 100644
index 00000000..670e8ed3
--- /dev/null
+++ b/adapters/medianet/medianettest/supplemental/invalid-req-400-status-code-bad-request.json
@@ -0,0 +1,97 @@
+
+{
+  "mockBidRequest": {
+    "id": "some-request-id",
+    "tmax": 1000,
+    "user": {
+      "buyeruid": "0000-000-000-0000"
+    },
+    "app": {
+      "publisher": {
+        "id": "123456789"
+      },
+      "cat": [
+        "IAB22-1"
+      ],
+      "bundle": "com.app.awesome",
+      "name": "Awesome App",
+      "domain": "awesomeapp.com",
+      "id": "123456789"
+    },
+    "imp": [
+      {
+        "id": "some-impression-id",
+        "video": {
+          "mimes": [
+            "video/mp4"
+          ],
+          "w": 640,
+          "h": 480,
+          "minduration": 120,
+          "maxduration": 150
+        },
+        "ext": {
+          "bidder": {
+            "cid": "8CUTSTCID",
+            "crid": "999999999"
+          }
+        }
+      }
+    ]
+  },
+
+  "httpCalls": [{
+    "expectedRequest": {
+      "uri": "https://example.media.net/rtb/prebid?src=http%3A%2F%2Flocalhost%3A8080%2Fextrnal_url",
+      "body": {
+        "id": "some-request-id",
+        "imp": [
+          {
+            "id": "some-impression-id",
+            "video": {
+              "mimes": [
+                "video/mp4"
+              ],
+              "w": 640,
+              "h": 480,
+              "minduration": 120,
+              "maxduration": 150
+            },
+            "ext": {
+              "bidder": {
+                "cid": "8CUTSTCID",
+                "crid": "999999999"
+              }
+            }
+          }
+        ],
+        "app":  {
+          "publisher": {
+            "id": "123456789"
+          },
+          "cat": [
+            "IAB22-1"
+          ],
+          "bundle": "com.app.awesome",
+          "name": "Awesome App",
+          "domain": "awesomeapp.com",
+          "id": "123456789"
+        },
+        "user": {
+          "buyeruid": "0000-000-000-0000"
+        },
+        "tmax": 1000
+      }
+    },
+    "mockResponse": {
+      "status": 400
+    }
+  }],
+  "expectedBidResponses": [],
+  "expectedMakeBidsErrors": [
+    {
+      "value": "Unexpected status code: 400. Run with request.debug = 1 for more info",
+      "comparison": "literal"
+    }
+  ]
+}
diff --git a/adapters/medianet/medianettest/supplemental/valid-req-200-bid-response-from-mnet.json b/adapters/medianet/medianettest/supplemental/valid-req-200-bid-response-from-mnet.json
new file mode 100644
index 00000000..e6a9b654
--- /dev/null
+++ b/adapters/medianet/medianettest/supplemental/valid-req-200-bid-response-from-mnet.json
@@ -0,0 +1,134 @@
+{
+  "mockBidRequest": {
+    "id": "test-request-id",
+    "imp": [
+      {
+        "id": "test-imp-id",
+        "banner": {
+          "w": 300,
+          "h": 250
+        },
+        "ext": {
+          "bidder": {
+            "cid": "8CUTSTCID",
+            "crid": "999999999"
+          }
+        }
+      }
+    ],
+    "site": {
+      "domain": "www.example.com",
+      "page": "http://www.example.com",
+      "publisher": {
+        "domain": "example.com"
+      },
+      "ext": {
+        "amp": 0
+      }
+    },
+    "device": {
+      "ua": "userAgent",
+      "ip": "193.168.244.1"
+    },
+    "at": 1,
+    "tmax": 5000,
+    "cur": [
+      "USD"
+    ],
+    "regs": {
+      "ext": {
+        "gdpr": 0
+      }
+    }
+  },
+  "httpCalls": [{
+    "expectedRequest": {
+      "uri": "https://example.media.net/rtb/prebid?src=http%3A%2F%2Flocalhost%3A8080%2Fextrnal_url",
+      "body": {
+        "id": "test-request-id",
+        "imp": [
+          {
+            "id": "test-imp-id",
+            "banner": {
+              "w": 300,
+              "h": 250
+            },
+            "ext": {
+              "bidder": {
+                "cid": "8CUTSTCID",
+                "crid": "999999999"
+              }
+            }
+          }
+        ],
+        "site": {
+          "domain": "www.example.com",
+          "page": "http://www.example.com",
+          "publisher": {
+            "domain": "example.com"
+          },
+          "ext": {
+            "amp": 0
+          }
+        },
+        "device": {
+          "ua": "userAgent",
+          "ip": "193.168.244.1"
+        },
+        "at": 1,
+        "tmax": 5000,
+        "cur": [
+          "USD"
+        ],
+        "regs": {
+          "ext": {
+            "gdpr": 0
+          }
+        }
+      }
+    },
+    "mockResponse": {
+      "status": 200,
+      "body": {
+        "id": "tid",
+        "seatbid": [
+          {
+            "seat": "medianet",
+            "bid": [
+              {
+                "id": "randomid",
+                "impid": "test-imp-id",
+                "price": 0.500000,
+                "adid": "12345678",
+                "adm": "some-test-ad",
+                "cid": "987",
+                "crid": "12345678",
+                "h": 250,
+                "w": 300
+              }
+            ]
+          }
+        ],
+        "bidid": "bid01"
+      }
+    }
+  }],
+
+  "expectedBidResponses": [{
+    "currency": "USD",
+    "bids": [{
+      "bid": {
+        "id": "randomid",
+        "impid": "test-imp-id",
+        "price": 0.500000,
+        "adid": "12345678",
+        "adm": "some-test-ad",
+        "cid": "987",
+        "crid": "12345678",
+        "h": 250,
+        "w": 300
+      },
+      "type": "banner"
+    }]
+  }]
+}
diff --git a/adapters/medianet/medianettest/supplemental/valid-req-204-response-from-mnet.json b/adapters/medianet/medianettest/supplemental/valid-req-204-response-from-mnet.json
new file mode 100755
index 00000000..334d61a0
--- /dev/null
+++ b/adapters/medianet/medianettest/supplemental/valid-req-204-response-from-mnet.json
@@ -0,0 +1,66 @@
+{
+  "mockBidRequest": {
+    "app": {
+      "bundle": "com.example.app"
+    },
+    "id": "req-id",
+    "device": {
+      "ifa": "9d8fe0a9-c0dd-4482-b16b-5709b00c608d",
+      "ip": "1.1.1.1",
+      "ua": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36"
+    },
+    "imp": [
+      {
+        "ext": {
+          "bidder": {
+            "cid": "8CUTSTCID",
+            "crid": "999999999"
+          }
+        },
+        "banner": {
+          "w": 320,
+          "h": 50
+        },
+        "id": "imp-id"
+      }
+    ]
+  },
+  "httpCalls": [
+    {
+      "expectedRequest": {
+        "uri": "https://example.media.net/rtb/prebid?src=http%3A%2F%2Flocalhost%3A8080%2Fextrnal_url",
+        "body": {
+          "app": {
+            "bundle": "com.example.app"
+          },
+          "id": "req-id",
+          "device": {
+            "ifa": "9d8fe0a9-c0dd-4482-b16b-5709b00c608d",
+            "ip": "1.1.1.1",
+            "ua": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36"
+          },
+          "imp": [
+            {
+              "ext": {
+                "bidder": {
+                  "cid": "8CUTSTCID",
+                  "crid": "999999999"
+                }
+              },
+              "banner": {
+                "w": 320,
+                "h": 50
+              },
+              "id": "imp-id"
+            }
+          ]
+        }
+      },
+      "mockResponse": {
+        "status": 204,
+        "body": {}
+      }
+    }
+  ],
+  "expectedBidResponses": []
+}
\ No newline at end of file
diff --git a/adapters/medianet/params_test.go b/adapters/medianet/params_test.go
new file mode 100644
index 00000000..a1e5e834
--- /dev/null
+++ b/adapters/medianet/params_test.go
@@ -0,0 +1,54 @@
+package medianet
+
+import (
+	"encoding/json"
+	"testing"
+
+	"github.com/prebid/prebid-server/openrtb_ext"
+)
+
+// This file actually intends to test static/bidder-params/medianet.json
+func TestValidParams(t *testing.T) {
+	validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params")
+	if err != nil {
+		t.Fatalf("Failed to fetch the json-schemas. %v", err)
+	}
+
+	for _, validParam := range validParams {
+		if err := validator.Validate(openrtb_ext.BidderMedianet, json.RawMessage(validParam)); err != nil {
+			t.Errorf("Schema rejected medianet params: %s", validParam)
+		}
+	}
+}
+
+func TestInvalidParams(t *testing.T) {
+	validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params")
+	if err != nil {
+		t.Fatalf("Failed to fetch the json-schemas. %v", err)
+	}
+
+	for _, invalidParam := range invalidParams {
+		if err := validator.Validate(openrtb_ext.BidderMedianet, json.RawMessage(invalidParam)); err == nil {
+			t.Errorf("Schema allowed unexpected params: %s", invalidParam)
+		}
+	}
+}
+
+var validParams = []string{
+	`{"cid":"123", "crid":"1234"}`,
+}
+
+var invalidParams = []string{
+	``,
+	`null`,
+	`true`,
+	`5`,
+	`4.2`,
+	`[]`,
+	`{}`,
+	`{"cid":"", "crid":""}`,
+	`{"cid":"only cid is present"}`,
+	`{"crid":"only crid is present"}`,
+	`{"ccid":"123","ccrid":"123"}`,
+	`{"aid":123, "placementId":"123", "siteId":"321"}`,
+}
diff --git a/adapters/richaudience/richaudience_test.go b/adapters/richaudience/richaudience_test.go
index b1655a4d..8a6dd85b 100644
--- a/adapters/richaudience/richaudience_test.go
+++ b/adapters/richaudience/richaudience_test.go
@@ -120,8 +120,6 @@ func TestGetDevice(t *testing.T) {
 		},
 	}
 
-	validateDevice(raBidRequest)
-
 	if raBidRequest.Device.IP != richaudienceRequestTest.Device.IP {
 		t.Errorf("error %s", richaudienceRequestTest.Device.IP)
 	}
diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-iPv6.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-iPv6.json
index f2162ed5..fc393114 100644
--- a/adapters/richaudience/richaudiencetest/exemplary/single-banner-iPv6.json
+++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-iPv6.json
@@ -27,6 +27,7 @@
         "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true"
       },
       "device": {
+        "ip": "11.222.33.44",
         "ipv6": "2607:fb90:f27:4512:d800:cb23:a603:e245",
         "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
     },
@@ -75,6 +76,7 @@
               "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true"
             },
             "device": {
+                "ip": "11.222.33.44",
                 "ipv6": "2607:fb90:f27:4512:d800:cb23:a603:e245",
                 "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
             },
diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-video.json b/adapters/richaudience/richaudiencetest/exemplary/single-video.json
new file mode 100644
index 00000000..c686ecdd
--- /dev/null
+++ b/adapters/richaudience/richaudiencetest/exemplary/single-video.json
@@ -0,0 +1,130 @@
+{
+    "mockBidRequest": {
+      "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3",
+      "test": 0,
+      "imp": [
+        {
+          "id": "div-gpt-ad-1460505748561-0",
+          "video": {
+              "mimes": ["video/mp4"],
+                "w": 640,
+                "h": 480,
+                "placement": 1
+            },
+          "bidfloor": 1e-05,
+          "bidfloorcur": "USD",
+          "ext": {
+           "bidder": {
+              "pid": "OsNsyeF68q",
+              "supplyType": "site",
+              "test": true
+            }
+          }
+        }
+      ],
+      "site": {
+        "domain": "bridge.richmediastudio.com",
+        "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true"
+      },
+      "device": {
+        "ip": "11.222.33.44",
+        "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
+    },
+      "user": {
+        "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a",
+        "ext": {}
+      }
+    },
+    
+    "httpCalls": [
+      {
+        "expectedRequest": {
+          "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs",
+          "headers": {
+            "Content-Type": ["application/json;charset=utf-8"],
+            "Accept": ["application/json"],
+            "X-Openrtb-Version": ["2.5"]
+          },
+          "body": {
+            "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3",
+            "test": 1,
+            "imp": [
+              {
+                "id": "div-gpt-ad-1460505748561-0",
+                "tagid" : "OsNsyeF68q",
+                "secure": 1,
+                "video": {
+                    "mimes": ["video/mp4"],
+                      "w": 640,
+                      "h": 480,
+                      "placement": 1
+                  },
+                "bidfloor": 1e-05,
+                "bidfloorcur": "USD",
+                "ext": {
+                  "bidder": {
+                    "pid": "OsNsyeF68q",
+                    "supplyType": "site",
+                   "test": true
+                  }
+                }
+              }
+            ],
+            "site": {
+              "domain": "bridge.richmediastudio.com",
+              "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true"
+            },
+            "device": {
+                "ip": "11.222.33.44",
+                "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
+            },
+            "user": {
+              "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a",
+              "ext": {
+
+              }
+            }
+          }
+        },
+        "mockResponse": {
+          "status": 200,
+          "body": {
+            "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc",
+            "seatbid": [{
+                "bid": [{
+                    "id": "47286888",
+                    "impid": "div-gpt-ad-1460505748561-0",
+                    "price": 99,
+                    "crid": "999999",
+                    "adm": "<!-- VAST video -->",
+                    "adomain": ["richaudience.com"],
+                    "h": 250,
+                    "w": 300
+                }]
+            }]
+          }
+        }
+      }
+    ],
+  
+    "expectedBidResponses": [
+      {
+        "currency": "USD",
+        "bids": [
+          {
+            "bid": {
+              "id": "47286888",
+              "impid": "div-gpt-ad-1460505748561-0",
+              "price": 99,
+              "adm": "<!-- VAST video -->",
+              "adomain": ["richaudience.com"],
+              "crid": "999999",
+              "w": 300,
+              "h": 250
+            },
+            "type": "video"
+          }
+        ]
+      }
+    ]
+  }
\ No newline at end of file
diff --git a/adapters/richaudience/richaudiencetest/supplemental/formatNotFound.json b/adapters/richaudience/richaudiencetest/supplemental/formatNotFound.json
index 01fbd418..4e4b5a4f 100644
--- a/adapters/richaudience/richaudiencetest/supplemental/formatNotFound.json
+++ b/adapters/richaudience/richaudiencetest/supplemental/formatNotFound.json
@@ -14,7 +14,7 @@
            "bidder": {
               "pid": "OsNsyeF68q",
               "supplyType": "site",
-              "test": true
+              "test": false
             }
           }
         }
@@ -24,6 +24,7 @@
         "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true"
       },
       "device": {
+        "ip": "11.222.33.44",
         "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
     },
       "user": {
diff --git a/adapters/richaudience/richaudiencetest/supplemental/noIPDevice.json b/adapters/richaudience/richaudiencetest/supplemental/testTrueandDeviceIpNil.json
similarity index 94%
rename from adapters/richaudience/richaudiencetest/supplemental/noIPDevice.json
rename to adapters/richaudience/richaudiencetest/supplemental/testTrueandDeviceIpNil.json
index 72148a7b..10331c7c 100644
--- a/adapters/richaudience/richaudiencetest/supplemental/noIPDevice.json
+++ b/adapters/richaudience/richaudiencetest/supplemental/testTrueandDeviceIpNil.json
@@ -30,11 +30,11 @@
         "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
     },
       "user": {
-        "buyeruid": "",
+        "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a",
         "ext": {}
       }
     },
-    
+
     "expectedMakeRequestsErrors": [{
         "value": "request.Device.IP is required",
         "comparison": "literal"
diff --git a/adapters/richaudience/richaudiencetest/supplemental/validateDevice.json b/adapters/richaudience/richaudiencetest/supplemental/validateDevice.json
new file mode 100644
index 00000000..4ab78f8e
--- /dev/null
+++ b/adapters/richaudience/richaudiencetest/supplemental/validateDevice.json
@@ -0,0 +1,42 @@
+{
+    "mockBidRequest": {
+      "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3",
+      "test": 0,
+      "imp": [
+        {
+          "id": "div-gpt-ad-1460505748561-0",
+          "banner": {
+            "format" : [{
+                  "w": 300,
+                  "h": 250
+                }]
+        },
+          "bidfloor": 1e-05,
+          "bidfloorcur": "USD",
+          "ext": {
+           "bidder": {
+              "pid": "OsNsyeF68q",
+              "supplyType": "site",
+              "test": false
+            }
+          }
+        }
+      ],
+      "site": {
+        "domain": "bridge.richmediastudio.com",
+        "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true"
+      },
+      "device": {
+        "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
+    },
+      "user": {
+        "buyeruid": "",
+        "ext": {}
+      }
+    },
+    
+    "expectedMakeRequestsErrors": [{
+        "value": "request.Device.IP is required",
+        "comparison": "literal"
+      }]
+  }
\ No newline at end of file
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
new file mode 100644
index 00000000..0c67f9d2
--- /dev/null
+++ b/adapters/rubicon/rubicontest/exemplary/user-buyeruid-not-present-but-special-uid-with-other-stype-present.json
@@ -0,0 +1,371 @@
+{
+  "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,
+              "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
new file mode 100644
index 00000000..0c157e3c
--- /dev/null
+++ b/adapters/rubicon/rubicontest/exemplary/user-buyeruid-not-present-but-special-uid-with-ppuid-stype-present.json
@@ -0,0 +1,371 @@
+{
+  "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,
+              "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
new file mode 100644
index 00000000..74aac45c
--- /dev/null
+++ b/adapters/rubicon/rubicontest/exemplary/user-buyeruid-present.json
@@ -0,0 +1,372 @@
+{
+  "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,
+              "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/tappx/params_test.go b/adapters/tappx/params_test.go
index 94579248..8a248345 100644
--- a/adapters/tappx/params_test.go
+++ b/adapters/tappx/params_test.go
@@ -33,6 +33,7 @@ func TestInvalidParams(t *testing.T) {
 }
 
 var validParams = []string{
+	`{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915"}`,
 	`{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"test.tappx.com"}`,
 	`{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"test.tappx.com", "bidfloor":0.5}`,
 	`{"tappxkey":"pub-12345-android-9876", "endpoint":"ZZ1INTERNALTEST149147915", "host":"test.tappx.com", "bidfloor":0.5, "mktag":"txmk-xxxxx-xxx-xxxx"}`,
@@ -54,11 +55,6 @@ var invalidParams = []string{
 	`{"tappxkey":"pub-12345-android-9876"}`,
 	`{"endpoint":""}`,
 	`{"endpoint":"ZZ1INTERNALTEST149147915"}`,
-	`{"host":""}`,
-	`{"host": 1}`,
-	`{"host": 1.2}`,
-	`{"host": null}`,
-	`{"host": true}`,
 	`{"tappxkey": 1, "endpoint":"ZZ1INTERNALTEST149147915"}`,
 	`{"tappxkey":"pub-12345-android-9876", "endpoint": 1}`,
 	`{"tappxkey": 1, "endpoint": 1}`,
@@ -67,12 +63,12 @@ var invalidParams = []string{
 	`{"tappxkey": 1, "endpoint": 1, "host": 123}`,
 	`{"tappxkey": "1", "endpoint": 1}`,
 	`{"tappxkey": "1", "endpoint": "ZZ1INTERNALTEST149147915", "host":[]]}`,
-	`{"tappxkey": "1", "endpoint": 1, "host":"host"}`,
-	`{"tappxkey": "1", "endpoint": "1", "host":"host", "mktag":1}`,
-	`{"tappxkey": "1", "endpoint": "1", "host":"host", "mktag":[1,2]}`,
-	`{"tappxkey": "1", "endpoint": "1", "host":"host", "bcid":""}`,
-	`{"tappxkey": "1", "endpoint": "1", "host":"host", "bcid":"123", bcrid: ["123"]}`,
-	`{"tappxkey": "1", "endpoint": "1", "host":"host", "bcid":["123"], bcrid: 123}`,
-	`{"tappxkey": "1", "endpoint": "1", "host":"host", "bcid":["123"], bcrid: [123]}`,
-	`{"tappxkey": "1", "endpoint": "1", "host":"host", "bcid":[123], bcrid: ["123"]}`,
+	`{"tappxkey": "1", "endpoint": 1}`,
+	`{"tappxkey": "1", "endpoint": "1", "mktag":1}`,
+	`{"tappxkey": "1", "endpoint": "1", "mktag":[1,2]}`,
+	`{"tappxkey": "1", "endpoint": "1", "bcid":""}`,
+	`{"tappxkey": "1", "endpoint": "1", "bcid":"123", bcrid: ["123"]}`,
+	`{"tappxkey": "1", "endpoint": "1", "bcid":["123"], bcrid: 123}`,
+	`{"tappxkey": "1", "endpoint": "1", "bcid":["123"], bcrid: [123]}`,
+	`{"tappxkey": "1", "endpoint": "1", "bcid":[123], bcrid: ["123"]}`,
 }
diff --git a/adapters/tappx/tappx_test.go b/adapters/tappx/tappx_test.go
index ea7011a7..79696897 100644
--- a/adapters/tappx/tappx_test.go
+++ b/adapters/tappx/tappx_test.go
@@ -41,13 +41,12 @@ func TestTsValue(t *testing.T) {
 	var test int
 	test = 0
 	var tappxExt openrtb_ext.ExtImpTappx
-	tappxExt.Host = "example.host.tappx.com"
 	tappxExt.Endpoint = "DUMMYENDPOINT"
 	tappxExt.TappxKey = "dummy-tappx-key"
 
 	url, err := bidderTappx.buildEndpointURL(&tappxExt, test)
 
-	match, err := regexp.MatchString(`http://example\.host\.tappx\.com/DUMMYENDPOINT\?tappxkey=dummy-tappx-key&ts=[0-9]{13}&type_cnn=prebid&v=1\.3`, url)
+	match, err := regexp.MatchString(`http://ssp\.api\.tappx\.com/rtb/v2/DUMMYENDPOINT\?tappxkey=dummy-tappx-key&ts=[0-9]{13}&type_cnn=prebid&v=1\.4`, url)
 	if err != nil {
 		t.Errorf("Error while running regex validation: %s", err.Error())
 		return
diff --git a/adapters/tappx/tappxtest/exemplary/single-banner-impression-extra.json b/adapters/tappx/tappxtest/exemplary/single-banner-impression-extra.json
index a6ddf284..15d19f94 100644
--- a/adapters/tappx/tappxtest/exemplary/single-banner-impression-extra.json
+++ b/adapters/tappx/tappxtest/exemplary/single-banner-impression-extra.json
@@ -13,7 +13,6 @@
          "bidder": {
             "tappxkey": "pub-12345-android-9876",
             "endpoint": "ZZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/",
             "mktag": "mktag-12345-android-9876",
             "bcid": ["1","2","3"],
             "bcrid": ["4","5","6"]
@@ -36,7 +35,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://testing.ssp.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://ssp.api.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -51,7 +50,6 @@
                 "bidder": {
                   "tappxkey": "pub-12345-android-9876",
                   "endpoint": "ZZ123456PS",
-                  "host": "testing.ssp.tappx.com/rtb/v2/",
                   "mktag": "mktag-12345-android-9876",
                   "bcid": ["1","2","3"],
                   "bcrid": ["4","5","6"]
diff --git a/adapters/tappx/tappxtest/exemplary/single-banner-impression-future-feature.json b/adapters/tappx/tappxtest/exemplary/single-banner-impression-future-feature.json
index 259d51cb..8a78493e 100644
--- a/adapters/tappx/tappxtest/exemplary/single-banner-impression-future-feature.json
+++ b/adapters/tappx/tappxtest/exemplary/single-banner-impression-future-feature.json
@@ -12,8 +12,7 @@
         "ext": {
          "bidder": {
             "tappxkey": "pub-12345-android-9876",
-            "endpoint": "ZZ123456PS",
-            "host": "ZZ123456PS.ssp.tappx.com/rtb/"
+            "endpoint": "zz123456ps"
           }
         }
       }
@@ -33,7 +32,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://ZZ123456PS.ssp.tappx.com/rtb/?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://zz123456ps.pub.tappx.com/rtb/?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -47,8 +46,7 @@
               "ext": {
                 "bidder": {
                   "tappxkey": "pub-12345-android-9876",
-                  "endpoint": "ZZ123456PS",
-                  "host": "ZZ123456PS.ssp.tappx.com/rtb/"
+                  "endpoint": "zz123456ps"
                 }
               }
             }
diff --git a/adapters/tappx/tappxtest/exemplary/single-banner-impression.json b/adapters/tappx/tappxtest/exemplary/single-banner-impression.json
index 532e2b1f..da27cd97 100644
--- a/adapters/tappx/tappxtest/exemplary/single-banner-impression.json
+++ b/adapters/tappx/tappxtest/exemplary/single-banner-impression.json
@@ -12,8 +12,7 @@
         "ext": {
          "bidder": {
             "tappxkey": "pub-12345-android-9876",
-            "endpoint": "ZZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "endpoint": "ZZ123456PS"
           }
         }
       }
@@ -33,7 +32,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://testing.ssp.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://ssp.api.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -47,8 +46,7 @@
               "ext": {
                 "bidder": {
                   "tappxkey": "pub-12345-android-9876",
-                  "endpoint": "ZZ123456PS",
-                 "host": "testing.ssp.tappx.com/rtb/v2/"
+                  "endpoint": "ZZ123456PS"
                 }
               }
             }
diff --git a/adapters/tappx/tappxtest/exemplary/single-banner-site.json b/adapters/tappx/tappxtest/exemplary/single-banner-site.json
index e8858bd6..2a75af67 100644
--- a/adapters/tappx/tappxtest/exemplary/single-banner-site.json
+++ b/adapters/tappx/tappxtest/exemplary/single-banner-site.json
@@ -12,8 +12,7 @@
         "ext": {
          "bidder": {
             "tappxkey": "pub-12345-site-9876",
-            "endpoint": "ZZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "endpoint": "ZZ123456PS"
           }
         }
       }
@@ -37,7 +36,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://testing.ssp.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-site-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://ssp.api.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-site-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -51,8 +50,7 @@
               "ext": {
                 "bidder": {
                   "tappxkey": "pub-12345-site-9876",
-                  "endpoint": "ZZ123456PS",
-                 "host": "testing.ssp.tappx.com/rtb/v2/"
+                  "endpoint": "ZZ123456PS"
                 }
               }
             }
diff --git a/adapters/tappx/tappxtest/exemplary/single-video-impression.json b/adapters/tappx/tappxtest/exemplary/single-video-impression.json
index 23e07925..407a0565 100644
--- a/adapters/tappx/tappxtest/exemplary/single-video-impression.json
+++ b/adapters/tappx/tappxtest/exemplary/single-video-impression.json
@@ -15,8 +15,7 @@
         "ext": {
           "bidder": {
             "tappxkey": "pub-12345-android-9876",
-            "endpoint": "VZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "endpoint": "VZ123456PS"
           }
         }
       }
@@ -35,7 +34,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://testing.ssp.tappx.com/rtb/v2/VZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://ssp.api.tappx.com/rtb/v2/VZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -52,7 +51,6 @@
               "ext": {
                 "bidder": {
                 "endpoint": "VZ123456PS",
-                "host": "testing.ssp.tappx.com/rtb/v2/",
                 "tappxkey": "pub-12345-android-9876"
                 }
               }
diff --git a/adapters/tappx/tappxtest/exemplary/single-video-site.json b/adapters/tappx/tappxtest/exemplary/single-video-site.json
index 85872b6a..4dec5931 100644
--- a/adapters/tappx/tappxtest/exemplary/single-video-site.json
+++ b/adapters/tappx/tappxtest/exemplary/single-video-site.json
@@ -15,8 +15,7 @@
         "ext": {
           "bidder": {
             "tappxkey": "pub-12345-site-9876",
-            "endpoint": "VZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "endpoint": "VZ123456PS"
           }
         }
       }
@@ -39,7 +38,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://testing.ssp.tappx.com/rtb/v2/VZ123456PS?tappxkey=pub-12345-site-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://ssp.api.tappx.com/rtb/v2/VZ123456PS?tappxkey=pub-12345-site-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -56,7 +55,6 @@
               "ext": {
                 "bidder": {
                 "endpoint": "VZ123456PS",
-                "host": "testing.ssp.tappx.com/rtb/v2/",
                 "tappxkey": "pub-12345-site-9876"
                 }
               }
diff --git a/adapters/tappx/tappxtest/supplemental/204status.json b/adapters/tappx/tappxtest/supplemental/204status.json
index 918b278e..a0141616 100644
--- a/adapters/tappx/tappxtest/supplemental/204status.json
+++ b/adapters/tappx/tappxtest/supplemental/204status.json
@@ -12,8 +12,7 @@
         "ext": {
           "bidder": {
             "tappxkey": "pub-12345-android-9876",
-            "endpoint": "ZZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "endpoint": "ZZ123456PS"
           }
         }
       }
@@ -30,7 +29,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://testing.ssp.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://ssp.api.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -44,8 +43,7 @@
               "ext": {
                 "bidder": {
                   "tappxkey": "pub-12345-android-9876",
-                  "endpoint": "ZZ123456PS",
-                  "host": "testing.ssp.tappx.com/rtb/v2/"
+                  "endpoint": "ZZ123456PS"
                 }
               }
             }
diff --git a/adapters/tappx/tappxtest/supplemental/banner-impression-badhost.json b/adapters/tappx/tappxtest/supplemental/banner-impression-badhost.json
deleted file mode 100644
index 12f9c54a..00000000
--- a/adapters/tappx/tappxtest/supplemental/banner-impression-badhost.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
-  "mockBidRequest": {
-    "id": "0000000000001",
-    "imp": [
-      {
-        "id": "adunit-1",
-        "banner": {
-          "w": 300,
-          "h": 250
-        },
-        "ext": {
-          "bidder": {
-            "host": "example.ho%st.tappx.com",
-            "endpoint": "ZZ123456PS",
-            "tappxkey": "pub-12345-android-9876"
-          }
-        }
-      }
-    ],
-    "app": {
-      "id": "app_001",
-      "bundle": "com.rovio.angrybirds",
-      "publisher": {
-        "id": "2"
-      }
-    },
-    "user": {
-      "buyeruid": "A-38327932832"
-    }
-  },
-
-  "expectedMakeRequestsErrors": [
-    {
-      "value": "Malformed URL: parse (\\\")?http://example\\.ho%st\\.tappx.com(\\\")?: invalid URL escape \\\"%st\\\"",
-      "comparison": "regex"
-    }
-  ]
- 
-}
\ No newline at end of file
diff --git a/adapters/tappx/tappxtest/supplemental/banner-impression-noendpoint.json b/adapters/tappx/tappxtest/supplemental/banner-impression-noendpoint.json
index 85370b4b..48490b2d 100644
--- a/adapters/tappx/tappxtest/supplemental/banner-impression-noendpoint.json
+++ b/adapters/tappx/tappxtest/supplemental/banner-impression-noendpoint.json
@@ -10,8 +10,7 @@
         },
         "ext": {
           "bidder": {
-            "tappxkey": "pub-12345-android-9876",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "tappxkey": "pub-12345-android-9876"
           }
         }
       }
diff --git a/adapters/tappx/tappxtest/supplemental/banner-impression-nohost.json b/adapters/tappx/tappxtest/supplemental/banner-impression-nohost.json
deleted file mode 100644
index df650dde..00000000
--- a/adapters/tappx/tappxtest/supplemental/banner-impression-nohost.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-  "mockBidRequest": {
-    "id": "0000000000001",
-    "imp": [
-      {
-        "id": "adunit-1",
-        "banner": {
-          "w": 300,
-          "h": 250
-        },
-        "ext": {
-          "bidder": {
-            "endpoint": "ZZ123456PS",
-            "tappxkey": "pub-12345-android-9876"
-          }
-        }
-      }
-    ],
-    "app": {
-      "id": "app_001",
-      "bundle": "com.rovio.angrybirds",
-      "publisher": {
-        "id": "2"
-      }
-    },
-    "user": {
-      "buyeruid": "A-38327932832"
-    }
-  },
-
-  "expectedMakeRequestsErrors": [
-    {
-      "value": "Tappx host undefined",
-      "comparison": "literal"
-    }
-  ]
- 
-}
\ No newline at end of file
diff --git a/adapters/tappx/tappxtest/supplemental/banner-impression-nokey.json b/adapters/tappx/tappxtest/supplemental/banner-impression-nokey.json
index 4dba6d3b..a7211c40 100644
--- a/adapters/tappx/tappxtest/supplemental/banner-impression-nokey.json
+++ b/adapters/tappx/tappxtest/supplemental/banner-impression-nokey.json
@@ -10,8 +10,7 @@
         },
         "ext": {
           "bidder": {
-            "endpoint": "ZZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "endpoint": "ZZ123456PS"
           }
         }
       }
diff --git a/adapters/tappx/tappxtest/supplemental/bidfloor.json b/adapters/tappx/tappxtest/supplemental/bidfloor.json
index 3d3ced65..cc451d65 100644
--- a/adapters/tappx/tappxtest/supplemental/bidfloor.json
+++ b/adapters/tappx/tappxtest/supplemental/bidfloor.json
@@ -13,7 +13,6 @@
          "bidder": {
             "tappxkey": "pub-12345-android-9876",
             "endpoint": "ZZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/",
             "bidfloor": 1.5
           }
         }
@@ -34,7 +33,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://testing.ssp.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://ssp.api.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -50,7 +49,6 @@
                 "bidder": {
                   "tappxkey": "pub-12345-android-9876",
                   "endpoint": "ZZ123456PS",
-                 "host": "testing.ssp.tappx.com/rtb/v2/",
                  "bidfloor": 1.5
                 }
               }
diff --git a/adapters/tappx/tappxtest/supplemental/http-err-status.json b/adapters/tappx/tappxtest/supplemental/http-err-status.json
index f1783b3f..1798868b 100644
--- a/adapters/tappx/tappxtest/supplemental/http-err-status.json
+++ b/adapters/tappx/tappxtest/supplemental/http-err-status.json
@@ -12,8 +12,7 @@
         "ext": {
           "bidder": {
             "tappxkey": "pub-12345-android-9876",
-            "endpoint": "ZZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "endpoint": "ZZ123456PS"
           }
         }
       }
@@ -30,7 +29,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://testing.ssp.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://ssp.api.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -44,8 +43,7 @@
               "ext": {
                 "bidder": {
                   "tappxkey": "pub-12345-android-9876",
-                  "endpoint": "ZZ123456PS",
-                  "host": "testing.ssp.tappx.com/rtb/v2/"
+                  "endpoint": "ZZ123456PS"
                 }
               }
             }
diff --git a/adapters/tappx/tappxtest/supplemental/http-err-status2.json b/adapters/tappx/tappxtest/supplemental/http-err-status2.json
index 4b855c57..2d64cfe0 100644
--- a/adapters/tappx/tappxtest/supplemental/http-err-status2.json
+++ b/adapters/tappx/tappxtest/supplemental/http-err-status2.json
@@ -12,8 +12,7 @@
         "ext": {
           "bidder": {
             "tappxkey": "pub-12345-android-9876",
-            "endpoint": "ZZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "endpoint": "ZZ123456PS"
           }
         }
       }
@@ -30,7 +29,7 @@
   "httpCalls": [
     {
       "expectedRequest": {
-        "uri": "http://testing.ssp.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.3",
+        "uri": "http://ssp.api.tappx.com/rtb/v2/ZZ123456PS?tappxkey=pub-12345-android-9876&type_cnn=prebid&v=1.4",
         "body": {
           "id": "0000000000001",
           "test": 1,
@@ -44,8 +43,7 @@
               "ext": {
                 "bidder": {
                   "tappxkey": "pub-12345-android-9876",
-                  "endpoint": "ZZ123456PS",
-                  "host": "testing.ssp.tappx.com/rtb/v2/"
+                  "endpoint": "ZZ123456PS"
                 }
               }
             }
diff --git a/adapters/tappx/tappxtest/supplemental/wrong-imp-ext-1.json b/adapters/tappx/tappxtest/supplemental/wrong-imp-ext-1.json
index 1404204e..811623ad 100644
--- a/adapters/tappx/tappxtest/supplemental/wrong-imp-ext-1.json
+++ b/adapters/tappx/tappxtest/supplemental/wrong-imp-ext-1.json
@@ -11,8 +11,7 @@
         "ext": {
           "bidder": {
             "tappxkey": 1,
-            "endpoint": "ZZ123456PS",
-            "host": "testing.ssp.tappx.com/rtb/v2/"
+            "endpoint": "ZZ123456PS"
           }
         }
       }
diff --git a/endpoints/cookie_sync_test.go b/endpoints/cookie_sync_test.go
index 466618d8..8cbba3ec 100644
--- a/endpoints/cookie_sync_test.go
+++ b/endpoints/cookie_sync_test.go
@@ -1316,8 +1316,8 @@ func (m *MockGDPRPerms) BidderSyncAllowed(ctx context.Context, bidder openrtb_ex
 	return args.Bool(0), args.Error(1)
 }
 
-func (m *MockGDPRPerms) AuctionActivitiesAllowed(ctx context.Context, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal gdpr.Signal, consent string, weakVendorEnforcement bool) (allowBidReq bool, passGeo bool, passID bool, err error) {
-	args := m.Called(ctx, bidder, PublisherID, gdprSignal, consent, weakVendorEnforcement)
+func (m *MockGDPRPerms) AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal gdpr.Signal, consent string, weakVendorEnforcement bool, aliasGVLIDs map[string]uint16) (allowBidReq bool, passGeo bool, passID bool, err error) {
+	args := m.Called(ctx, bidderCoreName, bidder, PublisherID, gdprSignal, consent, weakVendorEnforcement, aliasGVLIDs)
 	return args.Bool(0), args.Bool(1), args.Bool(2), args.Error(3)
 }
 
diff --git a/endpoints/openrtb2/auction_test.go b/endpoints/openrtb2/auction_test.go
index 9b2bf1dd..288c6cb5 100644
--- a/endpoints/openrtb2/auction_test.go
+++ b/endpoints/openrtb2/auction_test.go
@@ -1539,6 +1539,68 @@ func TestValidateRequest(t *testing.T) {
 			givenIsAmp:        false,
 			expectedErrorList: []error{errors.New("ext.prebid.channel.name can't be empty")},
 		},
+		{
+			description: "AliasGVLID validation error",
+			givenRequestWrapper: &openrtb_ext.RequestWrapper{
+				BidRequest: &openrtb2.BidRequest{
+					ID:  "Some-ID",
+					App: &openrtb2.App{},
+					Imp: []openrtb2.Imp{
+						{
+							ID: "Some-Imp-ID",
+							Banner: &openrtb2.Banner{
+								Format: []openrtb2.Format{
+									{
+										W: 600,
+										H: 500,
+									},
+									{
+										W: 300,
+										H: 600,
+									},
+								},
+							},
+							Ext: []byte(`{"appnexus":{"placementId": 12345678}}`),
+						},
+					},
+					Ext: []byte(`{"prebid":{"aliases":{"brightroll":"appnexus"}, "aliasgvlids":{"pubmatic1":1}}}`),
+				},
+			},
+			givenIsAmp:            false,
+			expectedErrorList:     []error{errors.New("request.ext.prebid.aliasgvlids. vendorId 1 refers to unknown bidder alias: pubmatic1")},
+			expectedChannelObject: &openrtb_ext.ExtRequestPrebidChannel{Name: appChannel, Version: ""},
+		},
+		{
+			description: "AliasGVLID validation error as vendorID < 1",
+			givenRequestWrapper: &openrtb_ext.RequestWrapper{
+				BidRequest: &openrtb2.BidRequest{
+					ID:  "Some-ID",
+					App: &openrtb2.App{},
+					Imp: []openrtb2.Imp{
+						{
+							ID: "Some-Imp-ID",
+							Banner: &openrtb2.Banner{
+								Format: []openrtb2.Format{
+									{
+										W: 600,
+										H: 500,
+									},
+									{
+										W: 300,
+										H: 600,
+									},
+								},
+							},
+							Ext: []byte(`{"appnexus":{"placementId": 12345678}}`),
+						},
+					},
+					Ext: []byte(`{"prebid":{"aliases":{"brightroll":"appnexus"}, "aliasgvlids":{"brightroll":0}}}`),
+				},
+			},
+			givenIsAmp:            false,
+			expectedErrorList:     []error{errors.New("request.ext.prebid.aliasgvlids. Invalid vendorId 0 for alias: brightroll. Choose a different vendorId, or remove this entry.")},
+			expectedChannelObject: &openrtb_ext.ExtRequestPrebidChannel{Name: appChannel, Version: ""},
+		},
 		{
 			description: "No errors in bid request with request.ext.prebid but no channel info, expect validate request to throw no errors and fill channel with app",
 			givenRequestWrapper: &openrtb_ext.RequestWrapper{
@@ -1563,7 +1625,7 @@ func TestValidateRequest(t *testing.T) {
 							Ext: []byte(`{"appnexus":{"placementId": 12345678}}`),
 						},
 					},
-					Ext: []byte(`{"prebid":{}}`),
+					Ext: []byte(`{"prebid":{"aliases":{"brightroll":"appnexus"}, "aliasgvlids":{"brightroll":1}}}`),
 				},
 			},
 			givenIsAmp:            false,
diff --git a/endpoints/setuid_test.go b/endpoints/setuid_test.go
index 3388965f..bfefeb3b 100644
--- a/endpoints/setuid_test.go
+++ b/endpoints/setuid_test.go
@@ -573,7 +573,7 @@ func (g *mockPermsSetUID) BidderSyncAllowed(ctx context.Context, bidder openrtb_
 	return false, nil
 }
 
-func (g *mockPermsSetUID) AuctionActivitiesAllowed(ctx context.Context, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal gdpr.Signal, consent string, weakVendorEnforcement bool) (allowBidRequest bool, passGeo bool, passID bool, err error) {
+func (g *mockPermsSetUID) AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal gdpr.Signal, consent string, weakVendorEnforcement bool, aliasGVLIDs map[string]uint16) (allowBidReq bool, passGeo bool, passID bool, err error) {
 	return g.personalInfoAllowed, g.personalInfoAllowed, g.personalInfoAllowed, nil
 }
 
diff --git a/exchange/utils_test.go b/exchange/utils_test.go
index e250b65e..7ba3d4f5 100644
--- a/exchange/utils_test.go
+++ b/exchange/utils_test.go
@@ -35,7 +35,7 @@ func (p *permissionsMock) BidderSyncAllowed(ctx context.Context, bidder openrtb_
 	return true, nil
 }
 
-func (p *permissionsMock) AuctionActivitiesAllowed(ctx context.Context, bidder openrtb_ext.BidderName, PublisherID string, gdpr gdpr.Signal, consent string, weakVendorEnforcement bool) (allowBidRequest bool, passGeo bool, passID bool, err error) {
+func (p *permissionsMock) AuctionActivitiesAllowed(ctx context.Context, bidderCoreName openrtb_ext.BidderName, bidder openrtb_ext.BidderName, PublisherID string, gdprSignal gdpr.Signal, consent string, weakVendorEnforcement bool, aliasGVLIDs map[string]uint16) (allowBidRequest bool, passGeo bool, passID bool, err error) {
 	if p.allowAllBidders {
 		return true, p.passGeo, p.passID, p.activitiesError
 	}
@@ -2608,3 +2608,65 @@ func TestApplyFPD(t *testing.T) {
 		assert.Equal(t, testCase.expectedRequest, testCase.inputRequest, fmt.Sprintf("incorrect request after applying fpd, testcase %s", testCase.description))
 	}
 }
+
+func Test_parseAliasesGVLIDs(t *testing.T) {
+	type args struct {
+		orig *openrtb2.BidRequest
+	}
+	tests := []struct {
+		name      string
+		args      args
+		want      map[string]uint16
+		wantError bool
+	}{
+		{
+			"AliasGVLID Parsed Correctly",
+			args{
+				orig: &openrtb2.BidRequest{
+					Ext: json.RawMessage(`{"prebid":{"aliases":{"brightroll":"appnexus"}, "aliasgvlids":{"brightroll":1}}}`),
+				},
+			},
+			map[string]uint16{"brightroll": 1},
+			false,
+		},
+		{
+			"AliasGVLID parsing error",
+			args{
+				orig: &openrtb2.BidRequest{
+					Ext: json.RawMessage(`{"prebid":{"aliases":{"brightroll":"appnexus"}, "aliasgvlids": {"brightroll":"abc"}`),
+				},
+			},
+			nil,
+			true,
+		},
+		{
+			"Invalid AliasGVLID",
+			args{
+				orig: &openrtb2.BidRequest{
+					Ext: json.RawMessage(`{"prebid":{"aliases":{"brightroll":"appnexus"}, "aliasgvlids":"abc"}`),
+				},
+			},
+			nil,
+			true,
+		},
+		{
+			"Missing AliasGVLID",
+			args{
+				orig: &openrtb2.BidRequest{
+					Ext: json.RawMessage(`{"prebid":{"aliases":{"brightroll":"appnexus"}}`),
+				},
+			},
+			nil,
+			false,
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			got, err := parseAliasesGVLIDs(tt.args.orig)
+			assert.Equal(t, tt.want, got, "parseAliasesGVLIDs() got = %v, want %v", got, tt.want)
+			if !tt.wantError && err != nil {
+				t.Errorf("parseAliasesGVLIDs() expected error got nil")
+			}
+		})
+	}
+}
diff --git a/gdpr/impl_test.go b/gdpr/impl_test.go
index 9bdf7f85..f5bdbaf0 100644
--- a/gdpr/impl_test.go
+++ b/gdpr/impl_test.go
@@ -192,22 +192,26 @@ func TestMalformedConsent(t *testing.T) {
 
 func TestAllowActivities(t *testing.T) {
 	bidderAllowedByConsent := openrtb_ext.BidderAppnexus
+	aliasedBidderAllowedByConsent := openrtb_ext.BidderName("appnexus1")
 	bidderBlockedByConsent := openrtb_ext.BidderRubicon
 	vendor2AndPurpose2Consent := "CPGWbY_PGWbY_GYAAAENABCAAEAAAAAAAAAAACEAAAAA"
 
 	tests := []struct {
 		description           string
 		bidderName            openrtb_ext.BidderName
+		bidderCoreName        openrtb_ext.BidderName
 		publisherID           string
 		gdprDefaultValue      string
 		gdpr                  Signal
 		consent               string
 		passID                bool
 		weakVendorEnforcement bool
+		aliasGVLIDs           map[string]uint16
 	}{
 		{
 			description:      "Allow PI - Non standard publisher",
 			bidderName:       bidderBlockedByConsent,
+			bidderCoreName:   bidderBlockedByConsent,
 			publisherID:      "appNexusAppID",
 			gdprDefaultValue: "1",
 			gdpr:             SignalYes,
@@ -217,6 +221,7 @@ func TestAllowActivities(t *testing.T) {
 		{
 			description:      "Allow PI - known vendor with No GDPR",
 			bidderName:       bidderBlockedByConsent,
+			bidderCoreName:   bidderBlockedByConsent,
 			gdprDefaultValue: "1",
 			gdpr:             SignalNo,
 			consent:          vendor2AndPurpose2Consent,
@@ -225,14 +230,36 @@ func TestAllowActivities(t *testing.T) {
 		{
 			description:      "Allow PI - known vendor with Yes GDPR",
 			bidderName:       bidderAllowedByConsent,
+			bidderCoreName:   bidderAllowedByConsent,
 			gdprDefaultValue: "1",
 			gdpr:             SignalYes,
 			consent:          vendor2AndPurpose2Consent,
 			passID:           true,
 		},
+		{
+			description:      "Allow PI - known Alias vendor GVLID with Yes GDPR",
+			bidderName:       aliasedBidderAllowedByConsent,
+			bidderCoreName:   bidderAllowedByConsent,
+			gdprDefaultValue: "1",
+			gdpr:             SignalYes,
+			consent:          vendor2AndPurpose2Consent,
+			passID:           true,
+			aliasGVLIDs:      map[string]uint16{"appnexus1": 2},
+		},
+		{
+			description:      "Don't allow PI - known alias vendor with Yes GDPR, alias vendor does not consent to purpose 2",
+			bidderName:       aliasedBidderAllowedByConsent,
+			bidderCoreName:   bidderAllowedByConsent,
+			gdprDefaultValue: "1",
+			gdpr:             SignalYes,
+			consent:          vendor2AndPurpose2Consent,
+			passID:           false,
+			aliasGVLIDs:      map[string]uint16{"appnexus1": 1},
+		},
 		{
 			description:      "PI allowed according to host setting gdprDefaultValue 0 - known vendor with ambiguous GDPR and empty consent",
 			bidderName:       bidderAllowedByConsent,
+			bidderCoreName:   bidderAllowedByConsent,
 			gdprDefaultValue: "0",
 			gdpr:             SignalAmbiguous,
 			consent:          "",
@@ -241,6 +268,7 @@ func TestAllowActivities(t *testing.T) {
 		{
 			description:      "PI allowed according to host setting gdprDefaultValue 0 - known vendor with ambiguous GDPR and non-empty consent",
 			bidderName:       bidderAllowedByConsent,
+			bidderCoreName:   bidderAllowedByConsent,
 			gdprDefaultValue: "0",
 			gdpr:             SignalAmbiguous,
 			consent:          vendor2AndPurpose2Consent,
@@ -249,6 +277,7 @@ func TestAllowActivities(t *testing.T) {
 		{
 			description:      "PI allowed according to host setting gdprDefaultValue 1 - known vendor with ambiguous GDPR and empty consent",
 			bidderName:       bidderAllowedByConsent,
+			bidderCoreName:   bidderAllowedByConsent,
 			gdprDefaultValue: "1",
 			gdpr:             SignalAmbiguous,
 			consent:          "",
@@ -257,6 +286,7 @@ func TestAllowActivities(t *testing.T) {
 		{
 			description:      "PI allowed according to host setting gdprDefaultValue 1 - known vendor with ambiguous GDPR and non-empty consent",
 			bidderName:       bidderAllowedByConsent,
+			bidderCoreName:   bidderAllowedByConsent,
 			gdprDefaultValue: "1",
 			gdpr:             SignalAmbiguous,
 			consent:          vendor2AndPurpose2Consent,
@@ -265,6 +295,7 @@ func TestAllowActivities(t *testing.T) {
 		{
 			description:      "Don't allow PI - known vendor with Yes GDPR and empty consent",
 			bidderName:       bidderAllowedByConsent,
+			bidderCoreName:   bidderAllowedByConsent,
 			gdprDefaultValue: "1",
 			gdpr:             SignalYes,
 			consent:          "",
@@ -273,6 +304,7 @@ func TestAllowActivities(t *testing.T) {
 		{
 			description:      "Don't allow PI - default vendor with Yes GDPR and non-empty consent",
 			bidderName:       bidderBlockedByConsent,
+			bidderCoreName:   bidderBlockedByConsent,
 			gdprDefaultValue: "1",
 			gdpr:             SignalYes,
 			consent:          vendor2AndPurpose2Consent,
@@ -322,7 +354,7 @@ func TestAllowActivities(t *testing.T) {
 			perms.gdprDefaultValue = SignalYes
 		}
 
-		_, _, passID, err := perms.AuctionActivitiesAllowed(context.Background(), tt.bidderName, tt.publisherID, tt.gdpr, tt.consent, tt.weakVendorEnforcement)
+		_, _, passID, err := perms.AuctionActivitiesAllowed(context.Background(), tt.bidderCoreName, tt.bidderName, tt.publisherID, tt.gdpr, tt.consent, tt.weakVendorEnforcement, tt.aliasGVLIDs)
 
 		assert.Nil(t, err, tt.description)
 		assert.Equal(t, tt.passID, passID, tt.description)
@@ -411,6 +443,8 @@ type testDef struct {
 	passGeo               bool
 	passID                bool
 	weakVendorEnforcement bool
+	bidderCoreName        openrtb_ext.BidderName
+	aliasGVLIDs           map[string]uint16
 }
 
 func TestAllowActivitiesGeoAndID(t *testing.T) {
@@ -434,16 +468,28 @@ func TestAllowActivitiesGeoAndID(t *testing.T) {
 	// COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA : full consents to purposes and vendors 2, 6, 8 and special feature 1 opt-in
 	testDefs := []testDef{
 		{
-			description: "Appnexus vendor test, insufficient purposes claimed",
-			bidder:      openrtb_ext.BidderAppnexus,
-			consent:     "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
-			allowBid:    false,
-			passGeo:     false,
-			passID:      false,
+			description:    "Appnexus vendor test, insufficient purposes claimed",
+			bidder:         openrtb_ext.BidderAppnexus,
+			bidderCoreName: openrtb_ext.BidderAppnexus,
+			consent:        "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
+			allowBid:       false,
+			passGeo:        false,
+			passID:         false,
+		},
+		{
+			description:    "Pubmatic Alias vendor test, insufficient purposes claimed",
+			bidder:         "pubmatic1",
+			bidderCoreName: openrtb_ext.BidderPubmatic,
+			consent:        "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
+			allowBid:       false,
+			passGeo:        false,
+			passID:         false,
+			aliasGVLIDs:    map[string]uint16{"pubmatic1": 1},
 		},
 		{
 			description:           "Appnexus vendor test, insufficient purposes claimed, basic enforcement",
 			bidder:                openrtb_ext.BidderAppnexus,
+			bidderCoreName:        openrtb_ext.BidderAppnexus,
 			consent:               "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
 			allowBid:              true,
 			passGeo:               true,
@@ -453,6 +499,7 @@ func TestAllowActivitiesGeoAndID(t *testing.T) {
 		{
 			description:           "Unknown vendor test, insufficient purposes claimed, basic enforcement",
 			bidder:                openrtb_ext.BidderAudienceNetwork,
+			bidderCoreName:        openrtb_ext.BidderAudienceNetwork,
 			consent:               "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
 			allowBid:              true,
 			passGeo:               true,
@@ -460,36 +507,49 @@ func TestAllowActivitiesGeoAndID(t *testing.T) {
 			weakVendorEnforcement: true,
 		},
 		{
-			description: "Pubmatic vendor test, flex purposes claimed",
-			bidder:      openrtb_ext.BidderPubmatic,
-			consent:     "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
-			allowBid:    true,
-			passGeo:     true,
-			passID:      true,
+			description:    "Pubmatic vendor test, flex purposes claimed",
+			bidder:         openrtb_ext.BidderPubmatic,
+			bidderCoreName: openrtb_ext.BidderPubmatic,
+			consent:        "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
+			allowBid:       true,
+			passGeo:        true,
+			passID:         true,
+		},
+		{
+			description:    "Pubmatic Alias vendor test, flex purposes claimed",
+			bidder:         "pubmatic1",
+			bidderCoreName: openrtb_ext.BidderPubmatic,
+			consent:        "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
+			allowBid:       true,
+			passGeo:        true,
+			passID:         true,
+			aliasGVLIDs:    map[string]uint16{"pubmatic1": 6},
 		},
 		{
-			description: "Rubicon vendor test, Specific purposes/LIs claimed, no geo claimed",
-			bidder:      openrtb_ext.BidderRubicon,
-			consent:     "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
-			allowBid:    true,
-			passGeo:     false,
-			passID:      true,
+			description:    "Rubicon vendor test, Specific purposes/LIs claimed, no geo claimed",
+			bidder:         openrtb_ext.BidderRubicon,
+			bidderCoreName: openrtb_ext.BidderRubicon,
+			consent:        "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA",
+			allowBid:       true,
+			passGeo:        false,
+			passID:         true,
 		},
 		{
 			// This requires publisher restrictions on any claimed purposes, 2-10. Vendor must declare all claimed purposes
 			// as flex with legit interest as primary.
 			// Using vendor 20 for this.
-			description: "OpenX vendor test, Specific purposes/LIs claimed, no geo claimed, Publisher restrictions apply",
-			bidder:      openrtb_ext.BidderOpenx,
-			consent:     "CPAavcCPAavcCAGABCFRBKCsAP_AAH_AAAqIHFNf_X_fb3_j-_59_9t0eY1f9_7_v-0zjgeds-8Nyd_X_L8X5mM7vB36pq4KuR4Eu3LBAQdlHOHcTUmw6IkVqTPsbk2Mr7NKJ7PEinMbe2dYGH9_n9XT_ZKY79_____7__-_____7_f__-__3_vp9V---wOJAIMBAUAgAEMAAQIFCIQAAQhiQAAAABBCIBQJIAEqgAWVwEdoIEACAxAQgQAgBBQgwCAAQAAJKAgBACwQCAAiAQAAgAEAIAAEIAILACQEAAAEAJCAAiACECAgiAAg5DAgIgCCAFABAAAuJDACAMooASBAPGQGAAKAAqACGAEwALgAjgBlgDUAHZAPsA_ACMAFLAK2AbwBMQCbAFogLYAYEAw8BkQDOQGeAM-EQHwAVABWAC4AIYAZAAywBqADZAHYAPwAgABGAClgFPANYAdUA-QCGwEOgIvASIAmwBOwCkQFyAMCAYSAw8Bk4DOQGfCQAYADgBzgN_CQTgAEAALgAoACoAGQAOAAeABAACIAFQAMIAaABqADyAIYAigBMgCqAKwAWAAuABvADmAHoAQ0AiACJgEsAS4AmgBSgC3AGGAMgAZcA1ADVAGyAO8AewA-IB9gH6AQAAjABQQClgFPAL8AYoA1gBtADcAG8AOIAegA-QCGwEOgIqAReAkQBMQCZQE2AJ2AUOApEBYoC2AFyALvAYEAwYBhIDDQGHgMiAZIAycBlwDOQGfANIAadA1gDWQoAEAYQaBIACoAKwAXABDADIAGWANQAbIA7AB-AEAAIKARgApYBT4C0ALSAawA3gB1QD5AIbAQ6Ai8BIgCbAE7AKRAXIAwIBhIDDwGMAMnAZyAzwBnwcAEAA4Bv4qA2ABQAFQAQwAmABcAEcAMsAagA7AB-AEYAKXAWgBaQDeAJBATEAmwBTYC2AFyAMCAYeAyIBnIDPAGfANyHQWQAFwAUABUADIAHAAQAAiABdADAAMYAaABqADwAH0AQwBFACZAFUAVgAsABcADEAGYAN4AcwA9ACGAERAJYAmABNACjAFKALEAW4AwwBkADKAGiANQAbIA3wB3gD2gH2AfoBGACVAFBAKeAWKAtAC0gFzALyAX4AxQBuADiQHTAdQA9ACGwEOgIiAReAkEBIgCbAE7AKHAU0AqwBYsC2ALZAXAAuQBdoC7wGEgMNAYeAxIBjADHgGSAMnAZUAywBlwDOQGfANEgaQBpIDSwGnANYAbGPABAIqAb-QgZgALAAoABkAEQALgAYgBDACYAFUALgAYgAzABvAD0AI4AWIAygBqADfAHfAPsA_ACMAFBAKGAU-AtAC0gF-AMUAdQA9ACQQEiAJsAU0AsUBaMC2ALaAXAAuQBdoDDwGJAMiAZOAzkBngDPgGiANJAaWA4AlAyAAQAAsACgAGQAOAAigBgAGIAPAAiABMACqAFwAMQAZgA2gCGgEQARIAowBSgC3AGEAMoAaoA2QB3gD8AIwAU-AtAC0gGKANwAcQA6gCHQEXgJEATYAsUBbAC7QGHgMiAZOAywBnIDPAGfANIAawA4AmACARUA38pBBAAXABQAFQAMgAcABAACKAGAAYwA0ADUAHkAQwBFACYAFIAKoAWAAuABiADMAHMAQwAiABRgClAFiALcAZQA0QBqgDZAHfAPsA_ACMAFBAKGAVsAuYBeQDaAG4APQAh0BF4CRAE2AJ2AUOApoBWwCxQFsALgAXIAu0BhoDDwGMAMiAZIAycBlwDOQGeAM-gaQBpMDWANZAbGVABAA-Ab-A.YAAAAAAAAAAA",
-			allowBid:    true,
-			passGeo:     false,
-			passID:      true,
+			description:    "OpenX vendor test, Specific purposes/LIs claimed, no geo claimed, Publisher restrictions apply",
+			bidder:         openrtb_ext.BidderOpenx,
+			bidderCoreName: openrtb_ext.BidderOpenx,
+			consent:        "CPAavcCPAavcCAGABCFRBKCsAP_AAH_AAAqIHFNf_X_fb3_j-_59_9t0eY1f9_7_v-0zjgeds-8Nyd_X_L8X5mM7vB36pq4KuR4Eu3LBAQdlHOHcTUmw6IkVqTPsbk2Mr7NKJ7PEinMbe2dYGH9_n9XT_ZKY79_____7__-_____7_f__-__3_vp9V---wOJAIMBAUAgAEMAAQIFCIQAAQhiQAAAABBCIBQJIAEqgAWVwEdoIEACAxAQgQAgBBQgwCAAQAAJKAgBACwQCAAiAQAAgAEAIAAEIAILACQEAAAEAJCAAiACECAgiAAg5DAgIgCCAFABAAAuJDACAMooASBAPGQGAAKAAqACGAEwALgAjgBlgDUAHZAPsA_ACMAFLAK2AbwBMQCbAFogLYAYEAw8BkQDOQGeAM-EQHwAVABWAC4AIYAZAAywBqADZAHYAPwAgABGAClgFPANYAdUA-QCGwEOgIvASIAmwBOwCkQFyAMCAYSAw8Bk4DOQGfCQAYADgBzgN_CQTgAEAALgAoACoAGQAOAAeABAACIAFQAMIAaABqADyAIYAigBMgCqAKwAWAAuABvADmAHoAQ0AiACJgEsAS4AmgBSgC3AGGAMgAZcA1ADVAGyAO8AewA-IB9gH6AQAAjABQQClgFPAL8AYoA1gBtADcAG8AOIAegA-QCGwEOgIqAReAkQBMQCZQE2AJ2AUOApEBYoC2AFyALvAYEAwYBhIDDQGHgMiAZIAycBlwDOQGfANIAadA1gDWQoAEAYQaBIACoAKwAXABDADIAGWANQAbIA7AB-AEAAIKARgApYBT4C0ALSAawA3gB1QD5AIbAQ6Ai8BIgCbAE7AKRAXIAwIBhIDDwGMAMnAZyAzwBnwcAEAA4Bv4qA2ABQAFQAQwAmABcAEcAMsAagA7AB-AEYAKXAWgBaQDeAJBATEAmwBTYC2AFyAMCAYeAyIBnIDPAGfANyHQWQAFwAUABUADIAHAAQAAiABdADAAMYAaABqADwAH0AQwBFACZAFUAVgAsABcADEAGYAN4AcwA9ACGAERAJYAmABNACjAFKALEAW4AwwBkADKAGiANQAbIA3wB3gD2gH2AfoBGACVAFBAKeAWKAtAC0gFzALyAX4AxQBuADiQHTAdQA9ACGwEOgIiAReAkEBIgCbAE7AKHAU0AqwBYsC2ALZAXAAuQBdoC7wGEgMNAYeAxIBjADHgGSAMnAZUAywBlwDOQGfANEgaQBpIDSwGnANYAbGPABAIqAb-QgZgALAAoABkAEQALgAYgBDACYAFUALgAYgAzABvAD0AI4AWIAygBqADfAHfAPsA_ACMAFBAKGAU-AtAC0gF-AMUAdQA9ACQQEiAJsAU0AsUBaMC2ALaAXAAuQBdoDDwGJAMiAZOAzkBngDPgGiANJAaWA4AlAyAAQAAsACgAGQAOAAigBgAGIAPAAiABMACqAFwAMQAZgA2gCGgEQARIAowBSgC3AGEAMoAaoA2QB3gD8AIwAU-AtAC0gGKANwAcQA6gCHQEXgJEATYAsUBbAC7QGHgMiAZOAywBnIDPAGfANIAawA4AmACARUA38pBBAAXABQAFQAMgAcABAACKAGAAYwA0ADUAHkAQwBFACYAFIAKoAWAAuABiADMAHMAQwAiABRgClAFiALcAZQA0QBqgDZAHfAPsA_ACMAFBAKGAVsAuYBeQDaAG4APQAh0BF4CRAE2AJ2AUOApoBWwCxQFsALgAXIAu0BhoDDwGMAMiAZIAycBlwDOQGeAM-gaQBpMDWANZAbGVABAA-Ab-A.YAAAAAAAAAAA",
+			allowBid:       true,
+			passGeo:        false,
+			passID:         true,
 		},
 	}
 
 	for _, td := range testDefs {
-		allowBid, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), td.bidder, "", SignalYes, td.consent, td.weakVendorEnforcement)
+		allowBid, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), td.bidderCoreName, td.bidder, "", SignalYes, td.consent, td.weakVendorEnforcement, td.aliasGVLIDs)
 		assert.NoErrorf(t, err, "Error processing AuctionActivitiesAllowed for %s", td.description)
 		assert.EqualValuesf(t, td.allowBid, allowBid, "AllowBid failure on %s", td.description)
 		assert.EqualValuesf(t, td.passGeo, passGeo, "PassGeo failure on %s", td.description)
@@ -514,7 +574,7 @@ func TestAllowActivitiesWhitelist(t *testing.T) {
 
 	// Assert that an item that otherwise would not be allowed PI access, gets approved because it is found in the GDPR.NonStandardPublishers array
 	perms.cfg.NonStandardPublisherMap = map[string]struct{}{"appNexusAppID": {}}
-	_, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), openrtb_ext.BidderAppnexus, "appNexusAppID", SignalYes, "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA", false)
+	_, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), openrtb_ext.BidderAppnexus, openrtb_ext.BidderAppnexus, "appNexusAppID", SignalYes, "COzTVhaOzTVhaGvAAAENAiCIAP_AAH_AAAAAAEEUACCKAAA", false, map[string]uint16{})
 	assert.NoErrorf(t, err, "Error processing AuctionActivitiesAllowed")
 	assert.EqualValuesf(t, true, passGeo, "PassGeo failure")
 	assert.EqualValuesf(t, true, passID, "PassID failure")
@@ -539,30 +599,45 @@ func TestAllowActivitiesPubRestrict(t *testing.T) {
 	// Pub restriction on purpose 7, consent only ... no allowPI will pass, no special feature 1 consent
 	testDefs := []testDef{
 		{
-			description: "Appnexus vendor test, insufficient purposes claimed",
-			bidder:      openrtb_ext.BidderAppnexus,
-			consent:     "COwAdDhOwAdDhN4ABAENAPCgAAQAAv___wAAAFP_AAp_4AI6ACACAA",
-			passGeo:     false,
-			passID:      false,
+			description:    "Appnexus vendor test, insufficient purposes claimed",
+			bidder:         openrtb_ext.BidderAppnexus,
+			bidderCoreName: openrtb_ext.BidderAppnexus,
+			consent:        "COwAdDhOwAdDhN4ABAENAPCgAAQAAv___wAAAFP_AAp_4AI6ACACAA",
+			passGeo:        false,
+			passID:         false,
+			aliasGVLIDs:    map[string]uint16{},
+		},
+		{
+			description:    "Pubmatic vendor test, flex purposes claimed",
+			bidder:         openrtb_ext.BidderPubmatic,
+			bidderCoreName: openrtb_ext.BidderPubmatic,
+			consent:        "COwAdDhOwAdDhN4ABAENAPCgAAQAAv___wAAAFP_AAp_4AI6ACACAA",
+			passGeo:        false,
+			passID:         false,
+			aliasGVLIDs:    map[string]uint16{},
 		},
 		{
-			description: "Pubmatic vendor test, flex purposes claimed",
-			bidder:      openrtb_ext.BidderPubmatic,
-			consent:     "COwAdDhOwAdDhN4ABAENAPCgAAQAAv___wAAAFP_AAp_4AI6ACACAA",
-			passGeo:     false,
-			passID:      false,
+			description:    "Pubmatic Alias vendor test, flex purposes claimed",
+			bidder:         "pubmatic1",
+			bidderCoreName: openrtb_ext.BidderPubmatic,
+			consent:        "COwAdDhOwAdDhN4ABAENAPCgAAQAAv___wAAAFP_AAp_4AI6ACACAA",
+			passGeo:        false,
+			passID:         false,
+			aliasGVLIDs:    map[string]uint16{"pubmatic1": 32},
 		},
 		{
-			description: "Rubicon vendor test, Specific purposes/LIs claimed, no geo claimed",
-			bidder:      openrtb_ext.BidderRubicon,
-			consent:     "COwAdDhOwAdDhN4ABAENAPCgAAQAAv___wAAAFP_AAp_4AI6ACACAA",
-			passGeo:     false,
-			passID:      true,
+			description:    "Rubicon vendor test, Specific purposes/LIs claimed, no geo claimed",
+			bidder:         openrtb_ext.BidderRubicon,
+			bidderCoreName: openrtb_ext.BidderRubicon,
+			consent:        "COwAdDhOwAdDhN4ABAENAPCgAAQAAv___wAAAFP_AAp_4AI6ACACAA",
+			passGeo:        false,
+			passID:         true,
+			aliasGVLIDs:    map[string]uint16{},
 		},
 	}
 
 	for _, td := range testDefs {
-		_, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), td.bidder, "", SignalYes, td.consent, td.weakVendorEnforcement)
+		_, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), td.bidderCoreName, td.bidder, "", SignalYes, td.consent, td.weakVendorEnforcement, td.aliasGVLIDs)
 		assert.NoErrorf(t, err, "Error processing AuctionActivitiesAllowed for %s", td.description)
 		assert.EqualValuesf(t, td.passGeo, passGeo, "PassGeo failure on %s", td.description)
 		assert.EqualValuesf(t, td.passID, passID, "PassID failure on %s", td.description)
@@ -710,27 +785,55 @@ func TestAllowActivitiesBidRequests(t *testing.T) {
 		purpose2EnforcePurpose string
 		purpose2EnforceVendors bool
 		bidder                 openrtb_ext.BidderName
+		bidderCoreName         openrtb_ext.BidderName
 		consent                string
 		allowBid               bool
 		passGeo                bool
 		passID                 bool
 		weakVendorEnforcement  bool
+		aliasGVLIDs            map[string]uint16
 	}{
 		{
 			description:            "Bid blocked - p2 enabled, user consents to p2 but not vendor, vendor consents to p2",
 			purpose2EnforcePurpose: config.TCF2FullEnforcement,
 			purpose2EnforceVendors: true,
 			bidder:                 openrtb_ext.BidderPubmatic,
+			bidderCoreName:         openrtb_ext.BidderPubmatic,
 			consent:                purpose2ConsentWithoutVendorConsent,
 			allowBid:               false,
 			passGeo:                false,
 			passID:                 false,
 		},
+		{
+			description:            "Bid allowed - p2 enabled, user consents to p2 and vendor, alias vendor consents to p2",
+			purpose2EnforcePurpose: config.TCF2FullEnforcement,
+			purpose2EnforceVendors: true,
+			bidder:                 "pubmatic1",
+			bidderCoreName:         openrtb_ext.BidderPubmatic,
+			consent:                purpose2AndVendorConsent,
+			allowBid:               true,
+			passGeo:                false,
+			passID:                 true,
+			aliasGVLIDs:            map[string]uint16{"pubmatic1": 6},
+		},
+		{
+			description:            "Bid blocked - p2 enabled, user consents to p2 and vendor, alias vendor does not consent to p2",
+			purpose2EnforcePurpose: config.TCF2FullEnforcement,
+			purpose2EnforceVendors: true,
+			bidder:                 "pubmatic1",
+			bidderCoreName:         openrtb_ext.BidderPubmatic,
+			consent:                purpose2AndVendorConsent,
+			allowBid:               false,
+			passGeo:                false,
+			passID:                 false,
+			aliasGVLIDs:            map[string]uint16{"pubmatic1": 1},
+		},
 		{
 			description:            "Bid allowed - p2 enabled not enforcing vendors, user consents to p2 but not vendor, vendor consents to p2",
 			purpose2EnforcePurpose: config.TCF2FullEnforcement,
 			purpose2EnforceVendors: false,
 			bidder:                 openrtb_ext.BidderPubmatic,
+			bidderCoreName:         openrtb_ext.BidderPubmatic,
 			consent:                purpose2ConsentWithoutVendorConsent,
 			allowBid:               true,
 			passGeo:                false,
@@ -741,6 +844,7 @@ func TestAllowActivitiesBidRequests(t *testing.T) {
 			purpose2EnforcePurpose: config.TCF2NoEnforcement,
 			purpose2EnforceVendors: true,
 			bidder:                 openrtb_ext.BidderPubmatic,
+			bidderCoreName:         openrtb_ext.BidderPubmatic,
 			consent:                purpose2ConsentWithoutVendorConsent,
 			allowBid:               true,
 			passGeo:                false,
@@ -751,6 +855,7 @@ func TestAllowActivitiesBidRequests(t *testing.T) {
 			purpose2EnforcePurpose: config.TCF2FullEnforcement,
 			purpose2EnforceVendors: true,
 			bidder:                 openrtb_ext.BidderPubmatic,
+			bidderCoreName:         openrtb_ext.BidderPubmatic,
 			consent:                purpose2AndVendorConsent,
 			allowBid:               true,
 			passGeo:                false,
@@ -761,6 +866,7 @@ func TestAllowActivitiesBidRequests(t *testing.T) {
 			purpose2EnforcePurpose: config.TCF2FullEnforcement,
 			purpose2EnforceVendors: true,
 			bidder:                 openrtb_ext.BidderRubicon,
+			bidderCoreName:         openrtb_ext.BidderRubicon,
 			consent:                purpose2LIWithoutVendorLI,
 			allowBid:               false,
 			passGeo:                false,
@@ -771,6 +877,7 @@ func TestAllowActivitiesBidRequests(t *testing.T) {
 			purpose2EnforcePurpose: config.TCF2FullEnforcement,
 			purpose2EnforceVendors: true,
 			bidder:                 openrtb_ext.BidderRubicon,
+			bidderCoreName:         openrtb_ext.BidderRubicon,
 			consent:                purpose2AndVendorLI,
 			allowBid:               true,
 			passGeo:                false,
@@ -781,6 +888,7 @@ func TestAllowActivitiesBidRequests(t *testing.T) {
 			purpose2EnforcePurpose: config.TCF2FullEnforcement,
 			purpose2EnforceVendors: false,
 			bidder:                 openrtb_ext.BidderPubmatic,
+			bidderCoreName:         openrtb_ext.BidderPubmatic,
 			consent:                purpose2AndVendorLI,
 			allowBid:               true,
 			passGeo:                false,
@@ -807,7 +915,7 @@ func TestAllowActivitiesBidRequests(t *testing.T) {
 		p2Config.EnforceVendors = td.purpose2EnforceVendors
 		perms.purposeConfigs[consentconstants.Purpose(2)] = p2Config
 
-		allowBid, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), td.bidder, "", SignalYes, td.consent, td.weakVendorEnforcement)
+		allowBid, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), td.bidderCoreName, td.bidder, "", SignalYes, td.consent, td.weakVendorEnforcement, td.aliasGVLIDs)
 		assert.NoErrorf(t, err, "Error processing AuctionActivitiesAllowed for %s", td.description)
 		assert.EqualValuesf(t, td.allowBid, allowBid, "AllowBid failure on %s", td.description)
 		assert.EqualValuesf(t, td.passGeo, passGeo, "PassGeo failure on %s", td.description)
@@ -825,7 +933,7 @@ func TestTCF1Consent(t *testing.T) {
 		},
 	}
 
-	bidReq, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), bidderAllowedByConsent, "", SignalYes, tcf1Consent, false)
+	bidReq, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), bidderAllowedByConsent, bidderAllowedByConsent, "", SignalYes, tcf1Consent, false, map[string]uint16{})
 
 	assert.Nil(t, err, "TCF1 consent - no error returned")
 	assert.Equal(t, false, bidReq, "TCF1 consent - bid request not allowed")
@@ -846,11 +954,13 @@ func TestAllowActivitiesVendorException(t *testing.T) {
 		allowBid              bool
 		passGeo               bool
 		passID                bool
+		bidderCoreName        openrtb_ext.BidderName
 	}{
 		{
 			description:          "Bid/ID blocked by publisher - p2 enabled with p2 vendor exception, pub restricts p2 for vendor",
 			p2VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderAppnexus: {}},
 			bidder:               openrtb_ext.BidderAppnexus,
+			bidderCoreName:       openrtb_ext.BidderAppnexus,
 			consent:              noPurposeOrVendorConsentAndPubRestrictsP2,
 			allowBid:             false,
 			passGeo:              false,
@@ -861,6 +971,7 @@ func TestAllowActivitiesVendorException(t *testing.T) {
 			p2VendorExceptionMap:  map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderAppnexus: {}},
 			sf1VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 			bidder:                openrtb_ext.BidderAppnexus,
+			bidderCoreName:        openrtb_ext.BidderAppnexus,
 			consent:               noPurposeOrVendorConsentAndPubRestrictsNone,
 			allowBid:              true,
 			passGeo:               false,
@@ -871,6 +982,7 @@ func TestAllowActivitiesVendorException(t *testing.T) {
 			p2VendorExceptionMap:  map[openrtb_ext.BidderName]struct{}{},
 			sf1VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{},
 			bidder:                openrtb_ext.BidderAppnexus,
+			bidderCoreName:        openrtb_ext.BidderAppnexus,
 			consent:               noPurposeOrVendorConsentAndPubRestrictsNone,
 			allowBid:              false,
 			passGeo:               false,
@@ -881,6 +993,7 @@ func TestAllowActivitiesVendorException(t *testing.T) {
 			p2VendorExceptionMap:  map[openrtb_ext.BidderName]struct{}{},
 			sf1VendorExceptionMap: map[openrtb_ext.BidderName]struct{}{openrtb_ext.BidderAppnexus: {}},
 			bidder:                openrtb_ext.BidderAppnexus,
+			bidderCoreName:        openrtb_ext.BidderAppnexus,
 			consent:               noPurposeOrVendorConsentAndPubRestrictsNone,
 			allowBid:              false,
 			passGeo:               true,
@@ -913,7 +1026,7 @@ func TestAllowActivitiesVendorException(t *testing.T) {
 			consentconstants.Purpose(3): perms.cfg.TCF2.Purpose3,
 		}
 
-		allowBid, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), td.bidder, "", SignalYes, td.consent, false)
+		allowBid, passGeo, passID, err := perms.AuctionActivitiesAllowed(context.Background(), td.bidderCoreName, td.bidder, "", SignalYes, td.consent, false, map[string]uint16{})
 		assert.NoErrorf(t, err, "Error processing AuctionActivitiesAllowed for %s", td.description)
 		assert.EqualValuesf(t, td.allowBid, allowBid, "AllowBid failure on %s", td.description)
 		assert.EqualValuesf(t, td.passGeo, passGeo, "PassGeo failure on %s", td.description)