Skip to content

Allow nested paths for the message subject in a policy (message ressource) #2267

@thomas-fries-keen

Description

@thomas-fries-keen

Hi there,

we want to control authorization for messages that are allowed to be sent to a twin. A feature can receive all kinds and variants of messages and so we want to structure the messages. Fortunately the ditto REST API allows this. I can sent these kind of messages to a feature:

/features/CoffeeBrewer/inbox/messages/brew/espresso
/features/CoffeeBrewer/inbox/messages/brew/cappuccino

This issue is about to control access in the same way. It should be possible to grant access to message subjects with a nested path in the policy entry. Example:

...
"resources": {
        "thing:/": {
          "grant": [
            "READ",
            "WRITE"
          ],
          "revoke": []
        },
        "message:/features/CoffeeBrewer/inbox/messages/brew/espresso": {
          "grant": [
            "READ",
            "WRITE"
          ],
          "revoke": []
        }
      }
...

Should grant access to sent this message: message:/features/CoffeeBrewer/inbox/messages/brew/espresso
But not to sent this message: message:/features/CoffeeBrewer/inbox/messages/brew/cappuccino
It would be nice that policies allow nested paths on the messages like it is supported for the thing: ressource (see this documentation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions