mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 11:48:43 -07:00
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.
34 lines
718 B
Plaintext
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}
|
|
]
|
|
}
|