Package software.amazon.msk.auth.iam
Class IAMClientCallbackHandler
java.lang.Object
software.amazon.msk.auth.iam.IAMClientCallbackHandler
- All Implemented Interfaces:
CallbackHandler,org.apache.kafka.common.security.auth.AuthenticateCallbackHandler
public class IAMClientCallbackHandler
extends Object
implements org.apache.kafka.common.security.auth.AuthenticateCallbackHandler
This client callback handler is used to extract AWSCredentials.
The credentials are based on JaasConfig options passed to
IAMLoginModule.
If config options are provided the MSKCredentialProvider is used.
If no config options are provided it uses the DefaultAWSCredentialsProviderChain.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconfigure(Map<String, ?> configs, @NonNull String saslMechanism, @NonNull List<AppConfigurationEntry> jaasConfigEntries) protected static StringdebugClassString(Class<?> clazz) voidprotected voidhandleCallback(AWSCredentialsCallback callback)
-
Constructor Details
-
IAMClientCallbackHandler
public IAMClientCallbackHandler()
-
-
Method Details
-
configure
public void configure(Map<String, ?> configs, @NonNull @NonNull String saslMechanism, @NonNull @NonNull List<AppConfigurationEntry> jaasConfigEntries) - Specified by:
configurein interfaceorg.apache.kafka.common.security.auth.AuthenticateCallbackHandler
-
close
public void close()- Specified by:
closein interfaceorg.apache.kafka.common.security.auth.AuthenticateCallbackHandler
-
handle
public void handle(@NonNull @NonNull Callback[] callbacks) throws IOException, UnsupportedCallbackException - Specified by:
handlein interfaceCallbackHandler- Throws:
IOExceptionUnsupportedCallbackException
-
debugClassString
-
handleCallback
- Throws:
IOException
-