* 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>
* 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>
* [Workflow] Add human approval to the workflow example
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* Add RequestApprovalActivity to workflow
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* PR feedback - explicit enum values
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
---------
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* [Workflow] Improve management API usability
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* PR feedback and update E2E test
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* PR feedback
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
---------
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* Initial Push for new workflow methods
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Updating proto and cleaning up workflow functions
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Updating runtime ver
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Updating go ver
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Updating go ver
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Temp removal of new workflow stuff to see if the test passes without it
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Another fix attempt for workflow test
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Attempting to change input for workflow E2E test
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Commenting out pause/resume for testing
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Correcting assert statement on workflow purge
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Fixing exception check
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Fixing exception check on purge
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* added in testing for raise event in workflow
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Pointing to wip for pause/resume fixes
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* First round of addresing feedback for workflow
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Addressing feedback
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* addressing more feedback
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* fixing startup.cs for workflow test
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* fixing startup.cs for workflow test again
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* changing variable type for workflow start
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Making code look nicer
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Updating workflow get for testing
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Checking against null updated time for workflow updated time
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Adding in a delay before getting info on the workflow
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Adding in a larger delay before getting info on the workflow
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Attempting to test against latest dapr dapr commit
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Removing other sleeps from workflow test
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Addressing more feedback
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Fixing assert statement on workflow purge test
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
---------
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Workflow SDK changes to enable unit testing
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* Sample workflow unit testing project
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
---------
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* Workflow Management - Initial Methods (#1003)
Initial work for workflows DotNET SDK
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Beefed up the workflows example program and added in statestore functionality
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Addressing a bunch of review comments
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Updates to readme and demo for workflows
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Changed webapp to console app
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Update DurableTask SDK dependency to get ARM64 compatibility (#1024)
* Update DurableTask SDK dependency to get ARM64 compatibility
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* Fix issue with gRPC address override behavior
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Remove Web APIs and web dependencies
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Renaming WorkflowWebApp to WorkflowConsoleApp
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Various updates to the sample app
- Replaced DaprClient with WorkflowEngineClient
- Removed unused etag logic
- Fixed incorrect usage of certain model types
- Cleaned up logs and console output
- Simplified program loop
- Cleaned up console output and added some coloring
- Added error handling in the console interactions
- Various other tweaks/simplifications/enhancements
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Updates to README and demo http commands
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Make README copy/paste-able and some other minor tweaks
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Adding in Paul's devcontainer work
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* More README touch-ups
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* [docs] Add workflows to .NET client doc (#1019)
* add workflows to client page
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Updating workflows readme and example
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Fixing README for letting users know which .NET is needed
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* moving using statements above the namespace
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
---------
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Co-authored-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Co-authored-by: Chris Gillum <cgillum@microsoft.com>
Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
* Additional API surface area
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* PR feedback
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* Environment variable configuration
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
* Fix .NET TFMs and complete the README.md contents
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
This commit adds the ability to publish raw bytes instead of using
the serialization that is built into the client.
https://github.com/dapr/dotnet-sdk/issues/718
Signed-off-by: halspang <halspang@microsoft.com>
* Add support for Bulk State, i.e. SaveBulkStateAsync
Closes https://github.com/dapr/dotnet-sdk/issues/785
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
* Update examples to include support for Bulk State
Closes https://github.com/dapr/dotnet-sdk/issues/963
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
* Changed distributedLock example to consider a new default port number
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes based on the review comments
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
Add Actor Reminder/Timer TTL support
This commit adds the TTL field to Actor reminders/timers. This allows
reminders and timers to expire after a given TimeSpan instead of
having to be manually deleted.
https://github.com/dapr/dotnet-sdk/issues/788
Signed-off-by: Hal Spang <halspang@microsoft.com>
* Added dotnet methods for Distributed Lock API
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes based on the review comments
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes in examples to make them real world - based on the PR review
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Fixed application log statements
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes to implement IDisposable
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes based on the review comments
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Added a sample test case for TryLockResponse
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes based on the review comments - 2
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Reworking the DistributedLock example
Signed-off-by: Hal Spang <halspang@microsoft.com>
Co-authored-by: Hal Spang <halspang@microsoft.com>
Add Subscribe/Unsubscribe API support
This commit adds support for both the subscribe and unsubscribe
APIs for Darp's Configuration building block. The configuration can
now be exposed through the AspNet builder pattern or by making the
request directly with the DaprClient.
https://github.com/dapr/dotnet-sdk/issues/822
Signed-off-by: Hal Spang <halspang@microsoft.com>
The secret store configuration provider was trying to access Dapr
during the app startup. If the app started faster than Dapr, it would
get an error trying to access the secrets. This commit lets the
provider wait for the sidecar to come up before making any requests.
If the sidecar does not come up at all, we will still fail.
https://github.com/dapr/dotnet-sdk/issues/779
Signed-off-by: Hal Spang <halspang@microsoft.com>
* Changed application port number for actors example
* Modified readme for actors example
* Update README.md
Signed-off-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>
Co-authored-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>
This commit adds support for the GetConfiguration API. This is an
alpha API and may be subject to change. This commit also does not
cover the Subscribe API for Configurations.
Included is a simple example showing the usage of the Configuration
API.
https://github.com/dapr/dotnet-sdk/issues/787
Signed-off-by: Hal Spang <halspang@microsoft.com>