Analytics: setuid passes raw uid to analytics reporters with only the TCF check

Offen
#4,718 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
52/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
java
Bereich
backend

Rechercherichtung

Start with SetuidHandler.java to trace how the account's ActivityInfrastructure reaches SetuidEvent, then read AnalyticsReporterDelegator.java methods isAllowedAdapter and updateEvent. Check the existing analytics privacy tests for these paths. Done means reporter analytics permissions are enforced for setuid events and denied transmitUfpd or transmitEids removes the uid.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

🤖 This issue was written by an AI agent (Claude Code) on behalf of @patmmccann.

What happens

/setuid puts the raw uid on the SetuidEvent and sends it to the analytics reporters:

https://github.com/prebid/prebid-server-java/blob/9ac33456c4d57336fdb2514fa15b792fdfb3d20d/src/main/java/org/prebid/server/handler/SetuidHandler.java#L311-L318

The only analytics privacy check it gets is the host-level TCF Purpose 7 enforcement in processEvent(event, tcfContext) (L107-L142). SetuidEvent has no account or ActivityInfrastructure (model), so isAllowedAdapter uses its default branch with a null infrastructure (L218-L224). That means reportAnalytics, transmitUfpd and transmitEids are never evaluated for this event.

The handler already builds the account's ActivityInfrastructure (L192-L199) and uses it for syncUser (L242-L249), but it doesn't pass it to analytics.

Why it matters

Privacy. The bidder UID is a persistent per-user identifier. Where TCF doesn't apply (e.g. US state privacy through GPP/activity controls), a publisher who has denied reportAnalytics, transmitUfpd or transmitEids to an analytics reporter could still have that reporter receive bidder UIDs from /setuid.

To reproduce

  1. Enable a reporter (e.g. logAnalytics or pubstack).

  2. Account acc1:

    { "privacy": { "allowactivities": { "reportAnalytics": { "default": false } } } }
    
  3. GET /setuid?bidder=<any>&uid=abc123&account=acc1 with no GDPR signal.

Expected: the reporter receives nothing, or at least no uid. Actual: it receives SetuidEvent{uid="abc123", ...}.

Expected behaviour

Before a reporter receives a setuid event, the account's reportAnalytics rule is checked for that reporter. When transmitUfpd or transmitEids is denied for it, uid is removed from the event.

Suggested fix

Add account/activityInfrastructure to SetuidEvent, handle it in isAllowedAdapter (REPORT_ANALYTICS with an analytics component payload), and in updateEvent null out uid for each reporter when TRANSMIT_UFPD or TRANSMIT_EIDS is denied. The same plumbing would also fix the missing enable checks in https://github.com/prebid/prebid-server-java/issues/4717.

References

🤖 Generated with Claude Code

Vorherrschende Sprache
Java
Sterne
108
Forks
258
Ø Merge
3 T. 20 Std.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus prebid/prebid-server-java

Alle Issues in prebid/prebid-server-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.