Closed xieyuschen closed 1 year ago
The config does not show how one would authenticate to be attached to the defined HR account. By default you will be bound to the $G (global account).
If you want users to bind to the HR account you need to specify how they would do so. Either through authentication, like user/password
or nkeys and JWTs.
If you are just starting and do not require authentication as of yet, you could have all non-authenticated users be bound to HR. Here is an example of how to accomplish that.
jetstream {
max_mem: 1G
max_file: 100G
}
no_auth_user: default-user
accounts {
HR: {
jetstream: enable
users = [ { user: default-user} ]
}
}}
The config does not show how one would authenticate to be attached to the defined HR account. By default you will be bound to the $G (global account).
If you want users to bind to the HR account you need to specify how they would do so. Either through authentication, like
user/password
or nkeys and JWTs.If you are just starting and do not require authentication as of yet, you could have all non-authenticated users be bound to HR. Here is an example of how to accomplish that.
jetstream { max_mem: 1G max_file: 100G } no_auth_user: default-user accounts { HR: { jetstream: enable users = [ { user: default-user} ] } }}
Thanks, dereck. I will try it and learn more about it.
The config does not show how one would authenticate to be attached to the defined HR account. By default you will be bound to the $G (global account).
If you want users to bind to the HR account you need to specify how they would do so. Either through authentication, like
user/password
or nkeys and JWTs.If you are just starting and do not require authentication as of yet, you could have all non-authenticated users be bound to HR. Here is an example of how to accomplish that.
jetstream { max_mem: 1G max_file: 100G } no_auth_user: default-user accounts { HR: { jetstream: enable users = [ { user: default-user} ] } }}
What does it mean HR? Also how can I limit the topics for the default users?
@matthiashanel @kozlovic Currently, we have many issues about
JetStream not enabled for account (10039)
. I tried to debug it with the nats-server and found there is a$G
account. I tried to find it in our documents but no useful docs there. So could I ask what's the default behavior when we want to get the account info bynats account info
? I would like it to get all jetstream enabled account, but now nats-server returns theJetStream not enabled for account (10039)
error to user as the$G
account is not enabled.I debug it on macOS with Goland, the code is aligned with the master branch. The config file
foo.conf
is this one:I debug with argument
--jetstream --config /Users/yuchenxie/Documents/NATS/foo.conf
the foo.conf is shown up.When I see the code which gets the account:
It will get the
$G
account. But actually, there is an account namedHR
with jetstream enabled and the user would like to get it.Thanks for reviewing :)