Module com.microsoft.sqlserver.jdbc
Package com.microsoft.sqlserver.jdbc

# Class SQLServerAASEnclaveProvider

java.lang.Object
com.microsoft.sqlserver.jdbc.SQLServerAASEnclaveProvider

    public class SQLServerAASEnclaveProvider
    extends java.lang.Object

Provides the implementation of the AAS Enclave Provider. The enclave provider encapsulates the client-side implementation details of the enclave attestation protocol.

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`static java.lang.String` | `SDPE1` | sp_describe_parameter_encryption stored procedure with 2 params
`static java.lang.String` | `SDPE2` | sp_describe_parameter_encryption stored procedure with 3 params

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`SQLServerAASEnclaveProvider()` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`java.util.ArrayList<byte[]>` | `createEnclaveSession​(SQLServerConnection connection, java.lang.String userSql, java.lang.String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.Parameter[] params, java.util.ArrayList<java.lang.String> parameterNames)` |
`default java.sql.ResultSet` | `executeSDPEv1​(java.sql.PreparedStatement stmt, java.lang.String userSql, java.lang.String preparedTypeDefinitions)` | Execute sp_describe_parameter_encryption
`default java.sql.ResultSet` | `executeSDPEv2​(java.sql.PreparedStatement stmt, java.lang.String userSql, java.lang.String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.BaseAttestationRequest req)` | Execute sp_describe_parameter_encryption for AEv2
`void` | `getAttestationParameters​(java.lang.String url)` |
`default byte[]` | `getEnclavePackage​(java.lang.String userSQL, java.util.ArrayList<byte[]> enclaveCEKs)` | Get the Enclave package
`com.microsoft.sqlserver.jdbc.EnclaveSession` | `getEnclaveSession()` |
`void` | `invalidateEnclaveSession()` |
`default void` | `processSDPEv1​(java.lang.String userSql, java.lang.String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.Parameter[] params, java.util.ArrayList<java.lang.String> parameterNames, SQLServerConnection connection, java.sql.PreparedStatement stmt, java.sql.ResultSet rs, java.util.ArrayList<byte[]> enclaveRequestedCEKs)` | Process result from sp_describe_parameter_encryption

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### SDPE1

static final java.lang.String SDPE1
sp_describe_parameter_encryption stored procedure with 2 params

See Also:
  Constant Field Values

### SDPE2

static final java.lang.String SDPE2
sp_describe_parameter_encryption stored procedure with 3 params

See Also:
  Constant Field Values

## Constructor Details

### SQLServerAASEnclaveProvider

public SQLServerAASEnclaveProvider()

## Method Details

### getAttestationParameters

public void getAttestationParameters​(java.lang.String url) throws SQLServerException

Throws:
  `SQLServerException`

### createEnclaveSession

public java.util.ArrayList<byte[]> createEnclaveSession​(SQLServerConnection connection, java.lang.String userSql, java.lang.String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.Parameter[] params, java.util.ArrayList<java.lang.String> parameterNames) throws SQLServerException

Throws:
  `SQLServerException`

### invalidateEnclaveSession

public void invalidateEnclaveSession()

### getEnclaveSession

public com.microsoft.sqlserver.jdbc.EnclaveSession getEnclaveSession()

### getEnclavePackage

default byte[] getEnclavePackage​(java.lang.String userSQL, java.util.ArrayList<byte[]> enclaveCEKs) throws SQLServerException
Get the Enclave package

Parameters:
  `userSQL` - user sql
  `enclaveCEKs` - enclave CEKs
Returns:
  the enclave package
Throws:
  `SQLServerException` - if error

### executeSDPEv2

default java.sql.ResultSet executeSDPEv2​(java.sql.PreparedStatement stmt, java.lang.String userSql, java.lang.String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.BaseAttestationRequest req) throws java.sql.SQLException, java.io.IOException
Execute sp_describe_parameter_encryption for AEv2

Parameters:
  `stmt` - statement
  `userSql` - user sql
  `preparedTypeDefinitions` - prepared type definitions
  `req` - request
Returns:
  result set
Throws:
  `java.sql.SQLException` - if error
  `java.io.IOException` - if IO exception

### executeSDPEv1

default java.sql.ResultSet executeSDPEv1​(java.sql.PreparedStatement stmt, java.lang.String userSql, java.lang.String preparedTypeDefinitions) throws java.sql.SQLException
Execute sp_describe_parameter_encryption

Parameters:
  `stmt` - stmt
  `userSql` - user sql
  `preparedTypeDefinitions` - prepared type definitions
Returns:
  result set
Throws:
  `java.sql.SQLException` - if error

### processSDPEv1

default void processSDPEv1​(java.lang.String userSql, java.lang.String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.Parameter[] params, java.util.ArrayList<java.lang.String> parameterNames, SQLServerConnection connection, java.sql.PreparedStatement stmt, java.sql.ResultSet rs, java.util.ArrayList<byte[]> enclaveRequestedCEKs) throws java.sql.SQLException
Process result from sp_describe_parameter_encryption

Parameters:
  `userSql` - user sql
  `preparedTypeDefinitions` - prepared type definitions
  `params` - params
  `parameterNames` - param names
  `connection` - connection
  `stmt` - statement
  `rs` - result set
  `enclaveRequestedCEKs` - enclave requested CEKs
Throws:
  `java.sql.SQLException` - if error