50d94f4b462b7a3c4415cf508d6a8eff7bd5d32f | Author: Tiago Alves <tiago.alves@datastax.com>
| 2024-10-07 10:56:46+01:00
Enables IAuthenticator's to return own AuthenticateMessage
Allows custom implementations of IAuthenticator to return their own
AuthenticateMessage based on ClientState information.
ClientState contains information about driver's name and version which
could be used to determine the contents of the AuthenticateMessage that
is sent back to the clients. This enables, for instance, returning
driver's known authenticator implementations (e.g. DseAuthenticator)
which enables SASL negotiation.
patch by Tiago Alves; reviewed by Mick Semb Wever, Andy Tolbert for CASSANDRA-19984
2dea5c75882ee2caaaac0ae5b84f9d6b66c46b2e | Author: Tiago Alves <tiago.alves@datastax.com>
| 2024-09-24 10:27:40+01:00
Use ParameterizedClass for all auth-related implementations
Uses ParameterizedClass for IAuthorizer, INetworkAuthorizer, and
IRoleManager implementations enabling those to be configurable from
parameters specified directly in cassandra.yaml.
Opportunistically makes consistent the initialization and setting of
all auth-related implementations and removes code duplication.
Notes:
* IInternodeAuthenticator implementations are expected to be set as
default directly in DatabaseDescriptor instead of done via
AuthConfig.applyAuth(). This is assumed in tests and client logic.
For instance ReconnectableSnitchHelperTest fetches this authenticator
before calling daemonInitialize(). Also, BulkLoader fetches this
directly when creating an outbound connection.
* Changing this behavior in BulkLoader causes a cascade of changes.
First, one would need to add AuthConfig.applyAuth() directly in
clientInitialize() and then would need to enable all the additional
classes that this change causes. Long term this might be justified
as if we're depending on the auth logic to be properly set. However,
in the context of this change it was decided to postpone further
changes.
* Standardize auth-related configurations by using a short-form with
the class name instead of the full qualified class name containing
the package name.
patch by Tiago Alves; reviewed by Mick Semb Wever, Stefan Miklosovic for CASSANDRA-19946