nats-io / nats-architecture-and-design

Architecture and Design Docs
Apache License 2.0
177 stars 20 forks source link

Formalize protocol of when should a client sends credentials when auth is configured in the server #178

Closed wallyqs closed 1 year ago

wallyqs commented 1 year ago

Overview

Historically the server has sent auth_required as part of the INFO protocol to let the clients be aware that authentication is configured in the server. Currently some clients use this flag to decide whether it is required to send credentials or not, whereas others simply send creds on CONNECT in case credentials have been configured in the client. When no_auth_user is configured in the server as part of 2.9.8 release, the server now no longer sends auth_required so clients that used the flag may not be sending their credentials.

client checks auth_required
nats.py
nats-pure.rb
nats.rb
nats.go ×
nats.java ×
nats.c ×
nats.net ×
nats.js ×
nats.rs ?
wallyqs commented 1 year ago

The decision here is to update the clients to always send their credentials on CONNECT whenever they are configured regardless of the auth_required value.