zoukankan      html  css  js  c++  java
  • mosquitto的acl及用户配置

    mosquitto的acl规则及用户配置信息真让人头疼啊.折腾了半天才搞明白,随手记下来,省的下次又忘了.

    首先mosquitto.conf中设置acl配置文件及用户配置文件:

    password_file pwfile.example
    acl_file aclfile.example


    pwfile.example为用户列表

    aclfile.example为访问规则列表

    在pwfile.example中需要以usernme/password格式添加相关用户

    #发布信息用户
    pub/pub
    #接收信息用户
    sub/sub


    然后在aclfile.example文件中配置用户可访问的topic信息

    #用户信息
    user pub
    #用户可访问的topic,这里为可读可写
    topic mytopic/news
    #订阅用户可访问权限
    user sub
    #这里为只读
    topic read mytopic/news



  • 相关阅读:
    [转] Spring
    测试公式
    lexicalized Parsing
    MLN Alchemy
    Pedro domingos
    MLE & MAP
    Learning
    ProbCog mlnlearn的探索
    MLN 讨论 —— inference
    Mathjax与LaTex公式简介
  • 原文地址:https://www.cnblogs.com/relinson/p/2422541.html
Copyright © 2011-2022 走看看