Skip to content

Zowe APIML v3 bad error response compared to APIML v2 on Websocket connection attempt #3995

Closed
@cumarav

Description

@cumarav

Describe the bug
If I am trying to connect to websocket in APIML V2 with invalid JWT token and see clear error message:

 The close message is Some(CloseData { status_code: 1003, reason: "org.eclipse.jetty.websocket.api.UpgradeException: Failed to upgrade to websocket: Unexpected HTTP Response Status Code: Invalid login credentials" }

If I do the same with APIML V3 reply:

 The close message is Some(CloseData { status_code: 1011, reason: null}

Steps to Reproduce

  1. Try to connect with valid token - connection established.
  2. Try to open websocket connection using invalid JWT Token - error message is not clear...

Expected behavior
I want to see the same 1003 error code and error message if websocket fails to open connection due to invalid JWT token in APIML V3.

Screenshots

Image

Ass you see above - V3 always respond with 1011, empty reason whereas V2 gives specific code and correct reason for every case.

Impact
We have Integration Tests in CICD pipeline which verify invalid login behavior and consequently we not able to use APIML V3 in CICD pipeline because of this V2- V3 discrepancy

Logs

DEBUG websocat::ws_peer] The close message is Some(CloseData { status_code: 1011, reason: "" })

Willingness to help
If management approve....

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions