drogue-iot / drogue-cloud

Cloud Native IoT
https://drogue.io
Apache License 2.0
113 stars 30 forks source link

[websockets] wrong error when connecting to an application that do not exist #220

Closed jbtrystram closed 2 years ago

jbtrystram commented 2 years ago

drg stream --application non-existant-app :

Error: Error connecting to the Websocket endpoint:

Caused by:
    HTTP error: 400 Bad Request

It should send a 404 instead

jbtrystram commented 2 years ago

Investigating this a bit, it boils down to the auth service. When the connection is established, the service will check if the user have access to read the application. As the application does not exist, the authentication service answers : Outcome::Deny There is no distinction between denying access and the resource not being found