Conversation
1d3d21f to
b8dfc70
Compare
2b2191b to
ecbd770
Compare
|
@wuchong , I have rebased this pr into main, would you like to help review it? |
|
|
|
I'm going to review this PR, could you rebase to the main branch? |
ecbd770 to
b966db1
Compare
@wuchong , Done it |
316740d to
345d35a
Compare
wuchong
left a comment
There was a problem hiding this comment.
LGTM. I appended a commit to address the following minor comemtns.
| byte[] token = authenticateRequest.getToken(); | ||
| byte[] challenge; | ||
| if (!authenticator.isCompleted() | ||
| && (challenge = authenticator.evaluateResponse(token)) != null) { |
There was a problem hiding this comment.
should evaluateResponse first then check authenticator.isCompleted()?
| * @since 0.7 | ||
| */ | ||
| public class AuthenticationFactory { | ||
| private static final String SERVER_AUTHENTICATOR_PREFIX = "security."; |
| */ | ||
| @SuppressWarnings("unchecked") | ||
| private static <T extends AuthenticationPlugin> T discoverPlugin( | ||
| Configuration configuration, |
| final Iterator<AuthenticationPlugin> foundPlugins = pluginIteratorsSupplier.get(); | ||
| while (foundPlugins.hasNext()) { | ||
| AuthenticationPlugin plugin = foundPlugins.next(); | ||
| if (plugin.authProtocol().equals(protocol) |
There was a problem hiding this comment.
We may use uppercase when developing the auth plugin(such as: RAM, SSL, SASL), but we can loose this to equalsIgnoreCase to allow users use lowercase in client side:
client.security.protocol: ram
client.security.ram.ak: xxxx
instead of having to use
client.security.protocol: RAM
client.security.RAM.ak: xxxx
|
@loserwang1024 please check the appended commit again. |
Co-authored-by: Jark Wu <jark@apache.org>
Co-authored-by: Jark Wu <jark@apache.org>
Purpose
Linked issue: close #484 . This Pr is depended on #531 .
Brief change log
Introduce authenticate in Fluss.
Tests
com.alibaba.fluss.rpc.netty.authenticate.AuthenticationTest
API and Format
Config
server.authenticate.protocol.map: A map defining the authentication protocol for each listener. The format is 'listenerName1:protocol1,listenerName2:protocol2', e.g., 'INTERNAL:PLAINTEXT,CLIENT:GSSAPI'. Each listener can be associated with a specific authentication protocol. Listeners not included in the map will use PLAINTEXT by default, which does not require authentication.The config of one protocol:
client.authenticate.${protocol}.xxxserver.authenticate.${protocol}.xxxInterface
AuthenticationPlugin for client and server:
Authenticator for client and server:
Principal to identify user:
Documentation