Socket
Book a DemoInstallSign in
Socket

@harperdb/acl-connect

Package Overview
Dependencies
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harperdb/acl-connect

A component for defining pub/sub (MQTT) topics and their access control lists (ACLs) in HarperDB

npmnpm
Version
1.0.8
Version published
Maintainers
7
Created
Source

HarperDB ACL-Connect

This component allows you define a set of topics for pub/sub (MQTT) with ACLs specifying permissions.

To use this, add @harperdb/acl-connect to your projects dependencies and then add this extension to your application's config.yaml:

acl-connect:
  package: "@harperdb/acl-connect"
  database: data # The database to use for pub/sub
  file: connect.json

And connect.json should be a JSON file with the following format:

{
  "acls": [
    {
      "topicFilter": "topic/sub-topic/#",
      "publishers": [
        "a-group",
        "another-group"
      ],
      "subscribers": [
        "another-group"
      ]
    },
    ...
  ]
}

Topics support substitution with %u for the user's username and %c for the client id. For example, a topic of user/%u would be translated to user/smith for a user with the username smith.

Anonymous Subscriptions

In order for anonymous subscriptions to work correctly:

requireAuthentication must be set to false in your harper config. For example:

# In harperdb-config.yaml
mqtt:
    requireAuthentication: false

FAQs

Package last updated on 24 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts