-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #725 from nats-io/deny
Deny/Allow Permissions
- Loading branch information
Showing
12 changed files
with
402 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
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 $SYSTEM prefixed subjects. | ||
subscribe = { | ||
deny = "$SYSTEM.>" | ||
} | ||
} | ||
|
||
admin_user = { | ||
publish = "$SYSTEM.>" | ||
subscribe = { | ||
deny = ["foo", "bar", "baz"] | ||
} | ||
} | ||
|
||
# Users listed with persmissions. | ||
users = [ | ||
{user: alice, password: foo, permissions: $normal_user} | ||
{user: bob, password: special, permissions: $admin_user} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.