Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.14.0
Describe the issue: Error is thrown when attempting to create report definition when on IPv6 network. We see this in the logs:
{
"type":"log",
"@timestamp":"2024-10-01T10:33:12Z",
"tags":[
"error",
"plugins",
"reportsDashboards"
],
"pid":1,
"message":"Failed input validation for create report definition ValidationError: [report_params.core_params.origin]: value must be a valid URI (see RFC 3986)."
}
I am not sure what this error is refering to as when I investigate the request in the browser, I dont see an “report_params.core_params.origin” field
{
"report_params":{
"report_name":"test1",
"report_source":"Saved search",
"description":"",
"core_params":{
"base_url":"/app/discover#/view/27895720-8f5f-11ec-b2f5-09d48915cf9c",
"report_format":"csv",
"time_duration":"PT30M",
"saved_search_id":"27895720-8f5f-11ec-b2f5-09d48915cf9c",
"limit":10000,
"excel":true
}
},
"delivery":{
"configIds":[
],
"title":"",
"textDescription":"",
"htmlDescription":""
},
"trigger":{
"trigger_type":"On demand"
}
}
The response in the logs seems to have correct formatted IPv6 addresses:
{
"type":"response",
"@timestamp":"2024-10-01T10:33:12Z",
"tags":[
],
"pid":1,
"method":"post",
"statusCode":400,
"req":{
"url":"/api/reporting/reportDefinition",
"method":"post",
"headers":{
"host":"[330b:c0e0:101:5459:6936:2:1e0b:20d]",
"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0",
"accept":"*/*",
"accept-language":"en-US,en;q=0.5",
"accept-encoding":"gzip, deflate, br, zstd",
"referer":"https://[330b:c0e0:101:5459:6936:2:1e0b:20d]/app/reports-dashboards",
"content-type":"application/json",
"osd-version":"2.14.0",
"osd-xsrf":"osd-fetch",
"content-length":"368",
"origin":"https://[330b:c0e0:101:5459:6936:2:1e0b:20d]",
"connection":"keep-alive",
"sec-fetch-dest":"empty",
"sec-fetch-mode":"cors",
"sec-fetch-site":"same-origin",
"priority":"u=0"
},
"remoteAddress":"330b:c0e0:101:5ec9:b433:2:c:0",
"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0",
"referer":"https://[330b:c0e0:101:5459:6936:2:1e0b:20d]/app/reports-dashboards"
},
"res":{
"statusCode":400,
"responseTime":5,
"contentLength":9
},
"message":"POST /api/reporting/reportDefinition 400 5ms - 9.0B"
}
This seems like a defect but wanted to reach out here first to see if there was any consideration we might have missed. Generating report definition works fine in IPv4 network.
Configuration:
In opensearch_dashboards.yml, we have server.host defined as “::” to accept all IPv6 addresses
UPDATE 10/7/24
I have updated this slightly as the issue is actually with generating a report definition and not necessarilty when attempting to download the report.
Relevant Logs or Screenshots: