-
Notifications
You must be signed in to change notification settings - Fork 259
Description
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)