Skip to content

Users / ACL per listener #14605

Answered by Saddamus
Saddamus asked this question in Q&A
Jan 23, 2025 · 3 comments · 7 replies
Discussion options

You must be logged in to vote

Looks like following approach does the job:

# SSL listener in external zone
listeners.ssl.external {
  bind = "0.0.0.0:8883"
  zone = "external"
  ssl_options {
    keyfile = "/opt/emqx/certs/key.pem"
    certfile = "/opt/emqx/certs/cert.pem"
    cacertfile = "/opt/emqx/certs/cacert.pem"
  }
}

# TCP listener in internal zone
listeners.tcp.default {
  bind = "0.0.0.0:1883"
  zone = "internal"
}

listeners.ssl.default.enable = false

# Configure MQTT settings including client attributes
mqtt {
  client_attrs_init = [{
    expression = "iif(str_eq(zone,'internal'),'#','')"
    set_as_attr = "internal_topic"
  }, {
    expression = "iif(str_eq(zone,'external'),'#','')"
    set_as_attr = "ext…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@Saddamus
Comment options

@zmstone
Comment options

@Saddamus
Comment options

@zmstone
Comment options

@Saddamus
Comment options

Comment options

You must be logged in to vote
1 reply
@zmstone
Comment options

Comment options

You must be logged in to vote
1 reply
@zmstone
Comment options

Answer selected by zmstone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants