* Adds http timeout
Signed-off-by: Elena Kolevska <elena@kolevska.com>
* Adds a timeout for the grpc client
Signed-off-by: Elena Kolevska <elena@kolevska.com>
* Small updates
Signed-off-by: Elena Kolevska <elena@kolevska.com>
* Updates test
Signed-off-by: Elena Kolevska <elena@kolevska.com>
* Adds a timeout example in docs
Signed-off-by: Elena Kolevska <elena@kolevska.com>
* Adds e2e test for http service invocation
Signed-off-by: Elena Kolevska <elena@kolevska.com>
* Adds tests for grpc service invocation
Signed-off-by: Elena Kolevska <elena@kolevska.com>
* Removes grpc timeout, because it’s not needed. It can be passed directly to the call as shown in the updated tests and docs
Signed-off-by: Elena Kolevska <elena@kolevska.com>
* Update src/Dapr.Client/DaprClientBuilder.cs
Signed-off-by: Elena Kolevska <elena-kolevska@users.noreply.github.com>
---------
Signed-off-by: Elena Kolevska <elena@kolevska.com>
Signed-off-by: Elena Kolevska <elena-kolevska@users.noreply.github.com>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
* Adds overload to BulkStateItem and GetBulkStateAsync to perform SDK-based deserialization of returned values instead of strictly returning serialized strings.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated method summary to better direct user towards one method or the other (typed or not)
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added comments to the typed BulkStateItem to better reflect the deserialized nature of the value.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Refactored GetBulkStateAsync method to a shared private method so both the non-generic and generic public methods can deserialize the data once as necessary.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed excessive space in comment.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Formatting: If we're separating parameters to separate lines, convention requires each have their own line.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
---------
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
* Added documentation detailing how serialization works using the DataContract serialization framework. (#1222)
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
* Weakly typed actor polymorphic and null responses (#1214)
Signed-off-by: Remco Blok <remco.blok@resilientenergy.com>
Co-authored-by: Remco Blok <remco.blok@resilientenergy.com>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
* Enable vault name mapping and error suppression
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
* Add additional secret descriptor constructor for required without key map
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
* Update configuration load exception rethrow to match rules
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
* Add tests for required/not required exception handling
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
* Implementing Cryptography building block in .NET (#1217)
* Added method to DaprClient and GRPC implementation to call cryptography proto endpoints
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* First pass at implementing all exposed Cryptography methods on Go interface
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added examples for Cryptography block
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added missing copyright statements
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated to properly support Crypto API this time
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added copyright statements
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed deprecated examples as the subtle APIs are presently disabled
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated example to reflect new API shape
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated example and readme
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Added some unit tests to pair with the implementation
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added null check for the stream argument
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Changed case of the arguments as they should read "plaintext" and not "plainText"
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Reduced number of encryption implementations by just wrapping byte array into memory stream
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Constrainted returned member types per review suggestion
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Updated tests
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed unused reference
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated examples to reflect new method shapes. Downgraded package to .net 6 instead of .net 8 per review suggestion.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated to reflect non-aliased values per review suggestion
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Update to ensure that both send/receive streams run at the same time instead of sequentially.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated to support streamed results in addition to fixed byte arrays. Refactored implementation to minimize duplicative code.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated example to fix compile issue
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Updated how validation works in the options to accommodate lack of the shorter variation in .NET 6
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated names of encrypt/decrypt streaming methods so everything uses just EncryptAsync or DecryptAsync
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Updated examples to reflect changed API
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated so IAsyncEnumerable methods (encrypt and decrypt) return IAsyncEnumerable<ReadOnlyMemory<byte>> instead of IAsyncEnumerable<byte[]>.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated example to reflect change from IAsyncEnumerable<byte> to IAsyncEnumerable<ReadOnlyMemory<byte>>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Avoiding allocation by using MemoryMarshal instead of .ToArray() to create MemoryStream from ReadOnlyMemory<byte>.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Performance updates to minimize unnecessary byte array copies and eliminate unnecessary allocations.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed unnecessary return from SendPlaintextStreamAsync and SendCiphertextStreamAsync methods
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated exception text to be more specific as to what's wrong with the input value.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Minor tweak to prefer using using a Memory
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Deduplicated some of the Decrypt methods, simplifying the implementation
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Eliminated duplicate encryption method, simplifying implementation
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated to eliminate an unnecessary `await` and `async foreach`.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated stream example to reflect the changes to the API shape
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added notes about operations with stream-based data
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
---------
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
* Update DaprSecretDescriptor constructors and documentation
Signed-off-by: James Croft
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
* Remove DaprSecretStoreConfigurationProvider Console.WriteLine
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
---------
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: James Croft <jamz_c@hotmail.co.uk>
Signed-off-by: Remco Blok <remco.blok@resilientenergy.com>
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
Signed-off-by: James Croft
Co-authored-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Remco Blok <remcoblok@hotmail.com>
Co-authored-by: Remco Blok <remco.blok@resilientenergy.com>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: Yash Nisar <yashnisar@microsoft.com>
* Handle the case where appid can contain some uppercases
Signed-off-by: Nicolas Chaussé <chausse.nicolas@gmail.com>
Signed-off-by: TWEESTY <chausse.nicolas@gmail.com>
Signed-off-by: Nicolas Chaussé <chausse.nicolas@gmail.com>
* Add one test sample
Signed-off-by: Nicolas Chaussé <chausse.nicolas@gmail.com>
Signed-off-by: TWEESTY <chausse.nicolas@gmail.com>
Signed-off-by: Nicolas Chaussé <chausse.nicolas@gmail.com>
* Optimization in order to not add some overhead time for the "normal" use case
Signed-off-by: TWEESTY <chausse.nicolas@gmail.com>
Signed-off-by: Nicolas Chaussé <chausse.nicolas@gmail.com>
* Change comment which was false
Signed-off-by: TWEESTY <chausse.nicolas@gmail.com>
Signed-off-by: Nicolas Chaussé <chausse.nicolas@gmail.com>
* Remove the breaking change
Signed-off-by: TWEESTY <chausse.nicolas@gmail.com>
Signed-off-by: Nicolas Chaussé <chausse.nicolas@gmail.com>
* Simplify according to the review
Signed-off-by: Nicolas Chaussé <chausse.nicolas@gmail.com>
---------
Signed-off-by: Nicolas Chaussé <chausse.nicolas@gmail.com>
Signed-off-by: TWEESTY <chausse.nicolas@gmail.com>
* Added method to DaprClient and GRPC implementation to call cryptography proto endpoints
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* First pass at implementing all exposed Cryptography methods on Go interface
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added examples for Cryptography block
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added missing copyright statements
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated to properly support Crypto API this time
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added copyright statements
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed deprecated examples as the subtle APIs are presently disabled
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated example to reflect new API shape
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated example and readme
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Added some unit tests to pair with the implementation
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added null check for the stream argument
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Changed case of the arguments as they should read "plaintext" and not "plainText"
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Reduced number of encryption implementations by just wrapping byte array into memory stream
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Constrainted returned member types per review suggestion
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Updated tests
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed unused reference
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated examples to reflect new method shapes. Downgraded package to .net 6 instead of .net 8 per review suggestion.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated to reflect non-aliased values per review suggestion
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Update to ensure that both send/receive streams run at the same time instead of sequentially.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated to support streamed results in addition to fixed byte arrays. Refactored implementation to minimize duplicative code.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated example to fix compile issue
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Updated how validation works in the options to accommodate lack of the shorter variation in .NET 6
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated names of encrypt/decrypt streaming methods so everything uses just EncryptAsync or DecryptAsync
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Updated examples to reflect changed API
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated so IAsyncEnumerable methods (encrypt and decrypt) return IAsyncEnumerable<ReadOnlyMemory<byte>> instead of IAsyncEnumerable<byte[]>.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated example to reflect change from IAsyncEnumerable<byte> to IAsyncEnumerable<ReadOnlyMemory<byte>>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Avoiding allocation by using MemoryMarshal instead of .ToArray() to create MemoryStream from ReadOnlyMemory<byte>.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Performance updates to minimize unnecessary byte array copies and eliminate unnecessary allocations.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed unnecessary return from SendPlaintextStreamAsync and SendCiphertextStreamAsync methods
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated exception text to be more specific as to what's wrong with the input value.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Minor tweak to prefer using using a Memory
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Deduplicated some of the Decrypt methods, simplifying the implementation
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Eliminated duplicate encryption method, simplifying implementation
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated to eliminate an unnecessary `await` and `async foreach`.
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated stream example to reflect the changes to the API shape
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added notes about operations with stream-based data
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
---------
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Fix example output to not repeat "Success"
Signed-off-by: Henrik Karström <henrik.karstrom@gmail.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
* Initial setup for workflow log tracing
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Created log sink for E2E tests using serilog
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Formatting
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Addressing feedback on review
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Addressing some review comments
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Addressing more feedbck in the workflow e2e test
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
---------
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Add system text json support for actor serialization
Signed-off-by: Erik O'Leary <erik.m.oleary@gmail.com>
* Remove unnecessary stream; directly use serializetobytes
Signed-off-by: Erik O'Leary <erik.m.oleary@gmail.com>
* Disable parallel test execution to make test results more repeatable/predictable
Signed-off-by: Erik O'Leary <erik.m.oleary@gmail.com>
---------
Signed-off-by: Erik O'Leary <erik.m.oleary@gmail.com>
* Remove .NET Core 3.1 support and standardize on .NET 6
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
* Remove support for .NET 5 as well
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
---------
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>