eclipse-ditto / ditto

Eclipse Ditto™: Digital Twin framework of Eclipse IoT - main repository
https://eclipse.dev/ditto/
Eclipse Public License 2.0
696 stars 230 forks source link

Error messages for connection domain blacklists are confusing #681

Open w4tsn opened 4 years ago

w4tsn commented 4 years ago

When creating an mqtt-connector:

In case the domain of e.g. an mqtt service for a connector is not only publicly available but also via an alias within a docker network directly reachable through the local network the connector will not be created and an error will be thrown that the domain mqtt.public-and-valid.org is blacklisted. This happens, because the domain is internally translated to local addresses, which is indeed an undesired target from the point of view of the implementation. The problem however is, that the error message does not provide any hint about this being the case and instead complains that the valid domain is blacklisted which is not the case.

The error messages in this case need to give more details about what is happening. This has to become more agnostic to the underlying networking behavior.

dguggemos commented 4 years ago

That's a good point, we should provide more details why the url was blacklisted e.g. the host resolved to a local address etc. We plan to enhance the url validation check anyways, so we can improve the error messages in one go.