{"id":15063449,"url":"https://github.com/totalkrill/mosquitto_plugin","last_synced_at":"2025-04-10T11:09:23.821Z","repository":{"id":40366535,"uuid":"318181938","full_name":"TotalKrill/mosquitto_plugin","owner":"TotalKrill","description":"Write plugins for mosquitto in rust, with minimal friction!","archived":false,"fork":false,"pushed_at":"2024-03-22T21:58:18.000Z","size":78,"stargazers_count":19,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T22:16:23.262Z","etag":null,"topics":["mosquitto","mqtt","plugin"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/TotalKrill.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2020-12-03T12:12:58.000Z","updated_at":"2024-11-28T07:24:10.000Z","dependencies_parsed_at":"2024-09-29T08:40:36.465Z","dependency_job_id":"6e53603b-43ce-4378-9e66-30a8fc42b7fe","html_url":"https://github.com/TotalKrill/mosquitto_plugin","commit_stats":{"total_commits":42,"total_committers":7,"mean_commits":6.0,"dds":0.5476190476190477,"last_synced_commit":"f61f30a06be4ae5a0940b5c367711f20d0eeaf2b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TotalKrill%2Fmosquitto_plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TotalKrill%2Fmosquitto_plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TotalKrill%2Fmosquitto_plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TotalKrill%2Fmosquitto_plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TotalKrill","download_url":"https://codeload.github.com/TotalKrill/mosquitto_plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208552,"owners_count":21065202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["mosquitto","mqtt","plugin"],"created_at":"2024-09-24T23:57:28.205Z","updated_at":"2025-04-10T11:09:23.805Z","avatar_url":"https://github.com/TotalKrill.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/TotalKrill/mosquitto_plugin/workflows/ci/badge.svg)](https://github.com/TotalKrill/mosquitto_plugin/actions)\n\n# Mosquitto Plugin\n\nA simple way to generate ACL and PASSWORD plugins for usage with the mosquitto\nbroker.\n\nRequires that mosquitto_plugin.h mosquitto.h files are installed on the system,\non linux systems this is usually achieved through the mosquitto-dev packages.\nNot tested on windows.\n\nTo pass additional (clang) arguments to the clang invocation from `bindgen`, set\n`MOSQUITTO_PLUGIN_CLANG_EXTRA_ARGS` for e.g a special search path for the\nmosquitto headers: \"-I ../mosquitto-2.0.4/include\".\n\nThe optional functions are not implemented here.\n\n## Debugging Segfaults\n\nbeing a plugin utilizing the C ABI interface of mosquitto, there might be segfaults \ndue to unexpected behaviour  in how  mosquitto calls into the plugin, compiling in \ndebug mode will enable asserts of most raw pointer usage and can help in debugging \nsuch cases.\n\nOtherwise, look at unsafe code, thats where segfaults occur. Which leaves the entire\nmosquitto codebase, but mosquitto is quite well tested by now. So start looking in this code\n\n## Supported\n\n    - ease of access to write own mosquitto plugins\n    - auth_opt_\u003ckey\u003e value in the mosquitto_conf\n    - mutable access to the structure between calls\n    - ACL implementations\n    - username/password implementatations\n\n## Example usage\n\nThere is an example usage in the github repo under \"examples/acl\" folder.\n\n### Basic authentification\n\nSimple example that allows only password/username combos where the password is\nreversed (and no credentials as well, since those do not invoke ACL calls, and\nthus needs to be configured in a mosquitto configuration)\n\nIt also only allows messages on the topic specified in the mosquitto config as\nauth_opt_topic\n\nSee the provided examples/mosquitto-acl.conf for details.\n\nStart build and run:\n\n```\ncargo build --example basic-auth\nmosquitto -c examples/basic-auth.conf\n```\n\n### Extended authentification\n\nExample how to negotiate authentification with a client with v5 AUTH packages.\n\nStart build and run:\n\n```\ncargo build --example extended-auth\nmosquitto -c examples/extended-auth.conf\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotalkrill%2Fmosquitto_plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotalkrill%2Fmosquitto_plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotalkrill%2Fmosquitto_plugin/lists"}