Repository navigation
Description
🤖 This issue was written by an AI agent (Claude Code) on behalf of @patmmccann.
What happens
AnalyticsReporterDelegator applies account activity controls fully only to AuctionEvent. AMP and video events get less:
1. Video events: reportAnalytics is never checked. In isAllowedAdapter, the VideoEvent branch sets activityInfrastructure = null, even though videoEvent.getAuctionContext() has one. isAllowedActivity then falls back to ALLOW_ACTIVITY_BY_DEFAULT (true):
Lines 211 to 217 in 9ac3345
case VideoEvent videoEvent -> { if (isNotAllowedAdapterByGlobalOrAccountAnalyticsConfig(adapter, videoEvent.getAuctionContext())) { return false; } activityInfrastructure = null; activityInvocationPayload = null; } Lines 315 to 322 in 9ac3345
private static boolean isAllowedActivity(ActivityInfrastructure activityInfrastructure, Activity activity, ActivityInvocationPayload activityInvocationPayload) { return activityInfrastructure != null ? activityInfrastructure.isAllowed(activity, activityInvocationPayload) : ActivityInfrastructure.ALLOW_ACTIVITY_BY_DEFAULT; }
The auction and AMP branches just above (L179-L203) pass the context's ActivityInfrastructure and a BidRequestActivityInvocationPayload.
2. AMP and video events: no masking and no ext.prebid.analytics trimming. updateEvent handles only AuctionEvent:
Lines 257 to 267 in 9ac3345
| private <T> T updateEvent(T event, String adapter) { | |
| if (!ADAPTERS_PERMITTED_FOR_FULL_DATA.contains(adapter) && event instanceof AuctionEvent auctionEvent) { | |
| final AuctionContext updatedAuctionContext = | |
| updateAuctionContextAdapter(auctionEvent.getAuctionContext(), adapter); | |
| return updatedAuctionContext != null | |
| ? (T) auctionEvent.toBuilder().auctionContext(updatedAuctionContext).build() | |
| : event; | |
| } | |
| return event; | |
| } |
For auction events, it masks user/device for each reporter according to transmitUfpd, transmitEids and transmitPreciseGeo (L285-L313), and trims ext.prebid.analytics to that reporter's own entry (L324-L350). AmpEvent and VideoEvent skip both steps, so every reporter gets the unmasked auctionContext.bidRequest along with all reporters' ext.prebid.analytics entries.
Why it matters
Privacy. A publisher who denies reportAnalytics to a reporter could still have that reporter receive video events. A publisher who denies transmitUfpd, transmitEids or transmitPreciseGeo to analytics could still have reporters receive user FPD, EIDs, and precise geo/IP on AMP and video traffic. Each reporter could also see the request-level analytics config meant for other reporters. PBS-Go applies reportAnalytics, transmitUfpd and transmitPreciseGeo to auction, AMP and video events alike, so the two servers behave differently here.
To reproduce
Account config:
{
"privacy": {
"allowactivities": {
"reportAnalytics": { "rules": [{ "condition": { "componentType": ["analytics"], "componentName": ["pubstack"] }, "allow": false }] },
"transmitUfpd": { "default": false }
}
}
}with pubstack (or any reporter) enabled and listed in analytics.global.adapters.
/openrtb2/videofor this account:pubstackstill receives theVideoEvent./openrtb2/amp(or video) with a stored request that hasuser.eids,user.dataanddevice.geo: every allowed reporter receives them unmasked, while the same request on/openrtb2/auctionis masked.
Expected behaviour
AMP and video events go through the same per-reporter reportAnalytics check, user/device masking and ext.prebid.analytics trimming as auction events.
Suggested fix
- In
isAllowedAdapter, handleVideoEventthe same way asAmpEvent(take theActivityInfrastructureandBidRequestActivityInvocationPayloadfromvideoEvent.getAuctionContext()). - In
updateEvent, applyupdateAuctionContextAdaptertoAmpEventandVideoEventtoo (both havetoBuilder = true).
References
- Found while documenting PBS analytics events: Prebid Server: document analytics events for PBS-Go and PBS-Java prebid.github.io#6997
- Related: Analytics: updateEventIfRequired mutates the shared ext.prebid.analytics node #4716 (the shared
ext.prebid.analyticsnode is changed in place)
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity