Package org.apache.hadoop.fs.s3a.auth
Class SignerFactory
java.lang.Object
org.apache.hadoop.fs.s3a.auth.SignerFactory
Signer factory used to register and create signers.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.SignercreateSigner(String signerType, org.apache.hadoop.conf.Configuration conf, String configKey) Create an instance of the given signer.static booleanisSignerRegistered(String signerType) Check if the signer has already been registered.static voidregisterSigner(String signerType, Class<? extends software.amazon.awssdk.core.signer.Signer> signerClass) Register an implementation class for the given signer type.
-
Field Details
-
VERSION_FOUR_SIGNER
- See Also:
-
VERSION_FOUR_UNSIGNED_PAYLOAD_SIGNER
- See Also:
-
NO_OP_SIGNER
- See Also:
-
S3_V2_SIGNER
The v2 signer is no longer available: "S3SignerType".- See Also:
-
-
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
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 withconfigKey- 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 idsigner- 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- configurationscheme- scheme to bond toconfigKey- configuration key- Returns:
- the auth scheme
- Throws:
InstantiationIOException- failure to instantiateIllegalStateException- if the signer class is not definedRuntimeException- other configuration problemsIOException
-