prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
428 stars 735 forks source link

Stored Request IDs unique to Account #1024

Open bretg opened 5 years ago

bretg commented 5 years ago

Problem

We're running into the problem of installed mobile apps that use stored-request-ids with names that could conceivably be used by other publishers. i.e. there's an unchangeable installed base of Stored Request IDs (SRIDs) that have a higher chance of collision than we'd like.

Feature

To avoid SRID collisions we propose:

0) the request's account ID is considered ext.prebid.parentAccount, site.publisher.id, or app.publisher.id in that order. 1) add a column to the stored_request query response for "accountId". 2) query for the SRID as usual 3) if more than one row comes back in the DB or DB-cache response, use the "accountId" field to choose which one to use 4) if only one row matches, but the account ID doesn't match, reject as if there hadn't been an SRID match 5) if the "accountId" field is blank on the query results then the PBS host company isn't using the account feature, so as long as there's only one row matching the SRID, go ahead and use it. 6) if there are multiple SRIDs and no account ID on the incoming request or on the DB response, report an appropriate error instead of choosing randomly.

bretg commented 5 years ago

Discussed and approved in PBS PMC

bretg commented 3 years ago

Released with PBS-Java 1.47