mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-15 18:50:41 -07:00
This sort of just punts on the problem by not creating log files in the tests, but it seemed like the simplest solution.
38 lines
930 B
Plaintext
38 lines
930 B
Plaintext
# Copyright 2017 Apcera Inc. All rights reserved.
|
|
|
|
listen: localhost:-1
|
|
|
|
authorization {
|
|
# Our role based permissions.
|
|
|
|
# Superuser can do anything.
|
|
super_user = {
|
|
publish = ">"
|
|
subscribe = ">"
|
|
}
|
|
# Can do requests on _INBOX.foo.bar, and subscribe to anything
|
|
# that is a response to an _INBOX.foo.
|
|
#
|
|
# Notice that authorization filters can be singletons or arrays.
|
|
req_pub_user = {
|
|
publish = ["_INBOX.foo.bar"]
|
|
subscribe = "_INBOX.foo.>"
|
|
}
|
|
|
|
# Setup a default user that can subscribe to anything, but has
|
|
# no publish capabilities.
|
|
default_user = {
|
|
subscribe = "PUBLIC.>"
|
|
}
|
|
|
|
# Default permissions if none presented. e.g. susan below.
|
|
default_permissions: $default_user
|
|
|
|
# Users listed with persmissions.
|
|
users = [
|
|
{user: alice, password: foo, permissions: $super_user}
|
|
{user: bob, password: bar, permissions: $req_pub_user}
|
|
{user: susan, password: baz}
|
|
]
|
|
}
|