Files
nats-server/server
Ivan Kozlovic 18a1702ba2 [ADDED] Basic auth for leafnodes
Added a way to specify which account an accepted leafnode connection
should be bound to when using simple auth (user/password).

Singleton:
```
leafnodes {
  port: ...
  authorization {
    user: leaf
    password: secret
    account: TheAccount
  }
}
```
With above configuration, if a soliciting server creates a LN connection
with url: `nats://leaf:secret@host:port`, then the accepting server
will bind the leafnode connection to the account "TheAccount". This account
need to exist otherwise the connection will be rejected.

Multi:
```
leafnodes {
  port: ...
  authorization {
    users = [
      {user: leaf1, password: secret, account: account1}
      {user: leaf2, password: secret, account: account2}
    ]
  }
}
```
With the above, if a server connects using `leaf1:secret@host:port`, then
the accepting server will bind the connection to account `account1`.

If user/password (either singleton or multi) is defined, then the connecting
server MUST provide the proper credentials otherwise the connection will
be rejected.

If no user/password info is provided, it is still possible to provide the
account the connection should be associated with:
```
leafnodes {
  port: ...
  authorization {
    account: TheAccount
  }
}
```
With the above, a connection without credentials will be bound to the
account "TheAccount".

If credentials are used (jwt, nkey or other), then the server will attempt
to authenticate and if successful associate to the account for that specific
user. If the user authentication fails (wrong password, no such user, etc..)
the connection will be also rejected.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-09-30 19:42:11 -06:00
..
2019-09-04 13:49:59 -05:00
2019-05-06 15:41:38 -07:00
2019-09-30 19:42:11 -06:00
2019-09-19 14:42:38 -06:00
2019-05-10 15:11:30 -07:00
2019-09-20 12:19:27 -06:00
2019-09-17 09:37:35 -07:00
2019-08-20 17:07:22 -06:00
2019-09-11 16:43:19 -07:00
2019-09-19 14:42:38 -06:00
2019-09-30 19:42:11 -06:00
2019-05-06 15:41:38 -07:00
2019-08-26 12:00:24 -06:00
2019-08-26 12:00:24 -06:00
2018-12-06 15:09:14 -08:00
2019-08-20 14:39:23 -06:00
2019-09-19 14:42:38 -06:00
2019-09-30 19:42:11 -06:00
2019-02-04 17:07:49 -08:00
2019-09-17 09:37:35 -07:00
2019-05-10 15:11:30 -07:00
2019-05-29 13:19:58 -07:00
2018-10-06 14:06:14 -07:00
2018-10-06 14:04:14 -07:00
2019-09-30 19:42:11 -06:00
2018-03-15 22:31:07 -07:00
2018-03-15 22:31:07 -07:00
2019-09-18 12:45:12 -06:00
2019-01-18 10:54:04 +08:00