Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ACL Engine #35

Open
JavaSaBr opened this issue Dec 2, 2019 · 2 comments
Open

Implement ACL Engine #35

JavaSaBr opened this issue Dec 2, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@JavaSaBr
Copy link
Owner

JavaSaBr commented Dec 2, 2019

Implement ACL Engine in EMQ style:

{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
{allow, all, publish, ["/smarthome/%c/temperature"]}.
{allow, {ipaddr, "10.211.55.10"}, pubsub, ["$SYS/#", "#"]}.
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.

https://docs.emqx.io/tutorial/v3/en/security/acl.html

@JavaSaBr JavaSaBr added the enhancement New feature or request label Dec 2, 2019
@Wagos
Copy link
Collaborator

Wagos commented Jan 15, 2020

New JSON-like acl format:
{users:["dashboard"], event:"subscribe", topics:["$SYS/#"]}
{users:["dashboard"], event:"subscribe", topics:["$SYS/#"]}
{event:"publish", topics:["/smarthome/%c/temperature"]}
{ipaddr:["10.211.55.10"], event:"pubsub", topics:["$SYS/#", "#"]}
{deny:true, event:"subscribe", topics:["$SYS/#", "#"]}

@JavaSaBr
Copy link
Owner Author

What about this option?

[
   {
      "type": "allow",
      "clients": {
         "users": [
            "dashboard"
         ]
      },
      "event": "sub",
      "topics": [
         "$SYS/#"
      ]
   },
   {
      "type": "allow",
      "clients": {
         "users": [
            "dashboard"
         ]
      },
      "event": "sub",
      "topics": [
         "$SYS/#"
      ]
   },
   {
      "type": "allow",
      "event": "pub",
      "topics": [
         "/smarthome/%c/temperature"
      ]
   },
   {
      "type": "allow",
      "clients": {
         "ipAddresses": [
            "10.211.55.10"
         ]
      },
      "event": "pubsub",
      "topics": [
         "$SYS/#",
         "#"
      ]
   },
   {
      "type": "deny",
      "event": "sub",
      "topics": [
         "$SYS/#",
         "#"
      ]
   }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants