Web STOMP subsciptions continue working even if access token has expired #8293
Replies: 4 comments 1 reply
-
There are gaps in the reproduction steps where we would have to guess. We do not guess in this community. What version of RabbitMQ was used? What exactly does "configure" mean? Please provide your actual configuration (with token values and usernames modified or edited out, of course)? How do you observe that the token indeed has expired? |
Beta Was this translation helpful? Give feedback.
-
Looks like the expectation here is that RabbitMQ will re-evaluate token expiration for every operation. For some protocols, this is the case. For Web STOMP, the token is only verified when the client subscribes. Token expiration for existing clients is a fairly complicated topic. Other protocols support So for STOMP, these are the limitations for now, and they likely won't change soon: new connections from a client with an expiring token will fail, and so will new subscriptions. But existing subscriptions will not be cancelled, and neither will their connections be affected. |
Beta Was this translation helpful? Give feedback.
-
As a workaround, you can close all Web STOMP connections every N hours or days. That will make sure that clients with expired tokens won't be able to do much. In theory this could be something that the plugin does, periodically tell all connections to re-evaluate their token and self-terminate if it's expired. Doing so with a large number of connections can be fairly expensive. |
Beta Was this translation helpful? Give feedback.
-
I have filed #8295 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I use the web stomp plugin together with the OAuth 2.0 plugin.
I authenticate the connection of my web stomp client to ws://localhost:15674/ws by setting the user to null and the password to the access token.
The access token will expire after 15s.
While sending a new message fails right after the token has expired, receiving new messages works for a very long time after token expiration.
Reproduction steps
The web application continues receiving messages even after the token has expired.
Expected behavior
As soon as the token expires, the application should not receive any messages any longer.
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions