-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MQTT with OAuth 2: investigate if credential expiration can be checked before or after a keepalive frame is sent #11862
Comments
This was rejected in favor of a solution similar to #10299:
|
I prefer taking the same approach as done for Streams in #10299 because:
|
mergify bot
pushed a commit
that referenced
this issue
Jul 31, 2024
Fixes https://github.com/rabbitmq/rabbitmq-server/discussions/11854 Fixes #11862 This commit uses the same approach as implemented for AMQP 1.0 and Streams: When a token expires, RabbitMQ will close the connection. (cherry picked from commit 7fb7833)
mergify bot
pushed a commit
that referenced
this issue
Jul 31, 2024
Fixes https://github.com/rabbitmq/rabbitmq-server/discussions/11854 Fixes #11862 This commit uses the same approach as implemented for AMQP 1.0 and Streams: When a token expires, RabbitMQ will close the connection. (cherry picked from commit 7fb7833) (cherry picked from commit 7488332) # Conflicts: # deps/rabbit/src/rabbit_amqp_reader.erl
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
See #11854 for background.
Currently when a JWT token is used for authN/authZ and the token expires, the plugin will refuse all "new" operations:
and so on. However, existing consumers that never publish or send anything other than acks and/or heartbeats, will continue being connected.
Solutions Considered and Rejected
Two potential solutions were considered and rejected during the 3.13 MQTT plugin redesign:
A Third Alternative
MQTT connections already use a timer for keepalives. It has nothing to do with credentials or authentication but it could be abused
to evaluate a function periodically, and close the connection with an expired token with a
DISCONNECT
frame.When non-JWT authorization mechanisms are used,
the keepalive callback would not be used (or would do nothing).
At least this is a specific option that can be investigated.
The text was updated successfully, but these errors were encountered: