-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Superset Async Query Bug - Websocket Connection Failed JWT not present #27293
Comments
Did you make a copy of |
Yeah, I did make the superset-websocket/config.json file with 32 bytes secret key, same key as the GLOBAL_ASYNC_QUERIES_JWT_SECRET I set up in docker/pythonpath_dev/superset_config.py. In superset app container
I don't think it provids the JWT in the header, that's why websocket container is giving a JWT not present error If the token is invalid, it should throw an error with the jwt verification failure in the following line. superset/superset-websocket/src/index.ts Line 282 in 9900f56
|
I am facing the same issue with Kubernetes deployment. JWT |
Hey @rusackas! I'm here to help you with any bugs, questions, or contributions. I'm Dosu, a bot designed to assist you while you wait for a human maintainer. Let me know how I can help! To address the "JWT not present" error in the WebSocket connection for Superset's async query feature, ensure the following configurations and steps are correctly implemented:
By ensuring these configurations and steps are correctly implemented, the "JWT not present" error should be resolved [1][2][3]. |
I'm still having the same problem. |
Bug description
Hi
I find a bug in the Async Query Websocket code while I'm trying to enable the Async query "ws" mode
I followed the instructions and docs to set up all the config values
https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries
#9190
In the websocket code, it is looking for the channel_id from cookie encrypted by JWT
superset/superset-websocket/src/index.ts
Line 278 in 9900f56
However in the sueprset_app's ws connection, we are not provbiding proper JWT token to establish WS connection
superset/superset-frontend/src/middleware/asyncEvent.ts
Line 196 in 9900f56
Which lead to a JWT not present error.
I try to connects to the Websocket conatainer locally with following code, and it works
I notice the we create the channel_id and set the cookie in async_mananger, but I don't think it reflects on websocket container
superset/superset/async_events/async_query_manager.py
Line 157 in 9900f56
How to reproduce the bug
my config
GLOBAL_ASYNC_QUERIES_JWT_SECRET = "***********"
GLOBAL_ASYNC_QUERIES_TRANSPORT = "ws"
GLOBAL_ASYNC_QUERIES_JWT_COOKIE_SECURE = True
GLOBAL_ASYNC_QUERIES_REDIS_CONFIG = {
"port": REDIS_PORT,
"host": REDIS_HOST,
"password": "",
"db": 0,
"ssl": False,
}
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: