product-apim icon indicating copy to clipboard operation
product-apim copied to clipboard

Incorrect error response for WebSocket API authentication error for no access_token/Authorization bearer

Open msm1992 opened this issue 2 years ago • 1 comments

Description:

When invoking a websocket API in the API-Manager, getting 401 response if we do not provide the access token.

wscat -n -c wss://localhost:8099/test/1
error: Unexpected server response: 401

However if we define the access_token param in the wscat as URL parameter, we are getting different error without returning the 401.

wscat -n -c wss://localhost:8099/test/1?access_token=
error: socket hang up

Steps to reproduce:

  1. Create a Websocket API
  2. Invoke using wscat with access_token passed in params.

Affected Product Version:

APIM 3.2.0

msm1992 avatar Apr 11 '22 03:04 msm1992

@msm1992 shall we close this issue?

chamilaadhi avatar Sep 05 '22 05:09 chamilaadhi

This issue is not reproducible in latest APIM pack, hence closing.

msm1992 avatar Jan 21 '23 09:01 msm1992