Commit Graph

2565 Commits

Author SHA1 Message Date
Derek Collison
cd3c1c7a3f Basic partitioning
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-19 14:07:02 -07:00
Derek Collison
98b78d06c4 First pass pull mode, e.g. worker
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-19 14:07:02 -07:00
Ivan Kozlovic
9214fa2995 Update expiration test
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-05-19 14:06:29 -07:00
Ivan Kozlovic
09c1acc36c Fix message expiration
Also add missing `package` for sysmem/windows

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-05-19 14:06:29 -07:00
Derek Collison
dd116fcfd4 JetStream first pass basics.
This is the first checkin for JetStream. Has some rudimentary basics working.

TODO
1. Push vs pull mode for observables. (work queues)
2. Disk/File store, memory only for now.
3. clustering code - design shaping up well.
4. Finalize account import semantics.
5. Lots of other little things.

Signed-off-by: Derek Collison <derek@nats.io>
2020-05-19 14:06:29 -07:00
Ivan Kozlovic
2b8ebfcf07 Merge pull request #1403 from nats-io/account_system_operator
Pointing to jwt master
2020-05-19 14:25:47 -06:00
Matthias Hanel
84e52bfb44 Pointing to jwt master
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-19 16:06:22 -04:00
Ivan Kozlovic
92cb24c5f2 Merge pull request #1400 from nats-io/account_system_operator
Account system operator
2020-05-19 13:48:18 -06:00
Matthias Hanel
aa1a768cce Move system account check to validateTrustedOperators
As a consequence of this change, certain unit tests had to actually
start the server and move to a memory resolver to keep the test simpler.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-19 15:39:18 -04:00
Matthias Hanel
e509ec59a1 Raise error when system_account in config and operator jwt do not match
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-18 23:35:43 -04:00
Matthias Hanel
a2744858bc Looking up system_account from operator jwt
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-18 19:09:46 -04:00
Matthias Hanel
a989024075 Picking up jwt branch corresponding to this change
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-18 18:57:39 -04:00
Ivan Kozlovic
bf0930ee76 Merge pull request #1394 from nats-io/release_2_1_7
Release v2.1.7
v2.1.7
2020-05-14 11:33:56 -06:00
Ivan Kozlovic
b329215af3 Release v2.1.7
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-05-13 19:40:49 -06:00
Ivan Kozlovic
54e014070f Merge pull request #1392 from guilherme-santos/master
[ADDED] base path for monitoring endpoints
2020-05-13 16:28:57 -06:00
Guilherme Santos
25858cba0b Implement basePath for monitoring endpoints 2020-05-13 23:29:11 +02:00
Ivan Kozlovic
0c3acfbaad Merge pull request #1393 from nats-io/internal_client_reload
Move reset of internal client to after the account sublist was moved.
2020-05-13 14:43:30 -06:00
Matthias Hanel
d486f6ab9b Move reset of internal client to after the account sublist was moved.
This does not avoid the race condition, but makes it less likely to
trigger in unit tests.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-13 15:52:29 -04:00
Ivan Kozlovic
09a58cbada Merge pull request #1387 from nats-io/reload
[FIXED] Unnecessary account reloads
2020-05-12 16:09:39 -06:00
Ivan Kozlovic
9a6c840039 Merge pull request #1391 from nats-io/default_perms
[FIXED] default_permissions apply to nkey users as well
2020-05-12 16:08:12 -06:00
Matthias Hanel
04b81abdde [FIXED] default_permissions apply to nkey users as well
Fixes 1390

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-12 17:13:25 -04:00
Matthias Hanel
11c0669ae2 [FIXES] Unnecessary account reloads and pointer to old accounts
Fixes #1372 by updating s.sys.account pointer.

This issue also showed that accounts are unnecessarily reloaded.
This happened because account imports were not copied and thus,
deepEqual detected a difference were none was.
This was addressed by making the copy less shallow.

Furthermore did deepEqual detects a difference when it compared
slices that were appended to while processing a map.
This was fixed by sorting before comparison.

Noticed that Account.clients stored an unnecessary pointer.
Removed duplicated code in systemAccount.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-11 21:51:41 -04:00
Waldemar Quevedo
db5c8aec8a Merge pull request #1386 from wallyqs/tls-auth-rdns
Add support to match domainComponent (DC) in RDNSequence with TLS Auth
2020-05-11 17:54:54 -07:00
Waldemar Quevedo
9a2d095885 Add support to match domainComponent (DC) in RDNSequence with TLS Auth
Currently when using TLS based authentication, any domain components
that could be present in the cert will be omitted since Go's
ToRDNSequence is not including them:

202c43b2ad/src/crypto/x509/pkix/pkix.go (L226-L245)

This commit adds support to include the domain components in case
present, also roughly following the order suggested at:
https://tools.ietf.org/html/rfc2253

Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2020-05-11 17:41:11 -07:00
Ivan Kozlovic
80b4857cd7 Merge pull request #1385 from nats-io/fix_close_conn
[FIXED] Early closed connection may linger in the server
2020-05-08 12:01:57 -06:00
Ivan Kozlovic
46f880bc52 [FIXED] Early closed connection may linger in the server
If the connection is marked as closed while sending the INFO, the
connection would not be removed from the internal map, which would
cause it to be shown in the monitoring list of opened connections.

Resolves #1384

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-05-08 12:01:15 -06:00
Ivan Kozlovic
81fabde729 Merge pull request #1362 from nats-io/monitoring_as_systemevents
[ADDED] Making monitoring endpoints available via system services.
2020-05-07 11:37:50 -06:00
Ivan Kozlovic
1ab26dfa0f Merge pull request #1381 from nats-io/validateOnReload
[FIXED] on reload, check error conditions checked in validateOptions
2020-05-06 15:50:03 -06:00
Matthias Hanel
0eae40070b [FIXED] on reload, check error conditions checked in validateOptions
Fixes #1378 by calling validateOptions on reload
Add missing comment to validateOptions

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-06 17:38:28 -04:00
Ivan Kozlovic
7e60769f9e Merge pull request #1377 from nats-io/subsz
[FIXED] subsz monitoring endpoint did not account for accounts.
2020-05-06 14:06:12 -06:00
Matthias Hanel
136feb9bc6 [FIXEd] subsz monitoring endpoint did not account for accounts.
Fixes  #1371 and #1357 by adding up stats and collecting subscriptions
from all accounts.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-06 15:48:51 -04:00
Ivan Kozlovic
b1f1e878c6 Merge pull request #1363 from nats-io/default_user
[ADDED] Configuration to allow non authorized user to bind to a given account
2020-05-06 10:02:13 -06:00
Matthias Hanel
14c716052d Making monitoring endpoints available via system services.
Available via $SYS.REQ.SERVER.%s.%s and $SYS.REQ.SERVER.PING.%s
Last token is the endpoint name.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-04 13:31:50 -04:00
Matthias Hanel
b074c941ae Add a no_auth_user
This configuration allows to refer to a configured user to be used when
the connection provides no credentials.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-02 15:59:06 -04:00
Derek Collison
487e7bdff7 Merge pull request #1364 from nats-io/tyler_split_issue_templates
Use split GitHub issue templates
2020-04-30 05:27:53 -07:00
Tyler Neely
27882a93cd Add header with the issue type to the top of the issue templates 2020-04-30 02:45:15 +02:00
Tyler Neely
5f9e36b324 Use GitHub issue templates to present reporters with a more streamlined reporting experience 2020-04-30 02:37:56 +02:00
Ivan Kozlovic
a8be338bc1 Merge pull request #1352 from nats-io/update_gws_urls
[FIXED] Update remote gateway URLs when node goes away in cluster
2020-04-20 14:10:18 -06:00
Ivan Kozlovic
fef94759ab [FIXED] Update remote gateway URLs when node goes away in cluster
If a node in the cluster goes away, an async INFO is sent to
inbound gateway connections so they get a chance to update their
list of remote gateway URLs. Same happens when a node is added
to the cluster.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-04-20 13:48:47 -06:00
Ivan Kozlovic
5e9bff33f3 Merge pull request #1348 from nats-io/add_close_reason_in_log_statement
[IMPROVED] Added close reason in the connection close log statement
2020-04-15 18:32:57 -06:00
Ivan Kozlovic
2ec00d86ed Replaced %v with %s so String() is not needed
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-04-15 17:52:44 -06:00
Ivan Kozlovic
be00ea96cf [IMPROVED] Added close reason in the connection close log statement
This gives the close reason directly in the log without having to
get that information from the monitoring endpoint. Here is an
example of a route closed due to the remote side not replying to
PINGs:

```
[INF] 127.0.0.1:53839 - rid:2 - Router connection closed: Stale Connection
```

Without this change, the log statement would have been:
```
[INF] 127.0.0.1:53839 - rid:2 - Router connection closed
```

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-04-15 15:36:54 -06:00
Ivan Kozlovic
f7db844c79 Merge pull request #1347 from nats-io/fix_leafnode_test_flappers
Fix some leafnode test flappers
2020-04-15 15:36:17 -06:00
Ivan Kozlovic
1cf21fc4ee Fix some leafnode test flappers
Make use of some existing helpers and add checkFor in some places
since accounting updates may not be instantaneous.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-04-15 15:15:26 -06:00
Ivan Kozlovic
9fe4146d9d Merge pull request #1346 from nats-io/fix_flapper
Fixed flapper test
2020-04-14 16:23:00 -06:00
Ivan Kozlovic
c54f41acd6 Fixed flapper test
Make sure that the subscription on "service" is registered on
server A.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-04-14 13:27:17 -06:00
Derek Collison
9af6dcd19d Merge pull request #1345 from nats-io/ln_restart_bug
Fix for #1344
2020-04-14 11:46:14 -07:00
Derek Collison
a301d6731b Re-order client close
Signed-off-by: Derek Collison <derek@nats.io>
2020-04-14 09:54:57 -07:00
Derek Collison
aff10aa16b Fix for #1344
Signed-off-by: Derek Collison <derek@nats.io>
2020-04-14 09:26:35 -07:00
Derek Collison
dda1046305 Merge pull request #1343 from nats-io/fix_gw_hub_ln_interest_propagation
Fix gateway and leafnode hubs in interest propagation
2020-04-13 15:33:54 -07:00