Repository navigation
Description
🤖 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:
prebid-server-java/src/main/java/org/prebid/server/handler/SetuidHandler.java
Lines 311 to 318 in 9ac3345
| final TcfContext tcfContext = setuidContext.getPrivacyContext().getTcfContext(); | |
| final SetuidEvent setuidEvent = SetuidEvent.builder() | |
| .status(statusCode) | |
| .bidder(cookieFamilyName) | |
| .uid(uid) | |
| .success(uidsCookieUpdateResult.isUpdated()) | |
| .build(); | |
| analyticsDelegator.processEvent(setuidEvent, tcfContext); |
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
-
Enable a reporter (e.g.
logAnalyticsorpubstack). -
Account
acc1:{ "privacy": { "allowactivities": { "reportAnalytics": { "default": false } } } } -
GET /setuid?bidder=<any>&uid=abc123&account=acc1with 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 #4717.
References
- Found while documenting PBS analytics events: Prebid Server: document analytics events for PBS-Go and PBS-Java prebid.github.io#6997
- Matching PBS-Go issue: Analytics: setuid passes raw uid to analytics modules without activity controls prebid-server#5109
- Related: Analytics: cookie_sync and setuid events ignore analytics.global.adapters and account enabled flag #4717
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity