public class FileBasedPlainSaslAuthenticator
extends java.lang.Object
Since we have to use JAAS, the JAAS config just points to the YAML config file.
Constructor and Description |
---|
FileBasedPlainSaslAuthenticator() |
Modifier and Type | Method and Description |
---|---|
MultiTenantPrincipal |
authenticate(java.lang.String username,
java.lang.String password)
Authenticate user via username/password
|
void |
initialize(java.util.List<javax.security.auth.login.AppConfigurationEntry> jaasContextEntries) |
public void initialize(java.util.List<javax.security.auth.login.AppConfigurationEntry> jaasContextEntries)
public MultiTenantPrincipal authenticate(java.lang.String username, java.lang.String password) throws javax.security.sasl.SaslException, org.apache.kafka.common.errors.SaslAuthenticationException
username
- usernamepassword
- passwordMultiTenantPrincipal
containing authorization id and tenantorg.apache.kafka.common.errors.SaslAuthenticationException
- if authentication fails.
Note that the error string in the SaslAuthenticationException
is returned to the client so do not leak information in it.javax.security.sasl.SaslException
- if any unexpected errors are encountered