Commit Graph

3385 Commits

Author SHA1 Message Date
Waldemar Quevedo
886ecf7f89 Add support for subjects with multi value RDN
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2020-11-20 22:13:52 -08:00
Waldemar Quevedo
4029650740 Add test for multiple CNs
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2020-11-20 22:08:03 -08:00
Ivan Kozlovic
4d51a41dfd Merge pull request #1727 from nats-io/tls-verify-and-impliict-allow
[ADDED] verify_cert_and_check_known_urls to tie subject alt name to url in cfg
2020-11-20 15:10:01 -07:00
Matthias Hanel
8fd1b66f66 Renaming to verify_cert_and_check_known_urls
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-11-20 16:56:44 -05:00
Derek Collison
beda0c397a Merge pull request #1729 from nats-io/js_export
Enable JetStream streams and consumer access to be exported
2020-11-20 11:28:44 -08:00
Matthias Hanel
eda80ff7b5 changing the option name verify_and_implicit_allow to verify_and_accept_known_urls
This follows the suggestion by phil. I added the and to be similar to verify_and_map.
I fixed a minor issue where the implicit verify could be overwriting an
explicitly configured one.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-11-20 14:27:24 -05:00
Matthias Hanel
06e4e93185 Speeding up unit test fail case
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-11-20 13:57:34 -05:00
Matthias Hanel
f24aec4af7 Incorporating comments and fixed an issue where code was not invoked
had to change failing tests to use insecure as to not fail due to the
outgoing connection being not trusted.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-11-20 13:57:34 -05:00
Matthias Hanel
74642e024e [Added] verify_and_implicit_allow to tie subject alt name to url in cfg
Only works for gateways and routes. When true the subject alt DNS name
must match one url in the corresponding configuration

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-11-20 13:57:34 -05:00
Derek Collison
a1c1ead39d Enable JetStream streams and consumer access to be exported to another account
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-20 10:17:16 -08:00
Ivan Kozlovic
27c7a36446 Merge pull request #1728 from nats-io/sys-referencable-in-leaf
[Adding] ability to reference $SYS in leaf node config
2020-11-20 10:59:22 -07:00
Matthias Hanel
1229bed9fa [Adding] ability to reference $SYS in leaf node config
only do so if $SYS is the system account

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-11-19 22:32:42 -05:00
Ivan Kozlovic
a3af49152e Merge pull request #1725 from nats-io/fix_1722
[FIXED] LeafNode: duplicate queue messages in complex routing setup
2020-11-19 09:06:28 -07:00
Ivan Kozlovic
55b0f8d855 [FIXED] LeafNode: duplicate queue messages in complex routing setup
Suppose a cluster of 2 servers, let's call them leaf1 and leaf2.
These servers are routed and have a leaf connection to another
server, let's call it srv1.
They share the same cluster name.

If a queue subscriber runs on srv1 and a queue subscriber on the
same subject/group name runs on leaf1, if a requestor runs on
leaf2, the request should reach only one of the 2 queue subs.

The defect was that sometimes both queue subs would receive the
message.

The added test checks that only one reply is ever received and
that the local "leaf" cluster is preferred.

Resolves #1722

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-11-18 11:23:08 -07:00
Phil Pennock
bfd388e8b4 Bump beta version (.33) (#1724) 2020-11-18 10:49:42 -05:00
Ivan Kozlovic
16d7d032e1 Merge pull request #1719 from nats-io/fetch-acc-nkeys-only
Only fetch account jwt if the name is a proper public account key
2020-11-17 17:46:14 -07:00
Matthias Hanel
2c2a6e45fe Incorporating comment and making fetchAccount private
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-11-17 19:26:34 -05:00
Derek Collison
28d8a4be9c Merge pull request #1721 from nats-io/fsfix2
Fix for not properly recovering first sequence number on recovery.
2020-11-17 15:22:02 -08:00
Derek Collison
d358aaddf6 Fixes for filestore not remember first sequence when all messages deleted.
Thsi fixed a few minor bugs as well as the one where we did not remember our sequence numbers.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-17 15:04:57 -08:00
Ivan Kozlovic
f7f994ec7c Merge pull request #1720 from nats-io/rename-reject-unknown
Rename reject_unknown to reject_unknown_cluster
2020-11-17 15:57:20 -07:00
Matthias Hanel
3b4da21e07 Rename reject_unknown to reject_unknown_cluster
this is supposed to make it clearer what is being rejected

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-11-17 17:54:45 -05:00
Matthias Hanel
f69dc5cfd6 Only fetch account jwt if the name is a proper public account key
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-11-17 17:18:47 -05:00
Derek Collison
68416d291b Merge pull request #1717 from nats-io/ackReply
Optimize ackReply parsing
2020-11-17 11:44:34 -08:00
Ivan Kozlovic
86ea8b9b45 Merge pull request #1718 from AdamKorcz/master
Updated fuzzer
2020-11-17 12:02:35 -07:00
AdamKorcz
1191293cbf Updated fuzzer 2020-11-17 18:57:45 +00:00
Derek Collison
aa35d0818d Optimize ackReply parsing
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-17 10:36:14 -08:00
Ivan Kozlovic
288ab48673 Merge pull request #1684 from AdamKorcz/master
[ADDED] Fuzzers
2020-11-17 11:34:54 -07:00
AdamKorcz
3126930654 Merge branch 'master' of https://github.com/AdamKorcz/nats-server 2020-11-17 18:15:08 +00:00
AdamKorcz
f6aca96696 Updated year in header 2020-11-17 18:13:21 +00:00
R.I.Pienaar
b9427db3c3 Merge pull request #1715 from ripienaar/lookup_request
support json requests for stream lookup
2020-11-17 19:04:29 +01:00
Ivan Kozlovic
5e9bad5b26 Test showing issue with filestore after a restart
I have pin-pointed that the issue started at this commit:
d737ccef55

This was PR: https://github.com/nats-io/nats-server/pull/1685

Prior to this PR, the test would pass.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-11-17 09:01:36 -07:00
R.I.Pienaar
ca8cbcdc63 support subjects starting with {
still doesnt support a subject {}

Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-11-17 16:33:22 +01:00
R.I.Pienaar
02eaf6d831 trim json text
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-11-17 16:06:12 +01:00
R.I.Pienaar
a4116cc0fa support json requests for stream lookup 2020-11-17 15:33:44 +01:00
Derek Collison
7f1fce5078 Merge pull request #1714 from nats-io/maxp
Make sure to honor MaxAckPending when streaming directly to consumers
2020-11-16 18:24:55 -08:00
Derek Collison
67f4bf1ac1 Make sure to honor MaxAckPending when streaming directly to consumers
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-16 16:51:34 -08:00
Derek Collison
0156bea49a Merge pull request #1712 from nats-io/sendq
Decouple consumer from using stream's sendq.
2020-11-16 07:49:18 -08:00
Derek Collison
ce42addfe4 Merge pull request #1711 from nats-io/stream_lookup
Allow stream lookup by subject.
2020-11-16 05:59:13 -08:00
Derek Collison
cccb96097a Release lock for sending non-consumer messages as well
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-16 05:29:55 -08:00
Derek Collison
e93f448d32 Decouple consumer from using stream's sendq
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-15 15:26:30 -08:00
Derek Collison
f61fa8529a Merge pull request #1710 from nats-io/maxackpending
Add support for MaxAckPending
2020-11-15 06:50:23 -08:00
Derek Collison
5ff28b6087 Allow stream lookup by subject.
Allow an API endpoint and public API to lookup a stream by subject. The subject needs to be an exact match or a subset. If the subject is considered a filtered subject for the stream that will also be returned.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-14 13:35:05 -08:00
Derek Collison
9893aac8cb Add support for MaxAckPending
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-14 06:28:07 -08:00
Derek Collison
c851b39b79 Merge pull request #1709 from nats-io/removebug
Fix bug when removing the same message from a stream.
2020-11-13 18:24:16 -08:00
Derek Collison
28cb4e8c34 Fix bug when removing the same message from a stream.
We would release locks and call into upper layers when removing a message. The upper layers may call back into the lower layers to get more information, such as the subject.
This fix has the storage updates optionally supply the subject for filtered consumers and fixes the bug of double deletes.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-13 17:05:24 -08:00
Derek Collison
e57f6c9dee Larger AckWait to prevent flapping
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-13 08:06:43 -08:00
Derek Collison
3a6411ab5c Merge pull request #1707 from nats-io/fsfix
Fixed bug and a race condition
2020-11-12 14:02:24 -08:00
Derek Collison
2696749bb2 fix
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-12 13:58:34 -08:00
Derek Collison
cd03482ccb Fixed bug when returning wrong error from LoadMsg and a race condition
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-12 13:38:08 -08:00
Derek Collison
1a1aca0c30 Merge pull request #1705 from nats-io/interest
Make interest notifications explicit match only
2020-11-12 08:29:28 -08:00