Class IAMSaslClient

java.lang.Object
software.amazon.msk.auth.iam.internals.IAMSaslClient
All Implemented Interfaces:
SaslClient

public class IAMSaslClient extends Object implements SaslClient
The IAMSaslClient is used to provide SASL integration with AWS IAM. It has an initial response, so it starts out in the state SEND_CLIENT_FIRST_MESSAGE. The initial response sent to the server contains an authentication payload. The authentication payload consists of a json object that includes a signature signed by the client's credentials. The exact details of the authentication payload can be seen in AWS4SignedPayloadGenerator. The credentials used to sign the payload are fetched by invoking the IAMClientCallbackHandler. After sending the authentication payload, the client transitions to state RECEIVE_SENDER_RESPONSE. Once it receives a successful response from the server, the client transitions to the state completed. A failure at any intermediate step transitions the client to a FAILED state.