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

未关闭
#4,718 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
java
领域
backend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

🤖 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

主要语言
Java
星标
108
派生
258
平均合并
3 天 20 小时
30 天内合并 PR
12

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

prebid/prebid-server-java 的其他 Issue

查看 prebid/prebid-server-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。