{"id":20186590,"url":"https://github.com/zimbora/mqtt-broker-auth","last_synced_at":"2026-06-12T07:31:22.187Z","repository":{"id":162040908,"uuid":"592418290","full_name":"zimbora/mqtt-broker-auth","owner":"zimbora","description":"mqtt broker to support dedicated firmware","archived":false,"fork":false,"pushed_at":"2026-03-21T20:38:05.000Z","size":6941,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-22T09:32:23.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zimbora.png","metadata":{"files":{"readme":"Readme.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-23T17:34:00.000Z","updated_at":"2026-03-21T20:38:08.000Z","dependencies_parsed_at":"2024-11-14T03:17:57.686Z","dependency_job_id":"e36c5c13-895e-4b42-978c-7ced9116d6e2","html_url":"https://github.com/zimbora/mqtt-broker-auth","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/zimbora/mqtt-broker-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbora%2Fmqtt-broker-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbora%2Fmqtt-broker-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbora%2Fmqtt-broker-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbora%2Fmqtt-broker-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zimbora","download_url":"https://codeload.github.com/zimbora/mqtt-broker-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbora%2Fmqtt-broker-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34234557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T03:17:51.686Z","updated_at":"2026-06-12T07:31:22.155Z","avatar_url":"https://github.com/zimbora.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Aedes-MQTT-Broker\n\nMQTT broker working in cluster mode. Number of workers can be set using WORKERS var env.\n\n## TODO\n- MQTTS\n\n## Working mode\n\n### Users\nThis program uses a mysql database to check users access and permissions\n\nOn table `users` are the authorized accounts to access MQTT broker.\\\nIf an account is registered with level 4/5, that account has full access.\\\nOtherwise, the access must be checked through table `permissions`\n\n### Devices and Clients\nThe registered `clientId` is used to check if a subscription or a publish are authorized for the respective topics.\\\nA `device` will only be allowed to publish on it's own topic and it must contains `uid:`.\nThis `uid:` identifies the device referred on the topic and is used to check if a\n`clientId` has permission to write on the topic. Those privileges are defined in `permissions` table.\\\nIf the `level` of `clientId` is \u003e= 3 publish and subscribe on the respective topic are granted\\\nIf the `level` of `clientId` is \u003e= 1 and \u003c 3 only subscribe on the respective topic is granted\n\n## Dependencies\n\n- mysql8.0\n- mongodb\n- redis\n- [mqtt-devices-parser](https://github.com/zimbora/mgmt-iot-web/blob/master/mysql/schema.mwb)\n\n## Front end\n- Node service running the following [project](https://github.com/zimbora/mgmt-iot-web)\n\n## Problems\n!! messages with retain flag should be published with qos=2\n\n## Configuration\n\nThe default configuration uses ./config/index.js file\\\nTo use another configuration define the respective variables before call the program\n\nUse a docker-compose file to do that:\n```\nversion: '3.3'\nservices:\n  redis:\n    image: 'redis:latest'\n    ports:\n      - '6379:6379'\n    expose:\n      - '6379'\n    volumes:\n      - 'redis_data_container:/data'\n  mongodb:\n    image: mongo:latest\n    #environment:\n      #MONGO_INITDB_ROOT_USERNAME: root\n      #MONGO_INITDB_ROOT_PASSWORD: rootpassword\n    ports:\n      - 27017:27017\n    volumes:\n      - mongodb_data_container:/data/db\n  db:\n    image: mysql:8.0\n    restart: always\n    environment:\n      MYSQL_DATABASE: 'mqtt-aedes'\n      # So you don't have to use root, but you can if you like\n      MYSQL_USER: 'user'\n      # You can use whatever password you like\n      MYSQL_PASSWORD: 'user_pwd'\n      # Password for root access\n      MYSQL_ROOT_PASSWORD: 'root_pwd'\n    ports:\n      # \u003cPort exposed\u003e : \u003c MySQL Port running inside container\u003e\n      - '3306:3306'\n    expose:\n      # Opens port 3306 on the container\n      - '3306'\n      # Where our data will be persisted\n    volumes:\n      - my-db:/var/lib/mysql\n  mqtt:\n    #build: ./mqtt-broker-auth\n    image: zimbora:mqtt-broker-auth\n    restart: unless-stopped\n    command: node index.js\n    environment:\n      dev: true\n      MQ: 'redis'\n      PERSISTENCE: 'mongo'\n      # MQTT \u0026\u0026 WebSocket\n      MQTT_PORT: '1883'\n      #MQTTS_PORT\n      WS_PORT: '8888'\n      #WSS_PORT\n      # DataBase\n      DB_CONN_LIMIT: 15\n      DB_HOST: 'db'\n      DB_PORT: '3306'\n      DB_USER: 'user'\n      DB_PWD: 'user_pwd'\n      DB_NAME: 'mqtt-aedes'\n      #CLUSTER\n      WORKERS: 3\n      # REDIS\n      REDIS_URL: 'mongodb://127.0.0.1/aedes-clusters'\n      # MONGO\n      MONGO_URL: 'mongodb://127.0.0.1/aedes-clusters'\n    ports:\n      - '1883:1883'\n      - '8888:8888'\n    expose:\n      # Opens ports on the container\n      - '1883'\n      - '8888'\n    volumes:\n      - .:/usr/app/mqtt/\n      - /usr/app/mqtt/node_modules\n    depends_on:\n      - db\n      - mongodb\n      - redis\n      - mqtt-devices-parser\n# Names our volume\nvolumes:\n  my-db:\n  mongodb_data_container:\n  redis_data_container:\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimbora%2Fmqtt-broker-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzimbora%2Fmqtt-broker-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimbora%2Fmqtt-broker-auth/lists"}