Commit Graph

1586 Commits

Author SHA1 Message Date
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
Derek Collison
5bfbc8bb52 Merge pull request #746 from nats-io/log-warn
Add Warnf to Logger interface
2018-09-10 15:29:17 -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
2ee18d6c82 Merge pull request #742 from nats-io/fix_flappers
Fixed flappers
2018-09-07 13:55:02 -06: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
08977d7831 Merge pull request #741 from nats-io/tls
Update tls and remove pre 1.9 files
2018-09-07 08:29:54 -07: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
Ginger Collison
a741066906 Merge pull request #740 from nats-io/readme_url_update_2newdoc
updating README nats.io URL ref to match new doc dir path [ci skip]
2018-09-06 16:16:07 -05:00
ainsley
f070916e56 updating README nats.io URL references to match new doc dir path [ci skip] 2018-09-06 16:13:25 -05:00
ainsley
996043eaab updating README nats.io URL references to match new doc dir path [ci skip] 2018-09-06 11:52:30 -05:00
Ivan Kozlovic
9442135e7d Merge pull request #738 from nats-io/update_travis
Limit cross compile for time were we push a tag
2018-09-05 19:11:51 -06: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
aee7712f0d Limit cross compile for time were we push a tag
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-05 18:20:17 -06: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
fa506c8354 Make sure to reset http connections for repeated tests
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-05 12:21:32 -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
bc693ad894 Merge pull request #734 from nats-io/test_updates
Update some tests
2018-09-05 12:31:33 -06: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
c2602167f0 Merge pull request #733 from nats-io/fix_ports_file
[FIXED] Ports file on Windows
2018-09-05 10:43:36 -06:00
Colin Sullivan
c6a71aece7 Merge pull request #731 from nats-io/doc-route-perms
Document route permissions
2018-09-05 10:39:12 -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
2030d65ae2 Merge pull request #732 from nats-io/bump_version
Bump version and fix megacheck report
2018-09-05 09:49:03 -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
Colin Sullivan
0bc2663977 Document route permissions
[ci skip]

Signed-off-by: Colin Sullivan <colin@synadia.com>
2018-09-02 13:27:23 -06:00
Ivan Kozlovic
eed4fbc145 Merge pull request #730 from nats-io/new_release
Prepare for new release
v1.3.0
2018-08-30 09:04:11 -06:00
Ivan Kozlovic
0d3c1df932 Update based on code review
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-08-29 16:48:08 -06:00
Ivan Kozlovic
b79d618bf7 Prepare for new release
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-08-29 13:07:39 -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
9333f9ff0f Make listen port random in test added in previous PR
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-08-27 19:27:52 -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
7324271098 Merge pull request #728 from nats-io/fix_sublist_cache_flapper
Fix sublist cache flapping test
2018-08-27 19:05:57 -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
976e7548a9 Merge pull request #725 from nats-io/deny
Deny/Allow Permissions
2018-08-23 17:09:38 -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
27d754991e newline
Signed-off-by: Derek Collison <derek@nats.io>
2018-08-23 16:42:26 -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