Skip to content

MQTTv5 doesn't support oauth2 token re-authentication #12719

@AntonSmolkov

Description

@AntonSmolkov

Describe the bug

The MQTT Plugin documentation states:

RabbitMQ supports most MQTT 5.0 features, including the following:
TLS, OAuth 2.0

However, it seems an important part of the standard is missing—Re-authentication.

Currently, if I send an AUTH packet with a new token on existing connection, I receive an extended_authentication_unsupported error. (source)

I believe this is an essential part of the standard that should be implemented, as it is for AMQP-0-9-1 connections.

For reference, here is the description of the same feature implemented in Azure Event Grid: Authentication using Microsoft Entra JWT.

Reproduction steps

  1. Initialize the MQTT5 connection using the CONNECT method, passing the JWT token in the password field.
  2. Send an AUTH packet with reason code 25 (re-authenticate) and the renewed JWT token.

An error occurs: extended_authentication_unsupported.

Expected behavior

JWT-token of the connection is updated

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions