I’m setting up a NATS cluster and I need to provide a bunch of credentials. How to do that please?
I see https://github.com/nats-io/nats-server/issues/3490 has one way, and the official doc, https://docs.nats.io/nats-server/configuration/websocket/websocket_conf#authorization-of-websocket-users, has two different ways:
# authorization {
# # If this is specified, the client has to provide the same username
# # and password to be able to connect.
# # username: "my_user_name"
# # password: "my_password"
# }
Or,
authorization {
users [
{user: foo password: foopwd, permission: {...}}
{user: bar password: barpwd, permission: {...}}
]
}
which one I should follow? The last one looks to be what I should be using but it isn’t even a valid json.