{
"description": "Max source registration reporting endpoints per rate limit window",
"api_config": {
"rate_limit_max_source_registration_reporting_origins": "1",
"rate_limit_max_reporting_origins_per_source_reporting_site": "2"
},
"input": {
"registrations": [
{
"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": {
"destination": "https://example.destination1.test",
"source_event_id": "111"
}
}
}
]
},
// Should be registered as the source site is different.
{
"timestamp": "1000",
"registration_request": {
"context_origin": "https://source2.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter2.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination1.test",
"source_event_id": "222"
}
}
}
]
},
// Should be dropped due to the unattributed reporting origin limit for
// same reporting site.
{
"timestamp": "1999",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://example.reporter1.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination1.test",
"source_event_id": "888",
"debug_reporting": true
}
}
}
]
},
// Should be dropped due to the unattributed reporting origin limit.
{
"timestamp": "2000",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter2.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination1.test",
"source_event_id": "999",
"debug_reporting": true
}
}
}
]
},
// Should be dropped due to the unattributed reporting origin limit is
// reached for one of the destinations.
{
"timestamp": "2001",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter2.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": [
"https://destination1.test",
"https://destination2.test"
],
"source_event_id": "987",
"priority": "2"
}
}
}
]
},
// Should be registered as the destination site is different.
{
"timestamp": "3000",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter2.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination2.test",
"source_event_id": "333"
}
}
}
]
},
// Should be dropped due to the unattributed reporting origin limit, but
// verbose debug report is not created as debug_permission is not set.
{
"timestamp": "4000",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "event-source"
},
"responses": [
{
"url": "https://reporter3.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination1.test",
"source_event_id": "444",
"debug_reporting": true
}
}
}
]
},
// Should result in an event-level report.
{
"timestamp": "10000",
"registration_request": {
"context_origin": "https://destination1.test"
},
"responses": [
{
"url": "https://reporter1.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "7"
}
]
}
}
}
]
},
// Should result in an event-level report.
{
"timestamp": "11000",
"registration_request": {
"context_origin": "https://destination1.test"
},
"responses": [
{
"url": "https://reporter2.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "6"
}
]
}
}
}
]
},
// Should result in an event-level report.
{
"timestamp": "12000",
"registration_request": {
"context_origin": "https://destination2.test"
},
"responses": [
{
"url": "https://reporter2.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "5"
}
]
}
}
}
]
},
// Should not result in an event-level report due to no matching source.
{
"timestamp": "12001",
"registration_request": {
"context_origin": "https://destination1.test"
},
"responses": [
{
"url": "https://reporter3.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "4"
}
]
}
}
}
]
},
// Should be registered as the first source is outside the rate limit window.
{
"timestamp": "2592000000",
"registration_request": {
"context_origin": "https://source1.test",
"Attribution-Reporting-Eligible": "event-source"
},
"responses": [
{
"url": "https://reporter3.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination1.test",
"source_event_id": "555"
}
}
}
]
},
// Should result in an event-level report.
{
"timestamp": "2592001000",
"registration_request": {
"context_origin": "https://destination1.test"
},
"responses": [
{
"url": "https://reporter3.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "3"
}
]
}
}
}
]
}
]
},
"output": {
"reports": [
{
"payload": [
{
"body": {
"attribution_destination": "https://destination1.test",
"source_event_id": "888",
"source_site": "https://source1.test"
},
"type": "source-success"
}
],
"report_time": "1999",
"report_url": "https://example.reporter1.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": [
{
"body": {
"attribution_destination": "https://destination1.test",
"source_event_id": "999",
"source_site": "https://source1.test"
},
"type": "source-success"
}
],
"report_time": "2000",
"report_url": "https://reporter2.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": {
"attribution_destination": "https://destination1.test",
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "172800",
"source_event_id": "111",
"source_type": "navigation",
"trigger_data": "7"
},
"report_url": "https://reporter1.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "172800000"
},
{
"payload": {
"attribution_destination": "https://destination1.test",
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "172801",
"source_event_id": "222",
"source_type": "navigation",
"trigger_data": "6"
},
"report_url": "https://reporter2.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "172801000"
},
{
"payload": {
"attribution_destination": "https://destination2.test",
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "172803",
"source_event_id": "333",
"source_type": "navigation",
"trigger_data": "5"
},
"report_url": "https://reporter2.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "172803000"
},
{
"payload": {
"attribution_destination": "https://destination1.test",
"randomized_trigger_rate": 0.0000025,
"scheduled_report_time": "5184000",
"source_event_id": "555",
"source_type": "event",
"trigger_data": "1"
},
"report_url": "https://reporter3.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "5184000000"
}
]
}
}