Skip to content

Feature Request: Dynamic Bridge Credentials via Plugin API #3676

Description

@danielmatteo

Description
There is currently no way to provide or update bridge credentials dynamically using a Mosquitto plugin. Bridge authentication remains statically defined in the configuration file and cannot be modified at runtime.

Problem

  • Bridge credentials are initialized once at broker startup and remain fixed.
  • Plugins cannot override or update these credentials dynamically.

Technical Details

  • Bridge connections use:

    mosq->bridge->remote_username

    instead of:

    mosq->username
  • Calling:

    mosquitto_set_username()

    only updates context->username, and therefore has no effect on bridge authentication.

  • The plugin API does not expose write access to:

    context->bridge->remote_username
  • As a result, bridges continue using stale credentials even if a plugin attempts to update authentication context.

Expected Behavior / Proposal
Introduce a plugin-accessible API, for example:

mosquitto_set_bridge_credentials()

that allows setting or updating remote_username and remote_password dynamically.

Environment

  • Mosquitto version: 2.1.2

Questions

  • Is this limitation already addressed in a newer or upcoming release?
  • If so, what version will include it and what is the expected timeline?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: AvailableNo one has claimed responsibility for resolving this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions