Add route permissions

The `client.perms` struct is left unchanged. We simply map Import
and Export semantics to existing Publish and Subscribe ones.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2018-06-21 17:01:08 -06:00
parent a05b9e1e34
commit bf3bc81722
6 changed files with 316 additions and 44 deletions

View File

@@ -0,0 +1,25 @@
# Cluster Server A
listen: 127.0.0.1:5222
cluster {
listen: 127.0.0.1:5244
authorization {
user: ruser
password: top_secret
timeout: 0.5
permissions {
import: "foo"
export: ["bar", "baz"]
}
}
# Routes are actively solicited and connected to from this server.
# Other servers can connect to us if they supply the correct credentials
# in their routes definitions from above.
routes = [
nats-route://ruser:top_secret@127.0.0.1:5246
]
}