-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Prometheus connector does not accept ips as host name #2106
Comments
@vamsi-amazon any idea? |
Thanks for the issue. This is due to the validation on the host provided here: sql/datasources/src/main/java/org/opensearch/sql/datasources/utils/DatasourceValidationUtils.java Line 62 in 61d1eb7
We could get away with the above code as we really don't need to validate the domain for SSRF issue. |
Currently it is also not possible to pass prometheus uri's with ".local" or ".lan" TLDs and many more TLDs. Would your PR solve that also? And can we expect that this fix is available in OS 2.10? |
Or is it already available after merging? How does that work? |
@Spcemarine does it work now? |
What is the bug?
The creation of a prometheus datasource will fail if you supply any ip as the hostname for the URI saying that the hostname is invalid.
How can one reproduce the bug?
Create a prometheus datasource with an ip as hostname in the uri property. E.g.
What is the expected behavior?
The creation of prometheus datasources based on IPs is allowed.
What is your host/environment?
Running the latest docker image with a prometheus running on docker too, so ideally I wanted to use docker's dns but (something like
http://prometheus
) that was also denied by the hostname validation and then even plain ips did not work. :(Do you have any screenshots?
No, but a stacktrace, even better right? 🤓
Would be nice to be able to use docker's dns feature directly since I actually did not want to use ips but I'm not sure if that's a feature request or bug report. If it's the former I can open a new issue for that. Also, I do not quite understand why it is required to do exessive domain validation and would challenge that entirely but I might be missing the bigger picture here.
The text was updated successfully, but these errors were encountered: