Commit 426d0db
authored
[KeyVault] - Cryptography client refactoring (Azure#14077)
## What
This PR does a pure refactor of local cryptography from the existing implementation
to provide some flexibility for upcoming AES algorithms and allow for a cleaner separation
of concerns between local / remote providers.
## Why
The existing implementation worked well but I hit a few bumps when trying to add support
for AES algorithms which require different parameters crypto providers to conform to the
same API our top-level clients do and allows for ease of extensibility when AES algorithms
are added in the future.
## High level changes
- Replaced the crypto algorithms with a crypto provider interface that supplies a common set of operations
- Top level crypto client maintains a list of "providers" which are responsible for the crypto operations. Each provider isn't aware of other providers and the crypto client is responsible for sending the request to the right one.
- Centralized validation to top-level client.
Resolves Azure#141291 parent d11cd55 commit 426d0db
File tree
54 files changed
+8197
-2792
lines changed- sdk/keyvault/keyvault-keys
- recordings/node
- cryptographyclient_all_decrypts_happen_remotely
- cryptographyclient_for_managed_hsm_all_decrypts_happen_remotely_with_aes_crypto_algorithms
- local_cryptography_public_tests_when_using_a_local_jsonwebtoken_when_using_an_unsupported_algorithm
- local_cryptography_public_tests_when_using_a_local_jsonwebtoken_when_using_an_unsupported_operation
- local_cryptography_public_tests_when_using_a_local_jsonwebtoken
- review
- src
- cryptography
- localCryptography
- test
- internal
- public
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+8197
-2792
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
Lines changed: 301 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 687 additions & 111 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 420 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 223 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 100 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 228 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments