Authentication for a websocket connection #16
-
We are providing a notebook experience as part of our workload and have to open a websocket connection to a BE Jupyter server. As far as I can tell it is not possible to attach the JWT to an Authentication header for the wss connection and the recommended practice is to use the Is that an acceptable approach? thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @box-turtle, It looks like |
Beta Was this translation helpful? Give feedback.
-
I agree that header was originally designed for Protocol information as the name implies. Since the Fabric spark notebook is opening a websocket connection I was hoping you could share how you are using JWT authentication for that connection. Query param approach will send the JWT in clear text which seems less than ideal. |
Beta Was this translation helpful? Give feedback.
Hi @box-turtle,
It looks like
Sec-WebSocket-Protocol header
is not exactly used for authentication purposes so I am not sure whether it's a good approach, but I do see a wide discussion regarding this. I also see suggestions to use the query param approach, but I suggest exploring this a bit more to get the full picture of using JWT auth with WebSockets.