Files
nats-server/server/configs/new_style_authorization.conf
Jaime Piña 176a19de75 Update SYS account name
Currently, the $SYSTEM subject is used in this repo, but it seems like this
subject name is out of date.

This change updates the code to use $SYS to match the documentation.
2019-09-04 13:49:59 -05:00

34 lines
718 B
Plaintext

listen: 127.0.0.1:4222
authorization {
# Our new style role based permissions.
# These support both allow and deny.
# If allow is empty it means all or ">"
# If deny is empty it means none, or empty list.
normal_user = {
# Can send to foo, bar or baz only.
publish = {
allow = ["foo", "bar", "baz"]
}
# Can subscribe to everything but $SYS prefixed subjects.
subscribe = {
deny = "$SYS.>"
}
}
admin_user = {
publish = "$SYS.>"
subscribe = {
deny = ["foo", "bar", "baz"]
}
}
# Users listed with persmissions.
users = [
{user: alice, password: foo, permissions: $normal_user}
{user: bob, password: special, permissions: $admin_user}
]
}