Analytics: AMP and video events skip activity controls applied to auction events

Aperta
#4,715 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Start with src/main/java/org/prebid/server/analytics/reporter/AnalyticsReporterDelegator.java, especially isAllowedAdapter and updateEvent, then inspect the existing auction and AMP handling alongside the VideoEvent and AmpEvent context APIs. Run the reporter delegator tests and add coverage for activity controls, user/device masking, and reporter-specific analytics trimming on AMP and video events. Done means those events follow the same per-reporter controls as auction events.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

🤖 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):

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:

https://github.com/prebid/prebid-server-java/blob/9ac33456c4d57336fdb2514fa15b792fdfb3d20d/src/main/java/org/prebid/server/analytics/reporter/AnalyticsReporterDelegator.java#L257-L267

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/video for this account: pubstack still receives the VideoEvent.
  • /openrtb2/amp (or video) with a stored request that has user.eids, user.data and device.geo: every allowed reporter receives them unmasked, while the same request on /openrtb2/auction is 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, handle VideoEvent the same way as AmpEvent (take the ActivityInfrastructure and BidRequestActivityInvocationPayload from videoEvent.getAuctionContext()).
  • In updateEvent, apply updateAuctionContextAdapter to AmpEvent and VideoEvent too (both have toBuilder = true).

References

🤖 Generated with Claude Code

Lingua principale
Java
Stelle
108
Fork
258
Merge medio
3g 20h
PR unite (30g)
12

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di prebid/prebid-server-java

Tutte le issue di prebid/prebid-server-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.