Class AmazonS3FileSystem.CredentialsResolverBridge

java.lang.Object
com.northconcepts.datapipeline.amazons3.AmazonS3FileSystem.CredentialsResolverBridge
Enclosing class:
AmazonS3FileSystem

public static class AmazonS3FileSystem.CredentialsResolverBridge extends Object
Adapts the backend-neutral CredentialsResolver seam to the AWS SDK's
invalid reference
AwsCredentialsProvider
so resolved credentials flow through the native client natively.

The AWS SDK asks its provider for credentials on each request signing, so this bridge gives: fresh reads of the current snapshot per request, and automatic mid-session re-resolution when the snapshot reports expiry within AmazonS3FileSystem.CREDENTIALS_EXPIRY_SKEW_MILLISECONDS (STS/OAuth-style rotation).

Maps Credentials.ACCESS_KEY and Credentials.SECRET_KEY (both required), plus Credentials.SESSION_TOKEN (optional) for temporary session credentials.

Requests on several threads share one bridge, and a refresh wipes the previous snapshot, so reading and refreshing happen under this bridge's lock.

  • Constructor Details

    • CredentialsResolverBridge

      public CredentialsResolverBridge(AmazonS3FileSystem fileSystem)
  • Method Details

    • resolveCredentials

      public AwsCredentials resolveCredentials()
    • refresh

      public void refresh()
      Forces re-resolution from the CredentialsResolver on the next credentials request. (SDK v2 providers have no refresh hook; expiry-driven re-resolution above covers rotation.)