Skip to content

MQTT topics with path parameters required to match guarded identity - #1387

Merged
jfallows merged 2 commits into
aklivity:developfrom
epieffe:feature/mqtt-topic-param
Apr 14, 2025
Merged

jfallows merged 2 commits into
aklivity:developfrom
epieffe:feature/mqtt-topic-param

Conversation

@epieffe

@epieffe epieffe commented Jan 29, 2025 •

Copy link
Copy Markdown
Contributor

The goal of this PR is to allow secure access to some MQTT client specific topics for publish and/or subscribe.

For publish or subscribe routes:

  • mqtt server can define path parameters for any segment in a topic name
  • mqtt server can enforce that a path parameter matches the client's guarded identity (e.g. via jwt guard)

Example configuration:

mqtt_server0:
  type: mqtt
  kind: server
  routes:
    - when:
        - publish:
          - topic: taxi/{id}/location
            params:
              id: ${guarded['jwt'].identity}
        - subscribe:
          - topic: taxi/{id}/update
            params:
              id: ${guarded['jwt'].identity}
      exit: mqtt_kafka_proxy0

Fixes #1382
Fixes #421

jfallows
jfallows previously approved these changes Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support mqtt topics with path parameters required to match guarded identity Support implicit mqtt topic rewrite scoped by trusted identity

2 participants