Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebid server 0.138.0 fix #99

Merged
merged 269 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
269 commits
Select commit Hold shift + click to select a range
2e80651
Adding copying of gdpr consent string to openrtb bid request (#1189)
camrice Mar 3, 2020
c6919ee
fix conversant sync pixel (#1208)
johnwier Mar 4, 2020
f03dfa5
openx adapter: forward bid response currency in openx adapter if set …
SyntaxNode Mar 4, 2020
8686f03
add ucfunnel adapter (#1192)
guscarreon Mar 5, 2020
199d1dc
Update required params for TheMediaGrid adapter (#1188)
TheMediaGrid Mar 9, 2020
5a9da66
add zeroclickfraud adapter (#1207)
htang555 Mar 12, 2020
8668dfc
Fix Adform's parameters regex (#1214)
vstatkevich Mar 12, 2020
c515816
If Device.UA is not present in request body, init it with user-agent …
VeronikaSolovei9 Mar 12, 2020
f3787be
Queued request timeout (#1217)
VeronikaSolovei9 Mar 13, 2020
e94ca8b
docs: adding currency support section (#1199)
bretg Mar 16, 2020
2bad069
Add ValueImpression Adapter (#1204)
thuyhq Mar 16, 2020
95c269f
Kidoz adapter (#1210)
rhaksi-kidoz Mar 18, 2020
fb76895
Update auction.md (#1224)
ACannuniRP Mar 18, 2020
c3c8797
Update auction.md (#1225)
ACannuniRP Mar 18, 2020
dcc062a
Added logging to cache for video endpoint (#1220)
camrice Mar 18, 2020
c7ead07
added VISX vendor ID for usersyncing (#1229)
Aadeshp Mar 25, 2020
145c525
First pass at phase 1 TCF 2.0 support (#1228)
hhhjort Mar 25, 2020
163f331
Updated price granularity unmarshal to accept empty values and ranges…
camrice Mar 26, 2020
4699864
Update vendorID for TheMediaGrid s2s Bid Adapter (#1232)
TheMediaGrid Mar 26, 2020
7e706f4
treat 204 from FAN as a no bids response (#1233)
Aadeshp Mar 27, 2020
e05369b
AMP CCPA Fix (#1187)
SyntaxNode Mar 30, 2020
7c009ba
Update rubicon.md (#1234)
bretg Mar 30, 2020
4b1f3e7
adding schain interface (#1203)
bretg Apr 1, 2020
40f433b
added Rewarded Video section (#1200)
bretg Apr 1, 2020
3665275
nanointeractive adapter (#1213)
rade-popovic Apr 2, 2020
fb38619
Typos Fix (#1236)
SyntaxNode Apr 6, 2020
1af4a6a
Moved hb_pc_cat_dur modification to be before caching (#1250)
camrice Apr 9, 2020
733b40d
replacing info@prebid.org maintainer email addrs (#1256)
bretg Apr 13, 2020
2b334af
aligning maintainer info (#1258)
bretg Apr 14, 2020
fb59f73
Add kidoz bidder info (#1257)
bretg Apr 14, 2020
c027bac
Add Cropping of BAdv for Rubicon Adapter (#1254)
DGarbar Apr 14, 2020
d416035
Added metrics support to endpoint aspect (#1226)
VeronikaSolovei9 Apr 15, 2020
cc7a247
Prebid Server adapter for Telaria (#1231)
telariaEng Apr 15, 2020
f07b1c3
#615 Beachfront URLs from config (#1238)
kdesput Apr 15, 2020
76747ef
Add nil check errors when setting native asset types (#1260)
mansinahar Apr 16, 2020
79bb4dc
Bugfix: no bids from bidder handling (#1252)
VeronikaSolovei9 Apr 16, 2020
8657ae9
Add missing categories to AppNexus -> IAB mapping file. (#1264)
jmaynardxandr Apr 21, 2020
dc9335c
Yieldone s2s Bid Adapter (#1242)
hbanalytics Apr 22, 2020
b44980c
Fix: URL de sync (#1261)
Apr 22, 2020
99dc46b
populate the app ID in the FAN timeout notif url with the publisher I…
Aadeshp Apr 22, 2020
f4905e8
Added header User Agent decoding (#1268)
VeronikaSolovei9 Apr 22, 2020
62a1357
Ad Generation Adapter Integration. (#1253)
AdGeneration Apr 23, 2020
f5a4289
Fix Go 1.14 Error Message Changes (#1271)
SyntaxNode Apr 24, 2020
f1f2b09
NinthDecimal Adapter (#1249)
trchandraprakash Apr 24, 2020
210bce4
* Add PubMatic bidder doc file (#1255)
mike-chowla Apr 29, 2020
8710fe1
Appnexus adapter: Add category mapping for government. (#1278)
jmaynardxandr Apr 29, 2020
da1eaea
Update a Freewheel mapping to Gaming category. (#1280)
jmaynardxandr Apr 29, 2020
0714ef7
Add AJA adapter (#1269)
sambaiz Apr 30, 2020
9e7e1cf
OpenX adapter: Pass gdpr and gdpr_consent to user sync endpoint (#1282)
laurb9 Apr 30, 2020
1704e69
OpenX adapter: Enable video for app (#1281)
laurb9 May 1, 2020
57ac060
fix conversant sync pixel (#1284)
johnwier May 1, 2020
e4980fa
Add AdOcean adapter (#1273)
mmuras May 4, 2020
8db5479
LunaMedia Adapter (#1285)
trchandraprakash May 6, 2020
42d5281
[Sharethrough] Add CCPA support (#1263)
May 6, 2020
cd90991
Remove Outdated GDPR AMP Special Case (#1283)
SyntaxNode May 6, 2020
cc3d2da
Stricter Privacy Scrubbing (#1286)
SyntaxNode May 6, 2020
2481fea
Add Adapter Orbidder (#1275)
arneschulz1984 May 11, 2020
4257bf1
Added OpenX Bidder adapter documentation (#1291)
jimee02 May 12, 2020
93b8a0e
OpenX adapter: Pass rewarded video flag (#1290)
laurb9 May 13, 2020
c18a2d8
Bugfix for missing fields in imp.video (#1297)
VeronikaSolovei9 May 14, 2020
9f7ed20
Add cpmOverride (#1289)
DGarbar May 14, 2020
6e5d044
Add Beintoo adapter (#1274)
ddantuonobeintoo May 14, 2020
ce94bf4
Yeahmobi adapter (#1279)
zhaojp May 14, 2020
fe4f9f4
advangelists: Vendor id update (#1307)
trchandraprakash May 21, 2020
28671d1
Consumable: Support GDPR and US Privacy consent (#1300)
djcsdy May 21, 2020
3c5ecee
Restore the AMP privacy exception as an option. (#1311)
hhhjort May 21, 2020
e0ddbc7
consumable: Correct GDPR vendor ID to 591. (#1309)
djcsdy May 21, 2020
1f4ed61
VIS.X: fix bid.ID, bid.CrID and set default currency value (#1296)
mk0x9 May 21, 2020
0f6510a
Fix debug log error messages (#1270)
camrice May 26, 2020
b929c4e
MobileFuse Adapter (#1303)
dtbarne May 26, 2020
bb0f9d6
eplanning: Support for apps (#1306)
May 26, 2020
8a128ce
Introduce Adhese adapter (#1292)
sander-adhese May 28, 2020
88aaf63
privacy: Potential JSON injection (#1304)
djcsdy May 28, 2020
9683f50
Updating bidder params for Advangelists (#1316)
trchandraprakash May 28, 2020
6bc9c01
Change placement of cpmoverride for Rubicon (#1310)
DGarbar May 28, 2020
7d39a11
increasing the stale period to 2 months (#1305)
bretg May 29, 2020
4f97d5a
Add Go 1.14 Build Target (#1314)
SyntaxNode Jun 1, 2020
0f0b098
Privacy: Remove user.ext.eids (#1294)
SyntaxNode Jun 1, 2020
9f3a8c7
Removed some redundant methods (#1320)
telariaEng Jun 2, 2020
748e2d0
Beachfront: GDPR id (issue 1301) and documentation updates (#1321)
muncha Jun 2, 2020
d00ff3f
Add Yieldlab Adapter (#1287)
mirkorean Jun 2, 2020
d29a749
Update adtelligent ortb endpoint (#1318)
GeneGenie Jun 2, 2020
b5993cd
Change on eplanning endpoint (#1327)
sebaperez Jun 2, 2020
cd9116e
Enable full TCF2 support (#1302)
hhhjort Jun 3, 2020
23c684c
Change on eplanning endpoint (hostname) (#1328)
sebaperez Jun 3, 2020
3527845
Districtm Dmx: new adapter (#1209)
stevealliance Jun 3, 2020
b10b55c
Fix sync url for Yieldone s2s Bid Adapter (#1336)
hbanalytics Jun 4, 2020
dc9d246
CCPA Video Bug (#1333)
SyntaxNode Jun 8, 2020
47bed2a
Add Pubnative bidder documentation (#1340)
aleksanyan Jun 9, 2020
c628f1a
Timeout notification monitoring and debugging (#1322)
hhhjort Jun 9, 2020
4361bf6
Add Adtarget server adapter (#1319)
GeneGenie Jun 9, 2020
86fa52b
Update Auction OpenRTB Sample (#1342)
SyntaxNode Jun 9, 2020
24665e8
Triplelift: Add SRA Support (#1347)
Jun 11, 2020
eb77b17
Privacy: Limit Ad Tracking (#1334)
SyntaxNode Jun 15, 2020
dd05c38
Avoid overriding AMP request original size with mutli-size (#1352)
dlackty Jun 15, 2020
62fe413
Extra logging for timeout notifications (#1349)
hhhjort Jun 17, 2020
2d2ed0c
Consumable: Correct bid type, should always be "banner". (#1359)
djcsdy Jun 17, 2020
98417cb
Build With Go 1.14 (#1350)
SyntaxNode Jun 17, 2020
d1c8129
Category mapping changes from product team. (#1348)
jmaynardxandr Jun 17, 2020
6eed873
Adds Avocet adapter (#1354)
scritchley Jun 18, 2020
a8feeca
AdOcean adapter - Support for sizes defined in prebid configuration. …
mmuras Jun 18, 2020
9c79ee4
Log account id and all bidder names when recovering from OpenRTB auct…
bsardo Jun 18, 2020
5f39344
Adding Smartadserver adapter (#1346)
tadam75 Jun 20, 2020
379492d
Added additional Ext Param (#1357)
telariaEng Jun 20, 2020
aaff156
Adman adapter (#1356)
SmartyAdman Jun 23, 2020
e376a8b
PBS-632 add max connections per host config setting to general http a…
bsardo Jun 24, 2020
1667636
Add ext.bidder.zoneid for Kubient adapater (#1367)
Jun 25, 2020
8378a45
Improved IPv6 Support + Private Network Filtering (#1362)
SyntaxNode Jun 29, 2020
9b96f50
Change endpont address (#1370)
SmartyAdman Jun 29, 2020
919d29a
Don't override test parameter (#1373)
Jun 30, 2020
e430c62
OpenX + Facebook Hardening (#1368)
SyntaxNode Jun 30, 2020
74af63b
Updating Conversant endpoint url (#1376)
AaronColbyPrice Jul 2, 2020
47c7a6b
Metrics for TCF 2 adoption (#1360)
hhhjort Jul 2, 2020
1d276d5
Fall back to constant rates when the currency rates endpoint i… (#1364)
bsardo Jul 2, 2020
33f36b6
TheMediaGrid: added app type support (#1377)
TheMediaGrid Jul 6, 2020
0f2dc5f
user.ext.eids support in adform adapter (#1381)
braizhas Jul 7, 2020
034928e
Add Logicad adapter (#1382)
yuki-tsuchiya Jul 9, 2020
7c3521b
Fix Previous Merge Conflict (#1392)
SyntaxNode Jul 14, 2020
bb2b037
Kubient: Change default endpont address (#1398)
Jul 15, 2020
e6d159e
Add support for multiple root schain nodes (#1374)
bsardo Jul 15, 2020
e6fe57e
Update endpoint for latest release by districtm (#1401)
stevealliance Jul 16, 2020
ea348e3
Set OpenRTB DNT From HTTP Header (#1397)
SyntaxNode Jul 16, 2020
55f4c45
Add video for InApp support (#1399)
GeneGenie Jul 16, 2020
62a72e2
Timeout fix (#1390)
hhhjort Jul 16, 2020
5a7a2cf
Privacy Request Metrics (#1400)
SyntaxNode Jul 17, 2020
0ccb773
Parse Site.Publisher.ID from Amp Auction HTTP Req Query Parameter "ac…
danielguedesb Jul 17, 2020
bfcfefe
Facebook Only Supports App Impressions (#1396)
SyntaxNode Jul 17, 2020
c889570
fix: Change currency of ad-generation's bidResponse according to bidR…
AdGeneration Jul 17, 2020
6b7c113
Adding primary categories to freewheel mapping (#1407)
camrice Jul 18, 2020
a5962de
Add Outgoing Connection Metrics (#1343)
guscarreon Jul 22, 2020
f1582a4
Pubmatic: Support for video duration and primary category (#1384)
PubMatic-OpenWrap Jul 27, 2020
a857e68
Add IPv6 Non-Public Network (#1417)
SyntaxNode Jul 29, 2020
3fa47ab
GumGum: adds support for video (#1408)
susyt Jul 29, 2020
551faad
OpenX adapter: pass optional platform (PBID-598) (#1421)
laurb9 Jul 30, 2020
126455c
Adds keyvalue hb_format support (#1414)
hhhjort Jul 30, 2020
deb19c3
feat: Add new logger module - Pubstack Analytics Module (#1331)
gpolaert Aug 3, 2020
8740179
New bid adapter for Smaato (#1413)
vikramsinghchandel Aug 6, 2020
7615d47
New Adprime adapter (#1418)
Adprime Aug 6, 2020
a7aaa97
Separate "debug" behavior from "billable" behavior (#1387)
guscarreon Aug 6, 2020
cc43502
Remove redundad struct (#1432)
Adprime Aug 7, 2020
e67dfa4
Tcf2 id support (#1420)
hhhjort Aug 12, 2020
549cc79
Default TCF1 GVL in anticipation of IAB no longer hosting the v1 GVL …
hhhjort Aug 12, 2020
b5f8933
update to the latest go-gdpr release (#1436)
hhhjort Aug 12, 2020
48c865c
Video endpoint bid selection enhancements (#1419)
VeronikaSolovei9 Aug 12, 2020
cce4967
[WIP] Bid deduplication enhancement (#1430)
VeronikaSolovei9 Aug 12, 2020
346617b
Refactor rate converter separating scheduler from converter logic to …
bsardo Aug 12, 2020
a4ac6b6
Fix TCF1 Fetcher Fallback (#1438)
SyntaxNode Aug 12, 2020
5a7d365
Eplanning adapter: Get domain from page (#1434)
Aug 17, 2020
e065488
Fix no bid debug log (#1375)
camrice Aug 17, 2020
2e9d833
Update the fallback GVL to last version (#1440)
hhhjort Aug 17, 2020
21b41ff
Enable geo activation of GDPR flag (#1427)
hhhjort Aug 20, 2020
f4b0a7c
Validate External Cache Host (#1422)
guscarreon Aug 20, 2020
80d557e
Fixes bug (#1448)
hhhjort Aug 20, 2020
d663380
Added adpod_id to request extension (#1444)
VeronikaSolovei9 Aug 24, 2020
30ef858
Adform adapter: additional targeting params added (#1424)
braizhas Aug 24, 2020
9dbd008
Fix minor error message spelling mistake "vastml" -> "vastxml" (#1455)
robhazan Aug 24, 2020
055ab80
Fixing comment for usage of deal priority field (#1451)
camrice Aug 25, 2020
e96b980
moving docs to website repo (#1443)
bretg Aug 25, 2020
ceaf883
Fix bid dedup (#1456)
VeronikaSolovei9 Aug 25, 2020
1c9b521
consumable: Correct width and height reported in response. (#1459)
djcsdy Aug 27, 2020
1f87497
Panics happen when left with zero length []Imp (#1462)
guscarreon Aug 27, 2020
292df1f
Add Scheme Option To External Cache URL (#1460)
SyntaxNode Aug 27, 2020
5d13c85
Update gamma adapter (#1447)
gammassp Aug 28, 2020
ebdf997
fix: avoid unexpected EOF on gz writer (#1449)
gpolaert Aug 28, 2020
d8dc27f
Smaato adapter: support for video mediaType (#1463)
sbrosinski Aug 31, 2020
412e0fc
Rubicon liveramp param (#1466)
DGarbar Sep 1, 2020
754de04
Consolidate StoredRequest configs, add validation for all data types …
laurb9 Sep 1, 2020
f350cda
Fix Test TestEventChannel_OutputFormat (#1468)
guscarreon Sep 2, 2020
c867e6f
Add ability to randomly generate source.TID if empty and set publishe…
mansinahar Sep 2, 2020
0c96441
Add support for Account configuration (PBID-727, #1395) (#1426)
laurb9 Sep 3, 2020
44310b6
Minor changes to accounts test coverage (#1475)
bsardo Sep 8, 2020
d75df46
Brightroll adapter - adding config support (#1461)
smithaammassamveettil Sep 8, 2020
480d2a2
Refactor TCF 1/2 Vendor List Fetcher Tests (#1441)
SyntaxNode Sep 8, 2020
420da24
Add validation checker for PRs and merges with github actions (#1476)
laurb9 Sep 9, 2020
22c454c
Cache refactor (#1431)
laurb9 Sep 10, 2020
42e6765
Pass Through First Party Context Data (#1479)
SyntaxNode Sep 10, 2020
fa23f5c
Added new size 640x360 (Id: 198) (#1490)
hdeodhar Sep 10, 2020
65c6c36
Refactor: move getAccount to accounts package (from openrtb2) (#1483)
laurb9 Sep 14, 2020
e7d0bab
Fixed TCF2 Geo Only Enforcement (#1492)
SyntaxNode Sep 15, 2020
d3ba8a9
New colossus adapter [Clean branch] (#1495)
Sep 15, 2020
7b59a4b
New: InMobi Prebid Server Adapter (#1489)
cormorinth Sep 15, 2020
ab653bc
Revert "Added new size 640x360 (Id: 198) (#1490)" (#1501)
bsardo Sep 16, 2020
f6624b7
CCPA Publisher No Sale Relationships (#1465)
SyntaxNode Sep 17, 2020
472c7a0
Fix Merge Conflict (#1502)
SyntaxNode Sep 17, 2020
97be47d
Update conversant adapter for new prebid-server interface (#1484)
johnwier Sep 17, 2020
5507707
Implement returnCreative (#1493)
guscarreon Sep 17, 2020
811bb89
ConnectAd S2S Adapter (#1505)
rtuschkany Sep 23, 2020
1e92554
between adapter (#1437)
digitalist Sep 23, 2020
cfb0598
Invibes adapter (#1469)
invibes Sep 23, 2020
e496c8b
Refactor postgres event producer so it will run either the full or de…
bsardo Sep 24, 2020
120f735
Bidder Uniqueness Gatekeeping Test (#1506)
SyntaxNode Sep 24, 2020
99d3cef
ucfunnel adapter update end point (#1511)
Sep 28, 2020
9e35189
Refactor EEAC map to be more in line with the nonstandard publisher m…
hhhjort Sep 30, 2020
5d73084
Added bunch of new sizes (#1516)
hdeodhar Sep 30, 2020
b46d49d
New krushmedia bid adapter (#1504)
Krushmedia Oct 1, 2020
2d03b85
Invibes: Generic domainId parameter (#1512)
invibes Oct 1, 2020
1e9ecd4
Smarty ads adapter (#1500)
KushnerykPavel Oct 1, 2020
853ed6f
Add vscode remote container development files (#1481)
laurb9 Oct 6, 2020
7e6c469
First commit (#1510)
guscarreon Oct 6, 2020
7feefad
Vtrack and event endpoints (#1467)
danielguedesb Oct 8, 2020
c27ec73
Rework pubstack module tests to remove race conditions (#1522)
bsardo Oct 8, 2020
2216ebf
Updating smartadserver endpoint configuration. (#1531)
tadam75 Oct 12, 2020
4b53800
Add new size 500x1000 (ID: 548) (#1536)
ACannuniRP Oct 12, 2020
e05fcb9
Fix missing Request parameter for Adgeneration Adapter (#1525)
AdGeneration Oct 13, 2020
779bb5f
Fix endpoint url for TheMediaGrid Bid Adapter (#1541)
TheMediaGrid Oct 14, 2020
c7ddfa6
Add Account cache (#1519)
laurb9 Oct 14, 2020
0a34a01
Add bidder name key support (#1496)
camrice Oct 15, 2020
27ec65d
Simplifying exchange module: bidResponseExt gets built anyway (#1518)
guscarreon Oct 15, 2020
f83903f
Correct GetCpmStringValue's second return value (#1520)
guscarreon Oct 15, 2020
5258ef3
Add metrics to capture stored data fetch all/delta durations with fet…
bsardo Oct 19, 2020
dd7a5fc
Adds preferDeals support (#1528)
hhhjort Oct 20, 2020
21a9076
Emxd 3336 add app video ctv (#1529)
EMXDigital Oct 21, 2020
b0f8d71
Add http api for fetching accounts (#1545)
laurb9 Oct 22, 2020
445c207
Add missing postgres cache init config validation
bsardo Oct 22, 2020
3f31429
Acuity ads adapter (#1537)
AcuityAdsIntegrations Oct 22, 2020
6a997b2
Yieldmo app support in yaml file (#1542)
ym-winston Oct 22, 2020
7b50f96
Add metrics for account cache (#1543)
laurb9 Oct 22, 2020
0742c81
[Invibes] remove user sync for invibes (#1550)
invibes Oct 28, 2020
5a718e7
Add Support For imp.ext.prebid For DealTiers (#1539)
SyntaxNode Oct 28, 2020
e53bf0f
Add Accounts to http cache events (#1553)
laurb9 Oct 29, 2020
f141c49
Fix JSON tests ignore expected message field (#1450)
guscarreon Nov 3, 2020
75f71f5
NoBid version 1.0. Initial commit. (#1547)
redaguermas Nov 3, 2020
d821b3b
Added dealTierSatisfied parameters in exchange.pbsOrtbBid and openrtb…
ShriprasadM Nov 4, 2020
d044a93
Add client/AccountID support into Adoppler adapter. (#1535)
vchimishuk Nov 5, 2020
aeeeba8
Optionally read IFA value and add it the the request url (Adhese) (#1…
sander-adhese Nov 5, 2020
7db8fe0
Add AMX RTB adapter (#1549)
nickjacob Nov 5, 2020
63f5bcf
update Datablocks usersync.go (#1572)
htang555 Nov 10, 2020
6d37afc
33Across: Add video support in adapter (#1557)
curlyblueeagle Nov 11, 2020
c481f56
SilverMob adapter (#1561)
Nov 11, 2020
9a3f2a0
Updated ePlanning GVL ID (#1574)
sebaperez Nov 11, 2020
aaecdfa
update adpone google vendor id (#1577)
seergiioo6 Nov 11, 2020
7060022
ADtelligent gvlid (#1581)
GeneGenie Nov 12, 2020
12d96a6
Add account/ host GDPR enabled flags & account per request type GDPR …
bsardo Nov 12, 2020
ada88b4
DMX Bidfloor fix (#1579)
stevealliance Nov 16, 2020
acf889e
adform bidder video bid response support (#1573)
braizhas Nov 17, 2020
17f5020
Fix Beachfront JSON tests (#1578)
mansinahar Nov 17, 2020
1c31e06
Add account CCPA enabled and per-request-type enabled flags (#1566)
bsardo Nov 18, 2020
ab26a90
Refactored HoldAuction Arguments (#1570)
SyntaxNode Nov 18, 2020
47efd7c
Fix bug in request.imp.ext Validation (#1575)
guscarreon Nov 19, 2020
4e8de94
Updating import statements for v0.138.0 upgrade
pm-isha-bharti Nov 23, 2020
4ad73e7
Merging master with prebid-server v0.138.0
pm-isha-bharti Nov 30, 2020
747549d
UOE-5690: Fixing merging issues
pm-isha-bharti Dec 22, 2020
ca5fd1d
UOE-5690 Fixing merging issues
pm-isha-bharti Dec 22, 2020
ccd6780
prebid-server v0.138 upgrade: fixing merging issue
pm-isha-bharti Dec 22, 2020
f478fd9
Merge branch 'master' into prebid-server_0.138.0
PubMatic-OpenWrap Dec 22, 2020
1b42f06
Prebid-upgrade Fixing test cases
pm-isha-bharti Dec 23, 2020
8a6bdd3
Prebid-server upgrade: removing unwanted files
pm-isha-bharti Dec 23, 2020
ecd2ec1
Merge branch 'ci' into prebid-server_0.138.0-ci
PubMatic-OpenWrap Dec 23, 2020
00fd897
Prebid upgrade: Fixing merging issue with ci
pm-isha-bharti Dec 23, 2020
cbf1639
prebid-server upgrade: Fixing formating issues
pm-isha-bharti Dec 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# From https://github.com/microsoft/vscode-dev-containers/blob/master/containers/go/.devcontainer/Dockerfile
ARG VARIANT=1
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}

# [Optional] Install a version of Node.js using nvm for front end dev
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends vim

# [Optional] Uncomment the next line to use go get to install anything else you need
# RUN go get -x <your-dependency-or-tool>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
45 changes: 45 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.112.0/containers/go
{
"name": "Go",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update the VARIANT arg to pick a version of Go: 1, 1.15, 1.14
"VARIANT": "1.14",
// Options
"INSTALL_NODE": "false",
"NODE_VERSION": "lts/*",
}
},
"containerEnv": {
"GOPRIVATE": "${localEnv:GOPRIVATE}",
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"go.useGoProxyToCheckForToolUpdates": false,
"go.gopath": "/go",
//"go.toolsGopath": "/tmp/go",
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.Go",
"ms-azuretools.vscode-docker",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"eamodio.gitlens",
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8000,8001,6060],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "mkdir ~/.ssh; ssh-keyscan github.com > ~/.ssh/known_hosts",

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
28 changes: 28 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
push:
branches:
- master
pull_request:
release:
types:
- created
name: Validate
jobs:
Go:
strategy:
matrix:
go-version: [1.13.x, 1.14.x, 1.15.x]
os: [ubuntu-18.04]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Validate
run: |
./validate.sh --nofmt --cov --race 10
env:
GO111MODULE: "on"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ _obj
_test
.cover/
.idea/
.vscode/

# Architecture specific extensions/prefixes
*.[568vq]
Expand Down Expand Up @@ -46,6 +45,7 @@ analytics/filesystem/testFiles/
# static/version.txt

.idea/
.vscode/

# autogenerated mac file

Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ It is managed by [Prebid.org](http://prebid.org/overview/what-is-prebid-org.html
and upholds the principles from the [Prebid Code of Conduct](http://prebid.org/wrapper_code_of_conduct.html).

This project does not support the same set of Bidders as Prebid.js, although there is overlap.
The current set can be found in the [adapters](./adapters) package. If you don't see the one you want, feel free to [contribute it](docs/developers/add-new-bidder.md).
The current set can be found in the [adapters](./adapters) package. If you don't see the one you want, feel free to [contribute it](https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html).

For more information, see:

- [What is Prebid?](http://prebid.org/overview/intro.html)
- [Getting started with Prebid Server](http://prebid.org/dev-docs/get-started-with-prebid-server.html)
- [Current Bidders](http://prebid.org/dev-docs/prebid-server-bidders.html)
- [What is Prebid?](https://prebid.org/overview/intro.html)
- [Prebid Server Overview](https://docs.prebid.org/prebid-server/overview/prebid-server-overview.html)
- [Current Bidders](http://prebid.org/dev-docs/pbs-bidders.html)

## Installation

Expand Down Expand Up @@ -45,15 +45,18 @@ go build .
```

Load the landing page in your browser at `http://localhost:8000/`.
For the full API reference, see [docs/endpoints](docs/endpoints)
For the full API reference, see [the endpoint documentation](https://docs.prebid.org/prebid-server/endpoints/pbs-endpoint-overview.html)


## Contributing

Want to [add an adapter](docs/developers/add-new-bidder.md)? Found a bug? Great!
This project is in its infancy, and many things can be improved.

Want to [add an adapter](https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html)? Found a bug? Great!

Report bugs, request features, and suggest improvements [on Github](https://github.com/PubMatic-OpenWrap/prebid-server/issues).

Or better yet, [open a pull request](https://github.com/PubMatic-OpenWrap/prebid-server/compare) with the changes you'd like to see.

## IDE Setup for PBS-Go development

The quickest way to start developing PBS-Go in a reproducible environment isolated from your host OS
is by using this [VScode Remote Container Setup](devcontainer.md)
69 changes: 69 additions & 0 deletions account/account.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package account

import (
"context"
"encoding/json"
"fmt"

"github.com/PubMatic-OpenWrap/prebid-server/config"
"github.com/PubMatic-OpenWrap/prebid-server/errortypes"
"github.com/PubMatic-OpenWrap/prebid-server/pbsmetrics"
"github.com/PubMatic-OpenWrap/prebid-server/stored_requests"
jsonpatch "github.com/evanphx/json-patch"
)

// GetAccount looks up the config.Account object referenced by the given accountID, with access rules applied
func GetAccount(ctx context.Context, cfg *config.Configuration, fetcher stored_requests.AccountFetcher, accountID string) (account *config.Account, errs []error) {
// Check BlacklistedAcctMap until we have deprecated it
if _, found := cfg.BlacklistedAcctMap[accountID]; found {
return nil, []error{&errortypes.BlacklistedAcct{
Message: fmt.Sprintf("Prebid-server has disabled Account ID: %s, please reach out to the prebid server host.", accountID),
}}
}
if cfg.AccountRequired && accountID == pbsmetrics.PublisherUnknown {
return nil, []error{&errortypes.AcctRequired{
Message: fmt.Sprintf("Prebid-server has been configured to discard requests without a valid Account ID. Please reach out to the prebid server host."),
}}
}
if accountJSON, accErrs := fetcher.FetchAccount(ctx, accountID); len(accErrs) > 0 || accountJSON == nil {
// accountID does not reference a valid account
for _, e := range accErrs {
if _, ok := e.(stored_requests.NotFoundError); !ok {
errs = append(errs, e)
}
}
if cfg.AccountRequired && cfg.AccountDefaults.Disabled {
errs = append(errs, &errortypes.AcctRequired{
Message: fmt.Sprintf("Prebid-server could not verify the Account ID. Please reach out to the prebid server host."),
})
return nil, errs
}
// Make a copy of AccountDefaults instead of taking a reference,
// to preserve original accountID in case is needed to check NonStandardPublisherMap
pubAccount := cfg.AccountDefaults
pubAccount.ID = accountID
account = &pubAccount
} else {
// accountID resolved to a valid account, merge with AccountDefaults for a complete config
account = &config.Account{}
completeJSON, err := jsonpatch.MergePatch(cfg.AccountDefaultsJSON(), accountJSON)
if err == nil {
err = json.Unmarshal(completeJSON, account)
}
if err != nil {
errs = append(errs, err)
return nil, errs
}
// Fill in ID if needed, so it can be left out of account definition
if len(account.ID) == 0 {
account.ID = accountID
}
}
if account.Disabled {
errs = append(errs, &errortypes.BlacklistedAcct{
Message: fmt.Sprintf("Prebid-server has disabled Account ID: %s, please reach out to the prebid server host.", accountID),
})
return nil, errs
}
return account, nil
}
94 changes: 94 additions & 0 deletions account/account_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
package account

import (
"context"
"encoding/json"
"fmt"
"testing"

"github.com/PubMatic-OpenWrap/prebid-server/config"
"github.com/PubMatic-OpenWrap/prebid-server/errortypes"
"github.com/PubMatic-OpenWrap/prebid-server/pbsmetrics"
"github.com/PubMatic-OpenWrap/prebid-server/stored_requests"
"github.com/stretchr/testify/assert"
)

var mockAccountData = map[string]json.RawMessage{
"valid_acct": json.RawMessage(`{"disabled":false}`),
"disabled_acct": json.RawMessage(`{"disabled":true}`),
}

type mockAccountFetcher struct {
}

func (af mockAccountFetcher) FetchAccount(ctx context.Context, accountID string) (json.RawMessage, []error) {
if account, ok := mockAccountData[accountID]; ok {
return account, nil
}
return nil, []error{stored_requests.NotFoundError{accountID, "Account"}}
}

func TestGetAccount(t *testing.T) {
unknown := pbsmetrics.PublisherUnknown
testCases := []struct {
accountID string
// account_required
required bool
// account_defaults.disabled
disabled bool
// expected error, or nil if account should be found
err error
}{
// Blacklisted account is always rejected even in permissive setup
{accountID: "bad_acct", required: false, disabled: false, err: &errortypes.BlacklistedAcct{}},

// empty pubID
{accountID: unknown, required: false, disabled: false, err: nil},
{accountID: unknown, required: true, disabled: false, err: &errortypes.AcctRequired{}},
{accountID: unknown, required: false, disabled: true, err: &errortypes.BlacklistedAcct{}},
{accountID: unknown, required: true, disabled: true, err: &errortypes.AcctRequired{}},

// pubID given but is not a valid host account (does not exist)
{accountID: "doesnt_exist_acct", required: false, disabled: false, err: nil},
{accountID: "doesnt_exist_acct", required: true, disabled: false, err: nil},
{accountID: "doesnt_exist_acct", required: false, disabled: true, err: &errortypes.BlacklistedAcct{}},
{accountID: "doesnt_exist_acct", required: true, disabled: true, err: &errortypes.AcctRequired{}},

// pubID given and matches a valid host account with Disabled: false
{accountID: "valid_acct", required: false, disabled: false, err: nil},
{accountID: "valid_acct", required: true, disabled: false, err: nil},
{accountID: "valid_acct", required: false, disabled: true, err: nil},
{accountID: "valid_acct", required: true, disabled: true, err: nil},

// pubID given and matches a host account explicitly disabled (Disabled: true on account json)
{accountID: "disabled_acct", required: false, disabled: false, err: &errortypes.BlacklistedAcct{}},
{accountID: "disabled_acct", required: true, disabled: false, err: &errortypes.BlacklistedAcct{}},
{accountID: "disabled_acct", required: false, disabled: true, err: &errortypes.BlacklistedAcct{}},
{accountID: "disabled_acct", required: true, disabled: true, err: &errortypes.BlacklistedAcct{}},
}

for _, test := range testCases {
description := fmt.Sprintf(`ID=%s/required=%t/disabled=%t`, test.accountID, test.required, test.disabled)
t.Run(description, func(t *testing.T) {
cfg := &config.Configuration{
BlacklistedAcctMap: map[string]bool{"bad_acct": true},
AccountRequired: test.required,
AccountDefaults: config.Account{Disabled: test.disabled},
}
fetcher := &mockAccountFetcher{}
assert.NoError(t, cfg.MarshalAccountDefaults())

account, errors := GetAccount(context.Background(), cfg, fetcher, test.accountID)

if test.err == nil {
assert.Empty(t, errors)
assert.Equal(t, test.accountID, account.ID, "account.ID must match requested ID")
assert.Equal(t, false, account.Disabled, "returned account must not be disabled")
} else {
assert.NotEmpty(t, errors, "expected errors but got success")
assert.Nil(t, account, "return account must be nil on error")
assert.IsType(t, test.err, errors[0], "error is of unexpected type")
}
})
}
}
Loading