Commit Graph

3245 Commits

Author SHA1 Message Date
Derek Collison
511cdaa5ac Do not report bad latency on auto-unsubscribe triggers
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-22 05:41:33 -07:00
Ivan Kozlovic
16cb6822a7 Merge pull request #1660 from nats-io/amend_pr_1652
Prevent panic when accepting TLS leafnode connections
2020-10-21 15:45:42 -06:00
Ivan Kozlovic
bea9fca24c Prevent panic when accepting TLS leafnode connections
This is an addition to PR #1652. I have simply added a check but
at this point in time there is no risk that connection is closed
this early.
I also renamed the small helper function and fixed a test that
had an improper `s.mu.Unlock()` in an error condition.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-21 14:53:03 -06:00
Derek Collison
0adb8d149b Merge pull request #1659 from nats-io/overflow
Do not forward service import messages to a stream export.
2020-10-21 07:28:25 -07:00
Derek Collison
705f8b6ed7 Do not forward service import messages to a stream export.
Addresses stack overflow issue wally was seeing with configs
that mix and match streams and services between each other.

Signed-off-by: Derek Collison <derek@nats.io>
2020-10-20 19:20:44 -07:00
Ivan Kozlovic
496d18468a Merge pull request #1655 from nats-io/remove-jwt
Adding support and an option for removal of jwt
2020-10-20 15:05:11 -06:00
Matthias Hanel
2144f01f21 Adding support and an option for removal of jwt
To enable in full mode configure allow_delete: true
When enabled the file will be renamed to allow for manual restore.

In cache mode it will be enabled by default.
When enabled files will be deleted.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-20 16:45:11 -04:00
Derek Collison
a23fb53ee3 Update number of client implementations 2020-10-19 19:39:38 -07:00
Ivan Kozlovic
ced31507a4 Bump version to 2.2.0-beta.26
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-19 17:07:51 -06:00
Ivan Kozlovic
cb84f6e1e5 Merge pull request #1654 from nats-io/update-acc-mal
Fixed account update issue where signing key (and thus issuer) changes
2020-10-19 17:01:23 -06:00
Matthias Hanel
f83280ccaf Fixed account update issue where signing key (and thus issuer) changes
Fix error and remove print from test.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-19 18:42:10 -04:00
Ivan Kozlovic
20ccf52cce Merge pull request #1653 from nats-io/accountz
Fix nil deref when account is in bad/incomplete state
2020-10-19 15:43:44 -06:00
Matthias Hanel
243361ac9a Incorporating readability suggestions
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-19 17:33:02 -04:00
Matthias Hanel
5a5dbb9dcd Fix nil deref when account is in bad/incomplete state
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-19 16:38:42 -04:00
Ivan Kozlovic
d6e420a996 Merge pull request #1652 from nats-io/fix_leafnode_accept_panic
[FIXED] Possible panic when server accepts TLS leafnode connection
2020-10-19 11:09:46 -06:00
Ivan Kozlovic
9bd088e0b9 Make it a small function
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-19 10:50:20 -06:00
R.I.Pienaar
2a956709f2 Merge pull request #1651 from ripienaar/num_accounts_type
add type hints num accounts message
2020-10-19 18:31:03 +02:00
Ivan Kozlovic
3b8d00e046 [FIXED] Possible panic when server accepts TLS leafnode connection
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-19 10:29:32 -06:00
R.I.Pienaar
ec606ebed2 add type hints num accounts message
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-10-19 12:01:11 +02:00
Derek Collison
923335e52d Merge pull request #1644 from nats-io/map
Traffic shaping and full wildcard support for streams and services exports/imports
2020-10-17 16:19:15 -07:00
Derek Collison
4af434e586 Allow mapping destinations to be parsed as singles and not force array syntax
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-17 08:21:02 -07:00
Derek Collison
cea8a0113d Use separate lock to pull cluster name for mapping
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-17 07:46:48 -07:00
Derek Collison
5f5ceb4668 Allow cluster filters for mappings, changed accountz for mappings
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-16 16:53:14 -07:00
Derek Collison
047600750a Make sure mappings to 0% turn off all traffic
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-16 14:23:47 -07:00
Derek Collison
04ffe3b00e Allow mapping destinations that introduce message loss (debugging, chaos monkey)
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 20:03:44 -07:00
Derek Collison
d0201d8b15 Added support for mappings in Accountz
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 19:14:58 -07:00
Derek Collison
4402a9cca0 Snapshot account but update at end of each readloop
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 15:52:43 -07:00
Derek Collison
e225acd179 Fix race accessing c.acc checking for mappings
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 14:02:39 -07:00
Ivan Kozlovic
e846dab45d Merge pull request #1646 from wallyqs/ws-err-typo-fix
Fix typo in websocket err message
2020-10-15 15:01:46 -06:00
Waldemar Quevedo
33a9391519 Fix typo in websocket err message
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2020-10-15 13:42:22 -07:00
Derek Collison
96bf818558 Updates based on PR feedback
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 13:04:04 -07:00
Ivan Kozlovic
a12a133b29 Merge pull request #1645 from nats-io/activation-revocation
[Fixed] revocation check for activations used current time instead of jet issue time
2020-10-15 13:51:05 -06:00
Matthias Hanel
2bfb8b1227 [Fixed] revocation check for activations used current time instead of jwt issue time
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-15 15:36:50 -04:00
Derek Collison
6faf07d583 Account subject mappings and full wildcard support for exports/imports
The mappings enable traffic shaping functionality.
Also added a subject transform which can match any subject and transform to a new one, even re-ordering partial wildcards.

Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 10:26:25 -07:00
Derek Collison
93b54b230e Merge pull request #1643 from ripienaar/offset_npe
fix npe for offsets larger than items
2020-10-15 05:41:34 -07:00
R.I.Pienaar
f2106ab9e4 fix npe for offsets larger than items
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-10-15 11:27:31 +02:00
Ivan Kozlovic
fe7fd92c89 Merge pull request #1641 from nats-io/fix_gw_shadow_subs
[FIXED] Stream's subscription propagation issue with gateways
2020-10-13 19:21:24 -06:00
Ivan Kozlovic
26cd1f99ab [FIXED] Stream's subscription propagation issue with gateways
When creating shadow subscriptions for import streams, we were
not invoking code for gateway subscription accounting, which means
that when the account (for leafnodes) was switched to interest
only, those shadow subscriptions were not sent.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-13 18:10:27 -06:00
Ivan Kozlovic
99cb1fb3f0 Merge pull request #1640 from nats-io/jwt-remove
Fixed crash on non existing directory
2020-10-13 09:13:53 -06:00
Matthias Hanel
60c8cbd1f2 Fixed crash on non existing directory
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-13 01:30:03 -04:00
Ivan Kozlovic
a4c68521ba Merge pull request #1639 from nats-io/jwt-remove
Adding list/delete/update operations for jwt stored by nats-resolver
2020-10-12 18:20:18 -06:00
Matthias Hanel
8d8f6480d7 Incorporating comments
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-12 19:21:32 -04:00
Matthias Hanel
bb63fd5f40 Adding list/delete/update operations for jwt stored by nats-resolver
Update already existed scoped by account, this exposes update without account.
List returns a list of all stored accounts.
Delete deletes accounts.
Fix a crash on startup with non existing directory.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-12 18:07:07 -04:00
Waldemar Quevedo
aead978be9 Merge pull request #1638 from nats-io/revert-1637-nightly-bin-path
Revert "Update nightly image server binary path"
2020-10-10 09:37:58 -07:00
Waldemar Quevedo
1bc03cd95e Revert "Update nightly image server binary path" 2020-10-09 16:54:59 -07:00
Jaime Piña
23a56591a7 Merge pull request #1637 from nats-io/nightly-bin-path
Update nightly image server binary path
2020-10-09 15:14:35 -07:00
Jaime Piña
9f94cb5fb7 Update nightly image server binary path
Currently, the NATS operator doesn't work with the nightly NATS Server images because binary is in a different location. This symlinks the binary to a few different known paths.
2020-10-09 14:44:07 -07:00
Ivan Kozlovic
fec5b7fdef Merge pull request #1635 from nats-io/sys-acc-rev-fix
Skip revocation check if the client has no jwt and is therefore internal
2020-10-09 12:57:15 -06:00
Matthias Hanel
db44b589fc Skip revocation check if the client has no jwt and is therefore internal
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-09 14:41:32 -04:00
Ivan Kozlovic
618cde9039 Merge pull request #1634 from nats-io/warn_duplicate_server_name
Accepting route warns if remote server has same name
2020-10-09 10:19:40 -06:00