Files
nats-server/server
Ivan Kozlovic d2a8282a0d [FIXED] LeafNode TLSMap and websocket auth override
We added authentication override block for websocket configuration
in PR #1463 and #1465 which somehow introduced a drop in perf as
reported by the bench tests.
This PR refactors a bit to restore the performance numbers.

This change also fixes the override behavior for websocket auth:
- If websocket's NoAuthUser is configured, the websocket's auth
  block MUST define Users, and the user be present.
- If there is any override (username/pwd,token,etc..) then the
  whole block config will be used when authenticating a websocket
  client, which means that if websocket NoAuthUser is empty we
  are not falling back to the regular client's NoAuthUser config.
- TLSMap always override the regular client's config. That is,
  whatever TLSMap value specified in the websocket's tls{} block
  will be used.

The TLSMap configuration was not used for LeafNodes. The behavior
now will be:
- If LeafNode's auth block contains users and TLSMap is true,
  the user is looked up based on the cert's info. If not found,
  authentication will fail. If found, it will be authenticated
  and bound to associated account.
- If no user is specified in LeafNode's auth block and TLSMap
  is true, then the cert's info will be used against the global
  users map.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-06-11 17:06:54 -06:00
..
2020-05-29 17:56:45 -07:00
2019-10-15 23:55:13 +08:00
2020-05-19 14:15:11 -07:00
2020-06-01 11:46:18 -07:00
2020-06-08 11:43:25 -06:00
2020-02-25 19:53:09 -05:00
2020-06-02 06:24:46 -07:00
2020-06-09 15:34:52 -06:00
2019-05-06 15:41:38 -07:00
2020-06-05 05:53:01 -07:00
2020-06-05 08:37:18 -07:00
2019-12-12 11:58:24 -07:00
2018-12-06 15:09:14 -08:00
2020-06-01 18:00:13 -04:00
2019-05-10 15:11:30 -07:00
2020-06-09 15:34:52 -06:00
2018-10-06 14:06:14 -07:00
2020-06-09 15:34:52 -06:00
2020-06-09 15:34:52 -06:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2019-11-14 20:05:32 -07:00
2019-12-12 11:58:24 -07:00
2020-06-02 06:24:46 -07:00
2020-06-01 16:54:41 -07:00