Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 14, 2025

Conversation

epieffe
Copy link
Contributor

@epieffe epieffe commented Jan 29, 2025

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

@epieffe epieffe force-pushed the feature/mqtt-topic-param branch 2 times, most recently from 2f9095f to d15893e Compare February 9, 2025 01:13
@epieffe epieffe force-pushed the feature/mqtt-topic-param branch 4 times, most recently from 084e920 to d0c53ea Compare February 23, 2025 01:59
@epieffe epieffe force-pushed the feature/mqtt-topic-param branch 5 times, most recently from 32aad91 to d0a21b7 Compare March 1, 2025 15:48
jfallows
jfallows previously approved these changes Mar 10, 2025
@jfallows jfallows merged commit 19dd6ad into aklivity:develop Apr 14, 2025
37 of 41 checks passed
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
2 participants