{
"description": "Unique destination limit covered by unexpired sources",
"api_config": {
"max_destinations_per_source_site_reporting_site": "1",
"rate_limit_max_reporting_origins_per_source_reporting_site": "2"
},
"input": {
"registrations": [
// Should be dropped due to destination limit, but no verbose debug
// report is created as debug_permission is not set.
{
"timestamp": "0",
"registration_request": {
"context_origin": "https://example.source1.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter1.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"debug_reporting": true,
"destination": [
"https://example.destination1.test",
"https://destination2.test"
],
"source_event_id": "987"
}
}
}
]
},
{
"timestamp": "1000",
"registration_request": {
"context_origin": "https://example.source1.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter1.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"debug_reporting": true,
"destination": "https://example.destination1.test",
"source_event_id": "111",
"expiry": "86400"
}
}
}
]
},
// Should result in an event-level report.
{
"timestamp": "2000",
"registration_request": {
"context_origin": "https://destination1.test"
},
"responses": [
{
"url": "https://reporter1.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "1"
}
]
}
}
}
]
},
// Should be dropped due to destination limit, even if it has been attributed.
{
"timestamp": "3000",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter1.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"debug_reporting": true,
"destination": "https://destination2.test",
"source_event_id": "222",
"debug_key": "12345",
"destination_limit_priority": "-1"
}
}
}
]
},
// Should be dropped due to destination limit regardless of source type.
// source_debug_key is included in the verbose debug report as
// debug_permission is set.
{
"timestamp": "3001",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "event-source"
},
"responses": [
{
"url": "https://reporter1.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"debug_reporting": true,
"destination": "https://destination2.test",
"source_event_id": "123",
"debug_key": "54321",
"destination_limit_priority": "-1"
}
}
}
]
},
// Should be dropped due to destination limit even if one of the
// destinations existed.
{
"timestamp": "3002",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "event-source"
},
"responses": [
{
"url": "https://reporter1.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"debug_reporting": true,
"destination": [
"https://destination1.test",
"https://destination2.test"
],
"source_event_id": "765"
}
}
}
]
},
// Should be dropped due to destination limit even if one of the
// destinations existed because the reporting site is the same.
{
"timestamp": "3003",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "event-source"
},
"responses": [
{
"url": "https://sub.reporter1.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"debug_reporting": true,
"destination": [
"https://destination1.test",
"https://destination2.test"
],
"source_event_id": "765"
}
}
}
]
},
// Should be dropped as there is no matching source.
{
"timestamp": "4000",
"registration_request": {
"context_origin": "https://destination2.test"
},
"responses": [
{
"url": "https://reporter1.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "2"
}
]
}
}
}
]
},
// Should be registered as the reporting site is different.
{
"timestamp": "5000",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter2.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"debug_reporting": true,
"destination": "https://destination2.test",
"source_event_id": "333"
}
}
}
]
},
// Should result in an event-level report.
{
"timestamp": "6000",
"registration_request": {
"context_origin": "https://destination2.test"
},
"responses": [
{
"url": "https://reporter2.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "3"
}
]
}
}
}
]
},
// Should be registered as the source site is different.
{
"timestamp": "7000",
"registration_request": {
"context_origin": "https://source2.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter1.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"debug_reporting": true,
"destination": "https://destination2.test",
"source_event_id": "444"
}
}
}
]
},
// Should result in an event-level report.
{
"timestamp": "8000",
"registration_request": {
"context_origin": "https://destination2.test"
},
"responses": [
{
"url": "https://reporter1.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "4"
}
]
}
}
}
]
},
// Should be registered as the destination site is the same as previous one.
{
"timestamp": "9000",
"registration_request": {
"context_origin": "https://source2.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter1.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://example.destination2.test",
"source_event_id": "666"
}
}
}
]
},
// Should result in an event-level report.
{
"timestamp": "10000",
"registration_request": {
"context_origin": "https://destination2.test"
},
"responses": [
{
"url": "https://reporter1.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "6"
}
]
}
}
}
]
},
// Should be registered as the first source has expired.
{
"timestamp": "86401000",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter1.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"debug_reporting": true,
"destination": "https://destination3.test",
"source_event_id": "555"
}
}
}
]
},
// Should result in an event-level report.
{
"timestamp": "86402000",
"registration_request": {
"context_origin": "https://destination3.test"
},
"responses": [
{
"url": "https://reporter1.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "5"
}
]
}
}
}
]
}
]
},
"output": {
"reports": [
{
"payload": [
{
"body": {
"attribution_destination": "https://destination2.test",
"limit": "1",
"source_event_id": "222",
"source_site": "https://source1.test",
"source_debug_key": "12345"
},
"type": "source-destination-limit"
}
],
"report_time": "3000",
"report_url": "https://reporter1.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": [
{
"body": {
"attribution_destination": "https://destination2.test",
"limit": "1",
"source_debug_key": "54321",
"source_event_id": "123",
"source_site": "https://source1.test"
},
"type": "source-destination-limit"
}
],
"report_time": "3001",
"report_url": "https://reporter1.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": [
{
"body": {
"attribution_destination": [
"https://destination1.test",
"https://destination2.test"
],
"limit": "1",
"source_event_id": "765",
"source_site": "https://source1.test"
},
"type": "source-destination-limit"
}
],
"report_time": "3002",
"report_url": "https://reporter1.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": [
{
"body": {
"attribution_destination": [
"https://destination1.test",
"https://destination2.test"
],
"limit": "1",
"source_event_id": "765",
"source_site": "https://source1.test"
},
"type": "source-destination-limit"
}
],
"report_time": "3003",
"report_url": "https://sub.reporter1.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": {
"attribution_destination": "https://destination1.test",
"randomized_trigger_rate": 0.0001372,
"scheduled_report_time": "86401",
"source_event_id": "111",
"source_type": "navigation",
"trigger_data": "1"
},
"report_url": "https://reporter1.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "86401000"
},
{
"payload": {
"attribution_destination": "https://destination2.test",
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "172805",
"source_event_id": "333",
"source_type": "navigation",
"trigger_data": "3"
},
"report_url": "https://reporter2.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "172805000"
},
{
"payload": {
"attribution_destination": "https://destination2.test",
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "172807",
"source_event_id": "444",
"source_type": "navigation",
"trigger_data": "4"
},
"report_time": "172807000",
"report_url": "https://reporter1.test/.well-known/attribution-reporting/report-event-attribution"
},
{
"payload": {
"attribution_destination": "https://destination2.test",
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "172809",
"source_event_id": "666",
"source_type": "navigation",
"trigger_data": "6"
},
"report_time": "172809000",
"report_url": "https://reporter1.test/.well-known/attribution-reporting/report-event-attribution"
},
{
"payload": {
"attribution_destination": "https://destination3.test",
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "259201",
"source_event_id": "555",
"source_type": "navigation",
"trigger_data": "5"
},
"report_time": "259201000",
"report_url": "https://reporter1.test/.well-known/attribution-reporting/report-event-attribution"
}
]
}
}