Class SQLServerColumnEncryptionAzureKeyVaultProvider


  • public class SQLServerColumnEncryptionAzureKeyVaultProvider
    extends SQLServerColumnEncryptionKeyStoreProvider
    Provides implementation similar to certificate store provider. A CEK encrypted with certificate store provider should be decryptable by this provider and vice versa. Envelope Format for the encrypted column encryption key version + keyPathLength + ciphertextLength + keyPath + ciphertext + signature version: A single byte indicating the format version. keyPathLength: Length of the keyPath. ciphertextLength: ciphertext length keyPath: keyPath used to encrypt the column encryption key. This is only used for troubleshooting purposes and is not verified during decryption. ciphertext: Encrypted column encryption key signature: Signature of the entire byte array. Signature is validated before decrypting the column encryption key.
    • Constructor Detail

      • SQLServerColumnEncryptionAzureKeyVaultProvider

        public SQLServerColumnEncryptionAzureKeyVaultProvider​(String clientId,
                                                              String clientKey)
                                                       throws SQLServerException
        Constructs a SQLServerColumnEncryptionAzureKeyVaultProvider to authenticate to AAD using the client id and client key. This is used by KeyVault client at runtime to authenticate to Azure Key Vault.
        Parameters:
        clientId - Identifier of the client requesting the token.
        clientKey - Secret key of the client requesting the token.
        Throws:
        SQLServerException - when an error occurs
      • SQLServerColumnEncryptionAzureKeyVaultProvider

        public SQLServerColumnEncryptionAzureKeyVaultProvider​(com.azure.core.credential.TokenCredential tokenCredential)
                                                       throws SQLServerException
        Constructs a SQLServerColumnEncryptionAzureKeyVaultProvider using the provided TokenCredential to authenticate to AAD. This is used by KeyVault client at runtime to authenticate to Azure Key Vault.
        Parameters:
        tokenCredential - The TokenCredential to use to authenticate to Azure Key Vault.
        Throws:
        SQLServerException - when an error occurs
      • SQLServerColumnEncryptionAzureKeyVaultProvider

        @Deprecated(since="12.1.0",
                    forRemoval=true)
        public SQLServerColumnEncryptionAzureKeyVaultProvider​(SQLServerKeyVaultAuthenticationCallback authenticationCallback)
                                                       throws SQLServerException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Constructs a SQLServerColumnEncryptionAzureKeyVaultProvider with a callback function to authenticate to AAD. This is used by KeyVault client at runtime to authenticate to Azure Key Vault. This constructor is present to maintain backwards compatibility with 8.0 version of the driver. Deprecated for removal in next stable release.
        Parameters:
        authenticationCallback - - Callback function used for authenticating to AAD.
        Throws:
        SQLServerException - when an error occurs