Class SignerFactory

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

public final class SignerFactory extends Object
Signer factory used to register and create signers.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
    The v2 signer is no longer available: "S3SignerType".
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static software.amazon.awssdk.http.auth.spi.scheme.AuthScheme<software.amazon.awssdk.identity.spi.AwsCredentialsIdentity>
    createAuthScheme(String schemeId, software.amazon.awssdk.http.auth.spi.signer.HttpSigner<software.amazon.awssdk.identity.spi.AwsCredentialsIdentity> signer)
    Create an auth scheme instance from an ID and a signer.
    static software.amazon.awssdk.http.auth.spi.scheme.AuthScheme<software.amazon.awssdk.identity.spi.AwsCredentialsIdentity>
    createHttpSigner(org.apache.hadoop.conf.Configuration conf, String scheme, String configKey)
    Create an auth scheme by looking up the signer class in the configuration, loading and instantiating it.
    static software.amazon.awssdk.core.signer.Signer
    createSigner(String signerType, org.apache.hadoop.conf.Configuration conf, String configKey)
    Create an instance of the given signer.
    static boolean
    Check if the signer has already been registered.
    static void
    registerSigner(String signerType, Class<? extends software.amazon.awssdk.core.signer.Signer> signerClass)
    Register an implementation class for the given signer type.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • registerSigner

      public static void registerSigner(String signerType, Class<? extends software.amazon.awssdk.core.signer.Signer> signerClass)
      Register an implementation class for the given signer type.
      Parameters:
      signerType - The name of the signer type to register.
      signerClass - The class implementing the given signature protocol.
    • isSignerRegistered

      public static boolean isSignerRegistered(String signerType)
      Check if the signer has already been registered.
      Parameters:
      signerType - signer to get
      Returns:
      true if the signer is registered.
    • createSigner

      public static software.amazon.awssdk.core.signer.Signer createSigner(String signerType, org.apache.hadoop.conf.Configuration conf, String configKey) throws IOException
      Create an instance of the given signer. If a signer is Configurable, call setConf on it with the passed in config.
      Parameters:
      signerType - The signer type.
      conf - configuration to init with
      configKey - Config key used to configure the signer.
      Returns:
      The new signer instance.
      Throws:
      InstantiationIOException - instantiation problems.
      IOException - on any other problem.
    • createAuthScheme

      public static software.amazon.awssdk.http.auth.spi.scheme.AuthScheme<software.amazon.awssdk.identity.spi.AwsCredentialsIdentity> createAuthScheme(String schemeId, software.amazon.awssdk.http.auth.spi.signer.HttpSigner<software.amazon.awssdk.identity.spi.AwsCredentialsIdentity> signer)
      Create an auth scheme instance from an ID and a signer.
      Parameters:
      schemeId - scheme id
      signer - signer
      Returns:
      the auth scheme
    • createHttpSigner

      public static software.amazon.awssdk.http.auth.spi.scheme.AuthScheme<software.amazon.awssdk.identity.spi.AwsCredentialsIdentity> createHttpSigner(org.apache.hadoop.conf.Configuration conf, String scheme, String configKey) throws IOException
      Create an auth scheme by looking up the signer class in the configuration, loading and instantiating it.
      Parameters:
      conf - configuration
      scheme - scheme to bond to
      configKey - configuration key
      Returns:
      the auth scheme
      Throws:
      InstantiationIOException - failure to instantiate
      IllegalStateException - if the signer class is not defined
      RuntimeException - other configuration problems
      IOException