{
"description": "Max attribution reporting endpoints per rate-limit window",
"api_config": {
"rate_limit_max_attribution_reporting_origins": "1",
"rate_limit_max_reporting_origins_per_source_reporting_site": "2"
},
"input": {
"registrations": [
{
"timestamp": "0",
"registration_request": {
"context_origin": "https://example.source.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://example.reporter.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://example.destination.test",
"source_event_id": "888"
}
}
}
]
},
// Should not result in an event-level report as the filter data doesn't
// match. This doesn't count for the limit.
{
"timestamp": "1000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://example.reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "4",
"filters": {
"source_type": ["event"]
}
}
]
}
}
}
]
},
{
"timestamp": "2000",
"registration_request": {
"context_origin": "https://example.source.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": [
"https://example.destination.test",
"https://another-destination.test"
],
"source_event_id": "111"
}
}
}
]
},
{
"timestamp": "3000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "7"
}
]
}
}
}
]
},
{
"timestamp": "4000",
"registration_request": {
"context_origin": "https://source.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://example.reporter.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination.test",
"source_event_id": "999",
"aggregation_keys": {
"a": "0x1"
}
}
}
}
]
},
// Should not result in an event-level report due to the reporting origin
// limit.
{
"timestamp": "5000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://example.reporter.test/register-trigger",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Trigger": {
"debug_reporting": true,
"event_trigger_data": [
{
"trigger_data": "2"
}
]
}
}
}
]
},
// Should not result in an aggregatable report due to the reporting origin
// limit.
{
"timestamp": "5001",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://example.reporter.test/register-trigger",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Trigger": {
"debug_reporting": true,
"aggregatable_values": {
"a": 123
}
}
}
}
]
},
{
"timestamp": "6000",
"registration_request": {
"context_origin": "https://another-source.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://another-reporter.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination.test",
"source_event_id": "222"
}
}
}
]
},
// Should result in an event-level report as the source site is different.
{
"timestamp": "7000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://another-reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "6"
}
]
}
}
}
]
},
{
"timestamp": "8000",
"registration_request": {
"context_origin": "https://source.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://another-reporter.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://another-destination.test",
"source_event_id": "333"
}
}
}
]
},
// Should result in an event-level report as the destination site is different.
{
"timestamp": "9000",
"registration_request": {
"context_origin": "https://another-destination.test"
},
"responses": [
{
"url": "https://another-reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "5"
}
]
}
}
}
]
},
{
"timestamp": "10000",
"registration_request": {
"context_origin": "https://source.test",
"Attribution-Reporting-Eligible": "event-source"
},
"responses": [
{
"url": "https://another-reporter.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination.test",
"source_event_id": "444",
"aggregation_keys": {
"a": "0x1"
}
}
}
}
]
},
// Should not result in an aggregatable report due to reporting origin limit
// regardless of source type.
{
"timestamp": "11000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://another-reporter.test/register-trigger",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Trigger": {
"debug_reporting": true,
"aggregatable_trigger_data": [
{
"source_keys": ["a"],
"key_piece": "0x10"
}
],
"aggregatable_values": {
"a": 321
}
}
}
}
]
},
// Should result in an event-level report as the first report is outside
// the rate limit window.
{
"timestamp": "2592002000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://another-reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "3"
}
]
}
}
}
]
}
]
},
"output": {
"reports": [
{
"payload": [
{
"body": {
"attribution_destination": "https://destination.test",
"limit": "1",
"source_event_id": "999",
"source_site": "https://source.test"
},
"type": "trigger-reporting-origin-limit"
}
],
"report_time": "5000",
"report_url": "https://example.reporter.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": [ {
"body": {
"attribution_destination": "https://destination.test",
"limit": "1",
"source_event_id": "999",
"source_site": "https://source.test"
},
"type": "trigger-reporting-origin-limit"
} ],
"report_time": "5001",
"report_url": "https://example.reporter.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": [
{
"body": {
"attribution_destination": "https://destination.test",
"limit": "1",
"source_event_id": "444",
"source_site": "https://source.test"
},
"type": "trigger-reporting-origin-limit"
}
],
"report_time": "11000",
"report_url": "https://another-reporter.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": {
"attribution_destination": [
"https://another-destination.test",
"https://destination.test"
],
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "172802",
"source_event_id": "111",
"source_type": "navigation",
"trigger_data": "7"
},
"report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "172802000"
},
{
"payload": {
"attribution_destination": "https://destination.test",
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "172806",
"source_event_id": "222",
"source_type": "navigation",
"trigger_data": "6"
},
"report_url": "https://another-reporter.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "172806000"
},
{
"payload": {
"attribution_destination": "https://another-destination.test",
"randomized_trigger_rate": 0.0024263,
"scheduled_report_time": "172808",
"source_event_id": "333",
"source_type": "navigation",
"trigger_data": "5"
},
"report_url": "https://another-reporter.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "172808000"
},
{
"payload": {
"attribution_destination": "https://destination.test",
"randomized_trigger_rate": 0.0000025,
"scheduled_report_time": "2592010",
"source_event_id": "444",
"source_type": "event",
"trigger_data": "1"
},
"report_url": "https://another-reporter.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "2592010000"
}
]
}
}