Class S3Keyring

  • All Implemented Interfaces:
    Keyring
    Direct Known Subclasses:
    AesKeyring, KmsKeyring, RsaKeyring

    public abstract class S3Keyring
    extends Object
    implements Keyring
    This serves as the base class for all the keyrings in the S3 encryption client. Shared functionality is all performed here.
    • Method Detail

      • defaultGenerateDataKey

        public EncryptionMaterials defaultGenerateDataKey​(EncryptionMaterials materials)
        Generates a data key using the provided EncryptionMaterials and the configured DataKeyGenerator.

        This method is intended for extension by customers who need to customize key generation within their Keyring implementation. It generates a data key for encryption using the algorithm suite and cryptographic provider configured in the provided EncryptionMaterials object.

        Parameters:
        materials - The EncryptionMaterials containing information about the algorithm suite and cryptographic provider to be used for data key generation.
        Returns:
        An updated EncryptionMaterials object with the generated plaintext data key.
      • warnIfEncryptionContextIsPresent

        public void warnIfEncryptionContextIsPresent​(EncryptionMaterials materials)
        Checks if an encryption context is present in the EncryptionMaterials and issues a warning if an encryption context is found.

        Encryption context is not recommended for use with non-KMS keyrings as it may not provide additional security benefits.

        Parameters:
        materials - EncryptionMaterials