Skip to content

Conversation

@karinazhou
Copy link
Member

This PR is to fix the issue when connecting to Azure SQL databases with secure enclaves.

The initial enclave session cache key only contains the enclave attestation URL and the server name. It works well with on-prem SQL Servers if we switch between various databases under the same server. However, this will fail for Azure SQL. Sharing the same enclave session among different databases under the same logic Azure server will cause the Azure attestation to fail.

To fix this issue, the database name is also added to the enclave session cache key.

@cheenamalhotra cheenamalhotra changed the title Fix | Fix Enclave Session Cache Issue wit Azure Database Fix | Fix Enclave Session Cache Issue with Azure Database Jul 6, 2020
@cheenamalhotra
Copy link
Member

cc @Xtrimmer

@cheenamalhotra cheenamalhotra added this to the 2.0.1 milestone Jul 7, 2020
karinazhou and others added 7 commits July 7, 2020 14:23
…ent/SqlColumnEncryptionEnclaveProvider.NetCoreApp.cs

Co-authored-by: Cheena Malhotra <v-chmalh@microsoft.com>
…t/SimulatorEnclaveProvider.cs


Extended parameter description

Co-authored-by: Cheena Malhotra <v-chmalh@microsoft.com>
…ent/EnclaveDelegate.NetStandard.cs


Extended parameter description

Co-authored-by: Cheena Malhotra <v-chmalh@microsoft.com>
…ent/EnclaveDelegate.NetCoreApp.cs


Updated parameter description

Co-authored-by: Cheena Malhotra <v-chmalh@microsoft.com>
…veProvider.xml


Updated parameter description

Co-authored-by: Cheena Malhotra <v-chmalh@microsoft.com>
…veProvider.xml


Updated parameter description

Co-authored-by: Cheena Malhotra <v-chmalh@microsoft.com>
@cheenamalhotra cheenamalhotra changed the title Fix | Fix Enclave Session Cache Issue with Azure Database [Release/2.0] Fix | Fix Enclave Session Cache Issue with Azure Database Jul 8, 2020
/// <param name="enclaveType">enclave type</param>
/// <param name="serverName">server name</param>
/// <param name="enclaveAttestationUrl">url for attestation endpoint</param>
/// <param name="database">The database that SqlClient contacts to.</param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Pending]

/// <param name="enclaveType">enclave type</param>
/// <param name="serverName">servername</param>
/// <param name="attestationUrl">attestation url for attestation service endpoint</param>
/// <param name="database">The database that SqlClient contacts to.</param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Pending]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants