Class STSClientFactory

java.lang.Object
org.apache.hadoop.fs.s3a.auth.STSClientFactory

@Private @Unstable public class STSClientFactory extends Object
Factory for creating STS Clients.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    STS client connection with retries.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static software.amazon.awssdk.services.sts.StsClientBuilder
    builder(org.apache.hadoop.conf.Configuration conf, String bucket, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials)
    Create the builder ready for any final configuration options.
    static software.amazon.awssdk.services.sts.StsClientBuilder
    builder(org.apache.hadoop.conf.Configuration conf, String bucket, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials, String stsEndpoint, String stsRegion)
    Create the builder ready for any final configuration options.
    static software.amazon.awssdk.services.sts.StsClientBuilder
    builder(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials, org.apache.hadoop.conf.Configuration conf, String stsEndpoint, String stsRegion, String bucket)
    Create the builder ready for any final configuration options.
    createClientConnection(software.amazon.awssdk.services.sts.StsClient stsClient, Invoker invoker)
    Create an STS Client instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • STSClientFactory

      public STSClientFactory()
  • Method Details

    • builder

      public static software.amazon.awssdk.services.sts.StsClientBuilder builder(org.apache.hadoop.conf.Configuration conf, String bucket, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials) throws IOException
      Create the builder ready for any final configuration options. Picks up connection settings from the Hadoop configuration, including proxy secrets. The endpoint comes from the configuration options DelegationConstants.DELEGATION_TOKEN_ENDPOINT and DelegationConstants.DELEGATION_TOKEN_REGION
      Parameters:
      conf - Configuration to act as source of options.
      bucket - Optional bucket to use to look up per-bucket proxy secrets
      credentials - AWS credential chain to use
      Returns:
      the builder to call build()
      Throws:
      IOException - problem reading proxy secrets
    • builder

      public static software.amazon.awssdk.services.sts.StsClientBuilder builder(org.apache.hadoop.conf.Configuration conf, String bucket, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials, String stsEndpoint, String stsRegion) throws IOException
      Create the builder ready for any final configuration options. Picks up connection settings from the Hadoop configuration, including proxy secrets.
      Parameters:
      conf - Configuration to act as source of options.
      bucket - Optional bucket to use to look up per-bucket proxy secrets
      credentials - AWS credential chain to use
      stsEndpoint - optional endpoint "https://sns.us-west-1.amazonaws.com"
      stsRegion - AWS recommend setting the endpoint instead.
      Returns:
      the builder to call build()
      Throws:
      IOException - problem reading proxy secrets
    • builder

      public static software.amazon.awssdk.services.sts.StsClientBuilder builder(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials, org.apache.hadoop.conf.Configuration conf, String stsEndpoint, String stsRegion, String bucket) throws IOException
      Create the builder ready for any final configuration options. Picks up connection settings from the Hadoop configuration, including proxy secrets.
      Parameters:
      conf - AWS configuration.
      credentials - AWS credential chain to use
      stsEndpoint - optional endpoint "https://sns.us-west-1.amazonaws.com"
      stsRegion - the region, e.g "us-west-1". Must be set if endpoint is.
      bucket - bucket name
      Returns:
      the builder to call build()
      Throws:
      IOException - problem reading proxy secrets
    • createClientConnection

      public static STSClientFactory.STSClient createClientConnection(software.amazon.awssdk.services.sts.StsClient stsClient, Invoker invoker)
      Create an STS Client instance.
      Parameters:
      stsClient - STS instance
      invoker - invoker to use
      Returns:
      an STS client bonded to that interface.