Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable vault name mapping and error suppression #1231

Merged
merged 11 commits into from
Feb 16, 2024

Commits on Feb 16, 2024

  1. Added documentation detailing how serialization works using the DataC…

    …ontract serialization framework. (dapr#1222)
    
    Signed-off-by: Whit Waldo <[email protected]>
    Signed-off-by: James Croft <[email protected]>
    WhitWaldo authored and jamesmcroft committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    840a763 View commit details
    Browse the repository at this point in the history
  2. Weakly typed actor polymorphic and null responses (dapr#1214)

    Signed-off-by: Remco Blok <[email protected]>
    Co-authored-by: Remco Blok <[email protected]>
    Co-authored-by: Phillip Hoff <[email protected]>
    Signed-off-by: James Croft <[email protected]>
    3 people authored and jamesmcroft committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    6337367 View commit details
    Browse the repository at this point in the history
  3. Enable vault name mapping and error suppression

    Signed-off-by: Yash Nisar <[email protected]>
    Signed-off-by: James Croft <[email protected]>
    yash-nisar authored and jamesmcroft committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    4e2443c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2b4b44d View commit details
    Browse the repository at this point in the history
  5. Update configuration load exception rethrow to match rules

    Signed-off-by: James Croft <[email protected]>
    jamesmcroft committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    fefdfcb View commit details
    Browse the repository at this point in the history
  6. Add tests for required/not required exception handling

    Signed-off-by: James Croft <[email protected]>
    jamesmcroft committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    4adc7be View commit details
    Browse the repository at this point in the history
  7. Implementing Cryptography building block in .NET (dapr#1217)

    * Added method to DaprClient and GRPC implementation to call cryptography proto endpoints
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * First pass at implementing all exposed Cryptography methods on Go interface
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Added examples for Cryptography block
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Added missing copyright statements
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated to properly support Crypto API this time
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Added copyright statements
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Removed deprecated examples as the subtle APIs are presently disabled
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated example to reflect new API shape
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated example and readme
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Added overloads for encrypting/decrypting streams instead of just fixed byte arrays. Added example demonstrating the same encrypting a file via a FileStream and decrypting from a MemoryStream.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Added some unit tests to pair with the implementation
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Added null check for the stream argument
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Changed case of the arguments as they should read "plaintext" and not "plainText"
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Reduced number of encryption implementations by just wrapping byte array into memory stream
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Constrainted returned member types per review suggestion
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated methods to use ReadOnlyMemory<byte> instead of byte[] - updated implementations to use low-allocation spans where possible (though ToArray is necessary to wrap with MemoryStream).
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated to use encryption/decryption options instead of lots of method overload variations. Simplified gRPC implementation to use fewer methods. Applied argument name updates applied previously (plainText -> plaintext).
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated tests
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Removed unused reference
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated examples to reflect new method shapes. Downgraded package to .net 6 instead of .net 8 per review suggestion.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated to reflect non-aliased values per review suggestion
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Update to ensure that both send/receive streams run at the same time instead of sequentially.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated to support streamed results in addition to fixed byte arrays. Refactored implementation to minimize duplicative code.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated example to fix compile issue
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Removed encrypt/decrypt methods that accepted streams and returned ReadOnlyMemory<byte>. Marked implementations that use this on the gRPC class as private instead.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Added missing Obsolete attributes on Encrypt/Decrypt methods. Added overloads on decrypt methods that do not require a DecryptionOptions to be passed in.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated encrypt/decrypt options so the streaming block size no longer uses a uint. Added validation in its place to ensure the value provided is never less than or equal to 0.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated how validation works in the options to accommodate lack of the shorter variation in .NET 6
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated names of encrypt/decrypt streaming methods so everything uses just EncryptAsync or DecryptAsync
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Fixed regression that would have prevented data from being sent entirely to the sidecar. Also simplified operation per suggestion in review.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated examples to reflect changed API
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated so IAsyncEnumerable methods (encrypt and decrypt) return IAsyncEnumerable<ReadOnlyMemory<byte>> instead of IAsyncEnumerable<byte[]>.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated example to reflect change from IAsyncEnumerable<byte> to IAsyncEnumerable<ReadOnlyMemory<byte>>
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Avoiding allocation by using MemoryMarshal instead of .ToArray() to create MemoryStream from ReadOnlyMemory<byte>.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Performance updates to minimize unnecessary byte array copies and eliminate unnecessary allocations.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Removed unnecessary return from SendPlaintextStreamAsync and SendCiphertextStreamAsync methods
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated exception text to be more specific as to what's wrong with the input value.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Minor tweak to prefer using using a Memory
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Deduplicated some of the Decrypt methods, simplifying the implementation
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Eliminated duplicate encryption method, simplifying implementation
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated to eliminate an unnecessary `await` and `async foreach`.
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Updated stream example to reflect the changes to the API shape
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    * Added notes about operations with stream-based data
    
    Signed-off-by: Whit Waldo <[email protected]>
    
    ---------
    
    Signed-off-by: Whit Waldo <[email protected]>
    Signed-off-by: James Croft <[email protected]>
    WhitWaldo authored and jamesmcroft committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    39f8190 View commit details
    Browse the repository at this point in the history
  8. Update DaprSecretDescriptor constructors and documentation

    Signed-off-by: James Croft
    Signed-off-by: James Croft <[email protected]>
    jamesmcroft committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    4a0a1e7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0b55a35 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    76f8a35 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    57dd847 View commit details
    Browse the repository at this point in the history