Skip to content
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

Support mqtt topics with path parameters required to match guarded identity #1382

Open
jfallows opened this issue Jan 24, 2025 · 1 comment · May be fixed by #1387
Open

Support mqtt topics with path parameters required to match guarded identity #1382

jfallows opened this issue Jan 24, 2025 · 1 comment · May be fixed by #1387
Assignees
Labels
story Feature description from user's perspective

Comments

@jfallows
Copy link
Contributor

Describe the desired outcome from the user's perspective
As IoT devops, I want to be secure access to some MQTT client specific topics for publish and/or subscribe.

Acceptance criteria

  • 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)

Additional context
Suggested syntax after discussing with @epieffe.

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

In this example, a taxi can only publish its own location and subscribe to updates intended for itself, by requiring the {id} path parameter to the match the guarded identity of the currently connected taxi.

@jfallows jfallows added the story Feature description from user's perspective label Jan 24, 2025
@epieffe
Copy link

epieffe commented Jan 24, 2025

Ok @jfallows, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
story Feature description from user's perspective
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants