Commit Graph

868 Commits

Author SHA1 Message Date
Derek Collison
c4bcbf6275 Map anonymous reply subjects
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Derek Collison
f6cb706c68 First pass req/reply across accounts
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Derek Collison
620e1d7364 Basic account mapping via import and export
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Derek Collison
1cbfbfa071 Basic account support
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Ivan Kozlovic
d5ceade750 Merge pull request #753 from nats-io/route_perms_reload
[ADDED] Support for route permissions config reload
2018-09-27 10:08:55 -06:00
Ivan Kozlovic
4cd3453392 Set buf size limit to 50% of max_pending
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-27 09:43:56 -06:00
Ivan Kozlovic
2a1811b600 Fixed flappers
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-26 15:58:48 -06:00
Ivan Kozlovic
e7f5cc82f0 Updates
- Use stack buffers
- Ensure that buffer size is no greater than 90% of max_pending
- Added test with low max_pending

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-26 12:19:14 -06:00
Ivan Kozlovic
178aab096d Updates based on comments
- Removed un-needed lock/unlock
- Buffer SUBs/UNSUBs protocols and ensure flushing when buffer
  gets to a certain size (otherwise route would get disconnected
  with high number of subscriptions)

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-24 16:06:34 -06:00
Ivan Kozlovic
178766d6c9 [ADDED] Support for route permissions config reload
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-18 18:28:40 -06:00
Ivan Kozlovic
a065d13228 Merge pull request #752 from wallyqs/redacted-pass-regex-fix
Fix regex matching group for removing password
2018-09-16 10:42:42 -06:00
Waldemar Quevedo
7337eb6b80 Fix regex matching group for removing password
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-09-13 12:49:00 -07:00
Derek Collison
16c0f5b7f4 Update for nkey changes
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-13 11:41:28 -07:00
Waldemar Quevedo
255be72df8 Report warnings when using deprecated fields
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-09-11 17:50:02 -07:00
Waldemar Quevedo
df2364af26 Add -t pedantic config check to the server
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-09-11 16:06:53 -07:00
Ivan Kozlovic
846544ecfe Merge pull request #747 from nats-io/update_route_perms
[CHANGED] Cluster permissions moved out of cluster's authorization
2018-09-11 10:04:13 -06:00
Ivan Kozlovic
e1202dd30a [CHANGED] Cluster permissions moved out of cluster's authorization
It will be possible to set subjects permissions regardless of the
presence of an authorization block.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-10 17:03:50 -06:00
Derek Collison
129866bb76 Make warning style
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-10 15:32:26 -07:00
Derek Collison
e8611b1f47 Make sure mixed mode supported for config files.
Use test helpers for generating tmp configs.

Signed-off-by: Derek Collison <derek@nats.io>
2018-09-10 15:29:42 -07:00
Derek Collison
fff62d5bf7 Warn on plaintext passwords in config and redact from logs
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-10 15:29:42 -07:00
Derek Collison
3d2cb0e7d1 Basic nkey support and nonce handling
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-10 15:29:42 -07:00
Waldemar Quevedo
5e3950df0a Add Warnf to logger interface
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-09-10 14:50:48 -07:00
Ivan Kozlovic
deec3b821a Fixed flappers
During a config reload, it is possible for the server to send
an -ERR with auth violation and then close the connection.
Client library most of the time will process the -ERR but in
some cases, the socket read gets an error before that can happen.

Some tests were expectign the async error handler to fire, and would
fail the test otherwise. Changed those tests to still check that
if the async error is fire, we get the expected error, but not fail
the test if we don't. We still must get the disconnected callback
in those cases though.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-07 11:56:21 -06:00
Derek Collison
f85f002a28 Update tls and remove pre 1.9 files
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-06 19:00:44 -07:00
Derek Collison
fcf1cecda9 Merge pull request #737 from nats-io/route_perm2
Route permission propogation
2018-09-05 17:32:19 -07:00
Ivan Kozlovic
b15377b40c Merge pull request #736 from nats-io/fix_flappers
Fixed flapping tests
2018-09-05 18:10:50 -06:00
Derek Collison
f032dc4529 Simplify, don't need connect processing
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-05 17:03:45 -07:00
Ivan Kozlovic
8f480f3f42 Fixed flapping tests
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-05 17:22:15 -06:00
Derek Collison
2ee868ba18 Propogate route imports and exports to other connected servers
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-05 16:15:31 -07:00
Derek Collison
1b6b5b67a9 Merge pull request #735 from nats-io/routes_perm_reporting
Report route filtering on source server
2018-09-05 14:08:45 -07:00
Derek Collison
21f29cf897 Move tests
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-05 13:52:52 -07:00
Derek Collison
4b7cca2f5e Report route filtering on source server
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-05 11:55:15 -07:00
Ivan Kozlovic
c5203dc763 Update some tests
- Config reload tests have been modified to not rely on symlink.
- Close logger on shutdown (for Windows tests cleanup)

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-05 10:45:09 -06:00
Ivan Kozlovic
5e21ca9330 [FIXED] Ports file on Windows
Needed to use filepath, not path for Join/Base in order for that
to work. Tests were actually failing on Windows and now they pass.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-05 10:00:33 -06:00
Ivan Kozlovic
2ce3aba434 Bump version and fix megacheck report
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-05 09:33:01 -06:00
Derek Collison
803ca55e87 Merge pull request #729 from nats-io/sublist_race
Avoid a race between sublist and cache on store
2018-08-29 11:48:43 -06:00
Derek Collison
5b7cabd25e Avoid race between sublist and cache on store-s 2018-08-29 11:34:55 -06:00
Ivan Kozlovic
1cdf39d7f4 Merge pull request #727 from nats-io/fix_route_permissions
Fixed crash related to route permissions after allow/deny feature
2018-08-27 19:16:35 -06:00
Ivan Kozlovic
156224a85b Fix sublist cache flapping test
Use `checkFor` to ensure that cache size is ok. Repeated test
1000 times and no failure now.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-08-27 15:01:38 -06:00
Ivan Kozlovic
7e39d0935d Fixed crash related to route permissions after allow/deny feature
This is an issue in master only, not in any public release.
The issue is that permissions should be assigned as-is for the
route perms because Publish/Subscribe could be nil, so trying
to dereference Publish.Allow/Deny or Subscribe.Allow/Deny could
crash. The code checking for permissions correctly check if
Publish/Subscribe is nil or not.

This was introduced with PR #725

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-08-27 14:43:32 -06:00
Derek Collison
c926b56d1f Merge pull request #726 from nats-io/sublist_cache
Sublist Shared Cache Improvements
2018-08-27 12:03:49 -07:00
Derek Collison
2c4b7e7d54 Let cache sweeper run
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-27 12:56:28 -06:00
Derek Collison
ad3a1506d3 Move test into cache test, make sure it fails
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-27 12:49:29 -06:00
Derek Collison
ab9e4c7d8a Fix for wildcard cache addition
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-27 12:28:32 -06:00
Derek Collison
d21ac8de35 Use sync.Map for cache, fast version of literal test
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-25 17:42:36 -07:00
Derek Collison
543d403337 Optimize sublist cache, add tests for cache contention
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-25 14:33:15 -07:00
Derek Collison
34b556dd9f Additional nil checks for perms
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-25 09:49:29 -07:00
Derek Collison
7b9bab22c9 Reduce duplicate code, check subjects
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-23 16:47:20 -07:00
Derek Collison
3798df3044 Undo tmp changes not meant for PR
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-23 16:41:55 -07:00
Derek Collison
5955f22d65 Add in route permission support
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-23 14:42:43 -07:00