Repository: prebid/prebid-server
Pull request #2140 (2022-01-24 17:07:37)

Update Some Dependencies
**github.com/coocood/freecache**
Was 2 releases behind. Release notes indicate a small number of bug fixes and new features.

**github.com/gofrs/uuid** (Highest Risk In This PR)
Was 5 releases behind. Release notes indicate new fmt.Formatter support, some changes to error message strings, and the removal of UUID V2. Do we rely on UUID v2? 

**github.com/golang/glog**
Was 1 release behind with the only difference being added support for Go Modules.

**github.com/mxmCherry/openrtb**
Was 1 release behind which the release notes describe as "Basically this is a housekeeping/info release, no code changes."


Patch:
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/endpoints/openrtb2/auction.go b/endpoints/openrtb2/auction.go
index 3f0a35e8..12ebf413 100644
--- a/endpoints/openrtb2/auction.go
+++ b/endpoints/openrtb2/auction.go
@@ -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/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/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..e36e5c35 100644
--- a/go.mod
+++ b/go.mod
@@ -8,19 +8,18 @@ require (
 	github.com/OneOfOne/xxhash v1.2.5 // indirect
 	github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf
 	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/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
diff --git a/go.sum b/go.sum
index 0bbfb4e9..84dba290 100644
--- a/go.sum
+++ b/go.sum
@@ -43,6 +43,7 @@ github.com/DATA-DOG/go-sqlmock v1.3.0 h1:ljjRxlddjfChBJdFKJs5LuCwCWPLaC1UZLwAo3P
 github.com/DATA-DOG/go-sqlmock v1.3.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=
@@ -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=
@@ -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=
@@ -266,6 +268,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
 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=
@@ -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/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-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/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)