-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow authentication for nats connections #4412
Conversation
Signed-off-by: jkoberg <[email protected]>
e97da3e
to
24deebf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one remark. I'd build the stream.NatsConfig
beforhand and apply only the values that are set. But since this is just following the way the other properties are set I'm ok with merging this as is.
AuthUsername: m["username"].(string), | ||
AuthPassword: m["password"].(string), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a little bit fragile ... if the config struct m
does not have a key set this will panic with
"interface conversion: interface {} is nil, not string"
same for all the other keys, here ... still kinda meh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point 👍 I moved the definition to the source struct and use mapstructure.Decode
to unmarshal it. Please double check.
24deebf
to
78fd376
Compare
Signed-off-by: jkoberg <[email protected]>
78fd376
to
84e060e
Compare
Allows authenticating nats connections with username/password