Class S3BlobStoreConfiguration


public class S3BlobStoreConfiguration extends CloudBlobStoreConfiguration
Blob storage configuration in S3.
Since:
11.1
  • Field Details

    • SYSTEM_PROPERTY_PREFIX

      public static final String SYSTEM_PROPERTY_PREFIX
      See Also:
    • BUCKET_NAME_PROPERTY

      public static final String BUCKET_NAME_PROPERTY
      See Also:
    • BUCKET_PREFIX_PROPERTY

      public static final String BUCKET_PREFIX_PROPERTY
      See Also:
    • BUCKET_SUB_DIRS_DEPTH_PROPERTY

      public static final String BUCKET_SUB_DIRS_DEPTH_PROPERTY
      See Also:
    • BUCKET_REGION_PROPERTY

      public static final String BUCKET_REGION_PROPERTY
      See Also:
    • AWS_ID_PROPERTY

      public static final String AWS_ID_PROPERTY
      See Also:
    • AWS_SECRET_PROPERTY

      public static final String AWS_SECRET_PROPERTY
      See Also:
    • AWS_SESSION_TOKEN_PROPERTY

      public static final String AWS_SESSION_TOKEN_PROPERTY
      See Also:
    • CONNECTION_MAX_PROPERTY

      public static final String CONNECTION_MAX_PROPERTY
      AWS ClientConfiguration default 50
      See Also:
    • CONNECTION_RETRY_PROPERTY

      public static final String CONNECTION_RETRY_PROPERTY
      AWS ClientConfiguration default 3 (with exponential backoff)
      See Also:
    • CONNECTION_TIMEOUT_PROPERTY

      public static final String CONNECTION_TIMEOUT_PROPERTY
      AWS ClientConfiguration default 50*1000 = 50s
      See Also:
    • SOCKET_TIMEOUT_PROPERTY

      public static final String SOCKET_TIMEOUT_PROPERTY
      AWS ClientConfiguration default 50*1000 = 50s
      See Also:
    • KEYSTORE_FILE_PROPERTY

      public static final String KEYSTORE_FILE_PROPERTY
      See Also:
    • KEYSTORE_PASS_PROPERTY

      public static final String KEYSTORE_PASS_PROPERTY
      See Also:
    • KEYSTORE_LEGACY_MODE_PROPERTY

      public static final String KEYSTORE_LEGACY_MODE_PROPERTY
      Since:
      2023.18
      See Also:
    • SERVERSIDE_ENCRYPTION_PROPERTY

      public static final String SERVERSIDE_ENCRYPTION_PROPERTY
      See Also:
    • SERVERSIDE_ENCRYPTION_KMS_KEY_PROPERTY

      public static final String SERVERSIDE_ENCRYPTION_KMS_KEY_PROPERTY
      See Also:
    • CLIENTSIDE_ENCRYPTION_KMS_KEY_PROPERTY

      public static final String CLIENTSIDE_ENCRYPTION_KMS_KEY_PROPERTY
      Since:
      2023.17
      See Also:
    • CLIENTSIDE_ENCRYPTION_KMS_REGION_PROPERTY

      public static final String CLIENTSIDE_ENCRYPTION_KMS_REGION_PROPERTY
      Since:
      2023.17
      See Also:
    • PRIVKEY_ALIAS_PROPERTY

      public static final String PRIVKEY_ALIAS_PROPERTY
      See Also:
    • PRIVKEY_PASS_PROPERTY

      public static final String PRIVKEY_PASS_PROPERTY
      See Also:
    • ENDPOINT_PROPERTY

      public static final String ENDPOINT_PROPERTY
      See Also:
    • PATHSTYLEACCESS_PROPERTY

      public static final String PATHSTYLEACCESS_PROPERTY
      See Also:
    • ACCELERATE_MODE_PROPERTY

      public static final String ACCELERATE_MODE_PROPERTY
      See Also:
    • DIRECTDOWNLOAD_PROPERTY_COMPAT

      public static final String DIRECTDOWNLOAD_PROPERTY_COMPAT
      See Also:
    • DIRECTDOWNLOAD_EXPIRE_PROPERTY_COMPAT

      public static final String DIRECTDOWNLOAD_EXPIRE_PROPERTY_COMPAT
      See Also:
    • METADATA_ADD_USERNAME_PROPERTY

      public static final String METADATA_ADD_USERNAME_PROPERTY
      See Also:
    • MULTIPART_CLEANUP_DISABLED_PROPERTY

      public static final String MULTIPART_CLEANUP_DISABLED_PROPERTY
      Disable automatic abort of old multipart uploads at startup time.
      Since:
      11.1
      See Also:
    • DELIMITER

      public static final String DELIMITER
      See Also:
    • MULTIPART_COPY_PART_SIZE_CONFIGURATION_PROPERTY

      public static final String MULTIPART_COPY_PART_SIZE_CONFIGURATION_PROPERTY
      The deprecated configuration property to define the multipart copy part size, for backward compatibility.
      Since:
      2021.11
      See Also:
    • MULTIPART_COPY_PART_SIZE_PROPERTY

      public static final String MULTIPART_COPY_PART_SIZE_PROPERTY
      The Framework property to define the multipart copy part size.
      See Also:
    • MULTIPART_COPY_PART_SIZE_DEFAULT

      public static final long MULTIPART_COPY_PART_SIZE_DEFAULT
      The default value for the multipart copy part size.
      Since:
      2021.11
      See Also:
    • MULTIPART_COPY_THRESHOLD_PROPERTY

      public static final String MULTIPART_COPY_THRESHOLD_PROPERTY
      The Framework property to define the multipart copy threshold.
      Since:
      2021.11
      See Also:
    • MULTIPART_COPY_THRESHOLD_DEFAULT

      public static final long MULTIPART_COPY_THRESHOLD_DEFAULT
      The default value for the multipart copy threshold.
      Since:
      2021.11
      See Also:
    • MULTIPART_UPLOAD_THRESHOLD_PROPERTY

      public static final String MULTIPART_UPLOAD_THRESHOLD_PROPERTY
      The Framework property to define the multipart upload threshold.
      Since:
      2021.11
      See Also:
    • MULTIPART_UPLOAD_THRESHOLD_DEFAULT

      public static final long MULTIPART_UPLOAD_THRESHOLD_DEFAULT
      The default value for the multipart upload threshold.
      Since:
      2021.11
      See Also:
    • MINIMUM_UPLOAD_PART_SIZE_PROPERTY

      public static final String MINIMUM_UPLOAD_PART_SIZE_PROPERTY
      The Framework property to define the minimum upload part size.
      Since:
      2021.11
      See Also:
    • MINIMUM_UPLOAD_PART_SIZE_DEFAULT

      public static final long MINIMUM_UPLOAD_PART_SIZE_DEFAULT
      The default value for the minimum upload part size.
      Since:
      2021.11
      See Also:
    • TRANSFER_MANAGER_THREAD_POOL_SIZE_PROPERTY

      public static final String TRANSFER_MANAGER_THREAD_POOL_SIZE_PROPERTY
      The Framework property to define the transfer manager thread pool size.
      Since:
      2021.14
      See Also:
    • TRANSFER_MANAGER_THREAD_POOL_SIZE_DEFAULT

      public static final int TRANSFER_MANAGER_THREAD_POOL_SIZE_DEFAULT
      The default value for the transfer manager thread pool size.
      Since:
      2021.14
      See Also:
    • DISABLE_PROXY_PROPERTY

      public static final String DISABLE_PROXY_PROPERTY
      Framework property to disable usage of the proxy environment variables (nuxeo.http.proxy.*) for the connection to the S3 endpoint.
      Since:
      11.1
      See Also:
    • USER_AGENT_PREFIX_PROPERTY

      public static final String USER_AGENT_PREFIX_PROPERTY
      Since:
      2021.15
      See Also:
    • USER_AGENT_SUFFIX_PROPERTY

      public static final String USER_AGENT_SUFFIX_PROPERTY
      Since:
      2021.15
      See Also:
    • DEFAULT_RETENTION_MODE

      public static final com.amazonaws.services.s3.model.ObjectLockRetentionMode DEFAULT_RETENTION_MODE
    • cloudFront

      public final CloudFrontConfiguration cloudFront
    • amazonS3

      public final com.amazonaws.services.s3.AmazonS3 amazonS3
    • transferManager

      public final com.amazonaws.services.s3.transfer.TransferManager transferManager
    • bucketName

      public final String bucketName
    • bucketPrefix

      public final String bucketPrefix
    • useServerSideEncryption

      public final boolean useServerSideEncryption
    • serverSideKMSKeyID

      public final String serverSideKMSKeyID
    • useClientSideEncryption

      public final boolean useClientSideEncryption
    • metadataAddUsername

      public final boolean metadataAddUsername
    • s3RetentionEnabled

      public final boolean s3RetentionEnabled
      Is Object Lock feature enabled at s3 level.
      Since:
      2021.13
    • retentionMode

      public final com.amazonaws.services.s3.model.ObjectLockRetentionMode retentionMode
      The retention mode to use when setting the retention on an object.
    • pathStrategy

      protected final PathStrategy pathStrategy
      The path strategy according to the sub directory depth configuration.
      Since:
      2023.7
    • pathSeparatorIsBackslash

      protected final boolean pathSeparatorIsBackslash
      Is backslash "/" the path separator.
      Since:
      2023.7
  • Constructor Details

  • Method Details

    • computeBucketRetentionMode

      protected com.amazonaws.services.s3.model.ObjectLockRetentionMode computeBucketRetentionMode()
      Gets the s3 bucket's object lock default mode ObjectLockRetentionMode#GOVERNANCE or ObjectLockRetentionMode#COMPLIANCE.

      If undefined, the retention mode of the Nuxeo platform is returned.

      Returns null if object lock is not enabled on the bucket.

      Since:
      2023.0
    • withNamespace

      public S3BlobStoreConfiguration withNamespace(String ns) throws IOException
      Returns a copy of the S3BlobStoreConfiguration with a different namespace.
      Throws:
      IOException
    • close

      public void close()
    • getMultipartCopyPartSize

      public static long getMultipartCopyPartSize()
      Since:
      2021.11
    • getLongProperty

      public static long getLongProperty(String key, long defaultValue)
      Since:
      2021.11
    • parseDirectDownload

      protected boolean parseDirectDownload()
      Overrides:
      parseDirectDownload in class CloudBlobStoreConfiguration
    • parseDirectDownloadExpire

      protected long parseDirectDownloadExpire()
      Overrides:
      parseDirectDownloadExpire in class CloudBlobStoreConfiguration
    • getBucketName

      protected String getBucketName()
    • bucketKey

      protected String bucketKey(String key)
      Gets the bucket key for the given blob key taking into account the bucket prefix and the path strategy (sub directory depth).
      Since:
      2023.7
    • getBucketPrefix

      protected String getBucketPrefix()
    • getSubDirsDepth

      protected int getSubDirsDepth()
    • getAWSCredentialsProvider

      protected com.amazonaws.auth.AWSCredentialsProvider getAWSCredentialsProvider()
    • getClientConfiguration

      protected com.amazonaws.ClientConfiguration getClientConfiguration()
    • getEncryptionMaterials

      protected com.amazonaws.services.s3.model.EncryptionMaterials getEncryptionMaterials()
    • configurePathStyleAccess

      protected void configurePathStyleAccess(com.amazonaws.services.s3.AmazonS3Builder<?,?> s3Builder)
    • configureRegionOrEndpoint

      protected void configureRegionOrEndpoint(com.amazonaws.services.s3.AmazonS3Builder<?,?> s3Builder)
    • getBucketRegion

      protected String getBucketRegion()
    • configureAccelerateMode

      protected void configureAccelerateMode(com.amazonaws.services.s3.AmazonS3Builder<?,?> s3Builder)
    • getAmazonS3

      protected com.amazonaws.services.s3.AmazonS3 getAmazonS3(com.amazonaws.services.s3.AmazonS3Builder<?,?> s3Builder)
    • createTransferManager

      protected com.amazonaws.services.s3.transfer.TransferManager createTransferManager()
    • getRetentionMode

      @Deprecated protected com.amazonaws.services.s3.model.ObjectLockRetentionMode getRetentionMode()
      Deprecated.
      since 11.4, unused
    • isS3RetentionEnabled

      @Deprecated protected boolean isS3RetentionEnabled()
      Deprecated.
      since 2023.0, unused
    • abortOldUploads

      protected void abortOldUploads()
      Aborts uploads that crashed and are older than 1 day.
    • abortOldMultipartUploadsInternal

      protected void abortOldMultipartUploadsInternal()