Analytics: cookie_sync and setuid events ignore analytics.global.adapters and account enabled flag
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Read AnalyticsReporterDelegator.isAllowedAdapter and its tests, then inspect CookieSyncEvent, SetuidEvent, and the two handlers that create those events. Trace how other event types carry account and activity infrastructure into adapter checks. Done when tests show cookie sync and setuid respect the global adapter list and, when an account is present, its enabled flag.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🤖 This issue was written by an AI agent (Claude Code) on behalf of @patmmccann.
What happens
AnalyticsReporterDelegator.isAllowedAdapter checks analytics.global.adapters and the account's analytics.modules.<name>.enabled (isNotAllowedAdapterByGlobalOrAccountAnalyticsConfig) only for AuctionEvent, AmpEvent, NotificationEvent and VideoEvent. CookieSyncEvent and SetuidEvent fall through to the default branch, which skips that check and passes a null activity infrastructure, so the event is allowed:
- https://github.com/prebid/prebid-server-java/blob/9ac33456c4d57336fdb2514fa15b792fdfb3d20d/src/main/java/org/prebid/server/analytics/reporter/AnalyticsReporterDelegator.java#L175-L225 (default branch at L218-L221)
- https://github.com/prebid/prebid-server-java/blob/9ac33456c4d57336fdb2514fa15b792fdfb3d20d/src/main/java/org/prebid/server/analytics/reporter/AnalyticsReporterDelegator.java#L234-L251
As a result, every reporter bean that has been created gets cookie sync and setuid events. That includes reporters that are left out of analytics.global.adapters and reporters an account has turned off with "enabled": false. The only filter is the host-level TCF Purpose 7 check in processEvent(event, tcfContext).
The account is available in both handlers (SetuidContext.account, CookieSyncContext.account), but it isn't put on the events:
- https://github.com/prebid/prebid-server-java/blob/9ac33456c4d57336fdb2514fa15b792fdfb3d20d/src/main/java/org/prebid/server/handler/CookieSyncHandler.java#L218-L223
- https://github.com/prebid/prebid-server-java/blob/9ac33456c4d57336fdb2514fa15b792fdfb3d20d/src/main/java/org/prebid/server/handler/SetuidHandler.java#L311-L318
Why it matters
Functional and privacy. analytics.global.adapters and the account enabled flag are how hosts and publishers decide which reporters get data. If a publisher has turned a reporter off, that reporter could still get their users' cookie sync and setuid traffic, including the bidder UID on setuid (see https://github.com/prebid/prebid-server-java/issues/4718).
To reproduce
- Enable a reporter, e.g.
pubstack.enabled: true, but leave it out ofanalytics.global.adapters. Or keep it in the list and set accountacc1to{"analytics": {"modules": {"pubstack": {"enabled": false}}}}. - Call
/cookie_syncwith"account": "acc1", or/setuid?bidder=...&uid=...&account=acc1. - The reporter's
processEventreceives aCookieSyncEvent/SetuidEvent. A/openrtb2/auctionrequest for the same account doesn't reach it.
Expected behaviour
Cookie sync and setuid events respect analytics.global.adapters, and the account-level enabled flag when an account is known, in the same way as the other event types.
Suggested fix
Add the Account (and ActivityInfrastructure, see https://github.com/prebid/prebid-server-java/issues/4718) to CookieSyncEvent and SetuidEvent, and add matching branches to isAllowedAdapter. At minimum, apply the globalEnabledAdapters check in the default branch.
References
- Found while documenting PBS analytics events: https://github.com/prebid/prebid.github.io/pull/6997
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Java
- Star
- 108
- Fork
- 258
- Merge trung bình
- 3 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của prebid/prebid-server-java
-
auto
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
prebid/prebid-server-java#4721 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Port PR from PBS-Go: Beachfront: Fix for Off-by-one comparison against lengthCó thể đã có người làm @osulzhenko đã nhận 2 ngày trước. Đang mởauto
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 53/100
prebid/prebid-server-java#4720 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
auto
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
prebid/prebid-server-java#4719 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
prebid/prebid-server-java#4718 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 71/100
prebid/prebid-server-java#4716 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của prebid/prebid-server-java
Issue tương tự
-
good first issue java test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 2 ngày
-
InterfaceMemberImpliedModifier: records and annotation types nested in interfaces are not checkedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
checkstyle/checkstyle#23007 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/logging-log4j2#4519 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Vinyl Cache 9.1 is now LTSĐang mởbug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 70/100
endoflife-date/endoflife.date#11679 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug finsim-cli low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày