Repository navigation
Description
Always Encrypted types today don't support async APIs in base class as well as in implementations, leading to sync-over-async in Async workflows. This gap is important to fill for a true async workflow experience when executing commands where encryption/decryption is needed to be performed.
This will be covered in following tasks:
- Introduce Async API counterparts for AE base class #3673
- Implement async APIs in Always Encrypted Azure Key Vault provider #4540
- Add async counterparts to the enclave provider hierarchy (Phase 3, partial) #4541
- Implement async counterparts in all Enclave provider implementations (Add async counterparts to the enclave provider hierarchy (Phase 3, partial) #4541):
- NoneAttestationEnclaveProvider
- AzureAttestationEnclaveProvider
- VirtualizationBasedSecurityEnclaveProviderBase
- Implement Async API usage in Async code paths
- Testing and code coverage
Implementation PRs
- Add asynchronous enclave delegate operations #4886 - Async enclave-delegate operations (merged).
- Await enclave attestation in asynchronous command execution #4887 - Async enclave attestation in command execution (merged).
- Use the async Always Encrypted key store APIs on async execution paths #4585 - Original combined key-store call-path integration PR (open, retained as the reference while the split is prepared).
Key-store integration split
The changes in #4585 are being split into five draft PRs for targeted review. Each PR targets the preceding layer; the first targets main. Tests stay with the behavior they protect.
| Layer | Scope | PR |
|---|---|---|
| 1 | Async symmetric-key cache: same-key deduplication, independent-key concurrency, sync-provider compatibility, cancellation, and cache publication | #5077 (draft) |
| 2 | Async cryptographic utilities: CEK decryption, provider dispatch, candidate-key fallback, and CMK signature verification | #5079 (draft) |
| 3 | Parameter discovery: shared describe parsing, deferred key operations, Reader/NonQuery/XML cancellation and cleanup | #5080 (draft) |
| 4 | Query-metadata cache: async key loading, cancellation without eviction, and stale-cache fallback | #5081 (draft) |
| 5 | Enclave-package key loading: async package generation, connection revalidation, and bounded retries | #5085 (draft) |
Earlier layers are foundations, not individually the complete end-to-end feature. The cumulative split will be checked against #4585 before it is treated as the replacement. Existing async attestation work is already on main and is not being reintroduced.
Remaining integration gaps
- Complete and review the five-layer key-store integration split above.
- Wire async key decryption into
SqlBulkCopyasync execution (CopyBatchesAsync->TdsParser.LoadColumnEncryptionKeyscurrently calls synchronousDecryptSymmetricKey). This pre-existing path is outside the split and remains follow-up work. - Run enclave-specific retry/reuse integration coverage with enclave-enabled server configuration; these cases were skipped in Use the async Always Encrypted key store APIs on async execution paths #4585 build 184898.
End-to-end enclave-server validation and overall test coverage remain incomplete.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn progress
Activity
13 remaining items
Implement async APIs in Always Encrypted Azure Key Vault provider (#4540
priyankatiwari08 commentedon Sep 17, 2026
/triage
github-actions commentedon Sep 17, 2026
🔍 Triage Summary (on-demand re-triage)
Area\AKV Provider(Always Encrypted enclave providers and encryption/decryption async path)Analysis
This is a milestone-tracked (8.0.0) feature/epic issue to eliminate sync-over-async behavior in Always Encrypted (AE) workflows by adding true async counterparts across the base classes, key store providers, and enclave provider implementations (
NoneAttestationEnclaveProvider,AzureAttestationEnclaveProvider,VirtualizationBasedSecurityEnclaveProviderBase). Two of the linked sub-tasks (#3673, #4540, #4541) are already merged/closed, and the remaining work is enclave provider async implementations, wiring async APIs into async code paths, and adding test coverage. This is a design-sensitive, internally-maintained effort (per@mdaigle's comment) — not yet open to external contribution. Severity: P2 (planned engineering improvement, not a defect).Next Steps
@mdaigle's earlier comment; external contribution (e.g. from@RutulPatel8) should wait until the internal design discussion for enclave provider async support concludes, to avoid conflicting approaches toTask.FromResult-based fallbacks vs. true async implementations.NoneAttestationEnclaveProvider/AzureAttestationEnclaveProvider/VirtualizationBasedSecurityEnclaveProviderBase— sequencing these two efforts (refactor vs. async support) could reduce merge conflicts and duplicated work.Bump Microsoft.Data.SqlClient from 6.1.6 to 7.1.0 (#66)
Bump the microsoft group with 11 updates (#1370)
Bump the nuget-ecosystem group with 6 updates (#16)
Bump the nuget-ecosystem group with 9 updates (#76)