Because of the lack of `defer ac.Cleanup()` in some tests, the
accounts would still try to send conn updates, which was possibly
causing data races with some of the tests that change the
eventsHBInterval global variable.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Fixed one extraneous account update for $G. We sent for the addition before switching but suppressed the change back to 0.
We now suppress all for $G as was designed.
Signed-off-by: Derek Collison <derek@nats.io>
This adds the ability to augment or override the NATS auth system.
A server will send a signed request to $SYS.REQ.USER.AUTH on the specified account. The request will contain client information, all client options sent to the server, and optionally TLS information and client certificates.
The external auth service will respond with an empty message if not authorized, or a signed User JWT that the user will bind to.
The response can change the account the client will be bound to.
Signed-off-by: Derek Collison <derek@nats.io>