-
Notifications
You must be signed in to change notification settings - Fork 38
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
Let nats client send auth_required without waiting for the server to ask for it #132
Comments
Hmmmm I've never thought about forcing a connection to use auth. Is that supported in the protocol? I thought we always did an initial handshake first and we could only send the credentials as our response to that handshake? |
Looking at the client protocol it indicates that If we did want to support this, I think I would avoid modifying the |
Yes, Go client does: https://github.com/nats-io/nats.go/blob/main/nats.go#L2248 Which we happen to use on our CLI: https://github.com/superfly/flyctl/blob/master/logs/nats.go#L78 Since our NATs server does not ask for
Got it. I can take a stab at this if this is wanted. |
Hey @lubien thank you for opening the PR. Can you clarify a few things for me?
I'm not very familiar with Go, but it looks like that code will sent the auth credentials as long as they have been provided by the user in the
So your NATS server is configured in a way that it does not send |
Yes, that's my understanding too. Disclaimer: I'm very new to Go 😆
Yes, that's how we built that. We just expect it to be sent. Thanks for your time, really :) |
I've been using a fork of your library on Fly.io for logs with a few changes.
My proposal negotiate auth if the client wrote those on its config without needing for the server to ask for it. I've implemented here an example: 9ddb11a
This feels like a breaking change for some so I'd love input on this!
The text was updated successfully, but these errors were encountered: