Waldemar Quevedo
61d1ec53fa
Allow conf vars within account block
...
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2018-11-02 14:42:29 -07:00
Derek Collison
ea5a6d9589
Updates for comments, some golint fixes
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-10-31 20:28:44 -07:00
Derek Collison
47963303f8
First pass at new cluster design
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-10-24 21:29:29 -07:00
Ivan Kozlovic
0067c3bb04
Added support for lame duck mode
...
When receiving SIGUSR2 signal (or -sl ldm) the server stops
accepting new clients, closes routes connections and spread the
closing of client connections based on a config lame duck duration
(default is 30sec). This will help preventing a storm of client
reconnect when a server needs to be shutdown.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-10-19 19:07:37 -06:00
Waldemar Quevedo
e819f15ca4
Collecting all config errors then flush before exit
...
Show warnings on server startup
Removes notions around `pedantic` checks and instead
just reports the warnings in case there were any, or
the collection of errors that may have been found
in the configuration file.
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2018-10-16 13:29:29 -07:00
Waldemar Quevedo
ed1af40996
Add source to config errors
...
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2018-10-16 13:29:29 -07:00
Waldemar Quevedo
fdd1536a8a
Always parse config file with checks enabled
...
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2018-10-16 13:29:29 -07:00
Derek Collison
b014db8502
Updates based on comments
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-10-04 12:50:12 -07:00
Derek Collison
0d1d51a3bb
Support for global/reserved accounts
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-10-04 12:12:34 -07:00
Derek Collison
86c604932c
Merge pull request #760 from nats-io/config-report-pos
...
Report position of configuration errors
2018-10-03 15:23:06 -07:00
Waldemar Quevedo
18a62cdb60
Change style of reporting errors with line and pos
...
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2018-10-03 14:52:57 -07:00
Ivan Kozlovic
eab4af02a3
Fixed accounts users loading
...
Resolves #764
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-10-03 13:28:18 -06:00
Waldemar Quevedo
181b07ebc1
Config reporting with line and error position
...
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2018-10-02 11:38:15 -07:00
Derek Collison
14cdda8cd4
Updates from comments
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-09-30 09:36:32 -07:00
Derek Collison
9f8330bcc9
Added import and export parsing for configs
...
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
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
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
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
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
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
7b9bab22c9
Reduce duplicate code, check subjects
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-08-23 16:47:20 -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
Derek Collison
65188f9768
Added parser for new style authorizations
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-08-22 20:41:48 -07:00
Ivan Kozlovic
895f05e5e9
Merge pull request #691 from nats-io/port-file
...
Added Internal option to write a ports file `--ports_file_dir`
2018-07-02 18:03:47 -06:00
Alberto Ricart
456c09855e
fmt
2018-07-02 15:50:03 -05:00
Derek Collison
e78d587083
Added support for maximum subscriptions per connection
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-07-01 15:13:59 -07:00
Derek Collison
3b953ce838
Allow localhost to not be defined, only need 127.0.0.1
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-06-28 16:10:19 -07:00
Alberto Ricart
4a07a60524
Fixes and changes as per review
2018-06-26 16:50:14 -05:00
Derek Collison
0c0dd92467
cluster should be empty when not defined
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-06-26 10:49:18 -07:00
Derek Collison
ec8e2636de
Track closed connections and reason for closing
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-06-25 17:56:07 -07:00
Alberto Ricart
c35607cd95
[ADD] internal option to write a ports file --ports_file_dir
...
The added option writes a file in the specified directory called <exename>_<pid>.ports which
contains a JSON representation of ports that the gnatsd has opened.
This change is intended to facilitate testing by having ports be specified with a -1, so
they are auto assigned and allow tests to locate and connect to the launched gnatsd(s).
2018-06-22 16:15:39 -05:00
Ivan Kozlovic
d435fb9aa3
Remove some debug statements
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-06-21 20:23:39 -06:00
Ivan Kozlovic
bf3bc81722
Add route permissions
...
The `client.perms` struct is left unchanged. We simply map Import
and Export semantics to existing Publish and Subscribe ones.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2018-06-21 17:04:10 -06:00
Derek Collison
049db6e854
Support for queue subscriber retries over routes
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-06-04 17:45:05 -07:00
Derek Collison
df574ce951
varz cluster empty when not defined
...
Signed-off-by: Derek Collison <derek@nats.io >
2018-06-04 17:45:05 -07:00
Derek Collison
50a99241ea
Slow consumer updates and latency improvements.
...
Use pending bytes as slow consumer trigger, so reintroduce max_pending.
Improve latency with inplace flush calls when appropriate. Utilize simple
time budget for readLoop routine.
Signed-off-by: Derek Collison <derek@nats.io >
2018-06-04 17:45:05 -07:00
Derek Collison
00901acc78
Update license to Apache 2
2018-03-15 22:31:07 -07:00
Ivan Kozlovic
acf4a31e4b
Major updates + support for config reload of client/cluster advertise
2018-02-05 20:15:36 -07:00
Peter Miron
4829592107
removed support for array of Advertise addresses. Added support for Route advertise address.
2017-11-29 11:41:08 -05:00
Peter Miron
7d34b890c6
Takes list of client connect addresses. Uses the first as the host / port sent on info.
2017-11-28 09:55:35 -05:00
Peter Miron
6852298e7b
draft of fix for issue #447 . allows advertising separate host:ports to client.
2017-11-27 15:34:15 -05:00
Ivan Kozlovic
347798428d
Merge pull request #576 from orus-io/custom_auth
...
[ADDED] Custom Authorization through Options
2017-09-20 11:40:49 -06:00
Ivan Kozlovic
8b4a02dd9a
Pass functions to ConfigureOptions to print version, help, tls help
...
This will allow NATS Streaming to provide its own version of what
should be printed when various flags are set.
Related to #578
2017-09-08 09:59:04 -06:00
Christophe de Vienne
e556854f54
Rename Custom*Auth to Custom*Authentication
...
Simplify and complete tests based on Ivan advice.
2017-09-08 10:54:20 +02:00
Ivan Kozlovic
6ba9269cda
Added error check for fs.Parse() call
...
This is just for tests since from main.go, the FlagSet is set
with ExitOnError so Parse() would call os.Exit(2).
Regardless, I wanted to add error checking and a test for that.
Related to #578
2017-09-07 10:37:46 -06:00
Christophe de Vienne
b473674907
Add back custom Auth api
...
The removal of SetClientAuthMethod removed any possibility of providing
a custom auth backend.
This patch add it back as a Option attribute, so we can wait comfortably for #434 ,
which aims to provide more extensible external Auth.
2017-09-07 17:39:34 +02:00