Class CredentialsSupplierFactory


  • public class CredentialsSupplierFactory
    extends Object
    This class is responsible for creating Supplier<AWSCredentials>s according to the authentication mechanism configured in the connection: For Access Key authentication, the supplier always return the same set of AWSCredentials. For IAM Roles Anywhere, the supplier creates AWSCredentials based on temporary credentials that might be new (if those are requested to AWS) or not (if those are obtained from cache). For most operations, the temporary credentials obtained from AWS are stored using the connector cache to be reused by subsequent requests.
    • Method Detail

      • createCredentialsSupplier

        public static Supplier<AWSCredentials> createCredentialsSupplier​(BrowseContext context,
                                                                         String region,
                                                                         String awsService)
        Creates a Supplier<AWSCredentials> which provides AWS Credentials that might be retrieved from cache. For Access Key authentication, the credentials are built based on the user access keys. The credentials are not stored in the connector cache. For IAM Roles Anywhere authentication, the credentials are based on temporary credentials which are retrieved from cache, if a non expired set is available. Otherwise, the credentials are based on temporary credentials requested to AWS, which are stored in the connector cache to be re-used in subsequent requests.
        Returns:
        a supplier of AWSCredentials for API authentication