Analytics: setuid passes raw uid to analytics reporters with only the TCF check
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
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.
Written by the indexing model from the issue text.
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:
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 https://github.com/prebid/prebid-server-java/issues/4717.
References
- Found while documenting PBS analytics events: https://github.com/prebid/prebid.github.io/pull/6997
- Matching PBS-Go issue: https://github.com/prebid/prebid-server/issues/5109
- Related: https://github.com/prebid/prebid-server-java/issues/4717
🤖 Generated with Claude Code
- Dominant language
- Java
- Stars
- 108
- Forks
- 258
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 12
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prebid/prebid-server-java
-
auto
Difficulty 3/5 1-2 days Newbie friendliness 52/100
prebid/prebid-server-java#4721 ·
Maintainers usually reply within 2 days
-
Port PR from PBS-Go: Beachfront: Fix for Off-by-one comparison against lengthPossibly taken @osulzhenko claimed this 3 days ago. Openauto
Difficulty 2/5 1-3 hours Newbie friendliness 53/100
prebid/prebid-server-java#4720 · 1 assignee ·
Maintainers usually reply within 2 days
-
auto
Difficulty 4/5 3-5 days Newbie friendliness 35/100
prebid/prebid-server-java#4719 ·
Maintainers usually reply within 2 days
-
Analytics: cookie_sync and setuid events ignore analytics.global.adapters and account enabled flagOpen
Difficulty 4/5 3-5 days Newbie friendliness 55/100
prebid/prebid-server-java#4717 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 71/100
prebid/prebid-server-java#4716 ·
Maintainers usually reply within 2 days
All issues in prebid/prebid-server-java
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
hermes-queue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
chrisalunlloyd2-sudo/mindpalace#425 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
documentation enhancement first-time-contributor good first issue
Difficulty 1/5 Under an hour Newbie friendliness 84/100
SasanLabs/VulnerableApp#961 · 1 comment ·
Maintainers usually reply within 1 day