From 0c60bbd3a47724802cd5777e63e38f4ea512ede6 Mon Sep 17 00:00:00 2001 From: Mike Nguyen Date: Mon, 6 May 2024 08:35:18 +0100 Subject: [PATCH] fix: add crypto validation example and fix mechanical markdown (#544) * fix: add crypto validation example and fix mechanical markdown Signed-off-by: mikeee * fix: update test assertion and remove cleanup step Signed-off-by: mikeee --------- Signed-off-by: mikeee --- .github/workflows/validate_examples.yaml | 1 + examples/crypto/README.md | 31 ++++++++++++++---------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/validate_examples.yaml b/.github/workflows/validate_examples.yaml index 57f4ee2..3c5537c 100644 --- a/.github/workflows/validate_examples.yaml +++ b/.github/workflows/validate_examples.yaml @@ -158,6 +158,7 @@ jobs: [ "actor", "configuration", + "crypto", "grpc-service", "hello-world", "pubsub", diff --git a/examples/crypto/README.md b/examples/crypto/README.md index 6ec3fdf..0c9aa3d 100644 --- a/examples/crypto/README.md +++ b/examples/crypto/README.md @@ -1,6 +1,6 @@ # Dapr Crypto Example with go-sdk -## Step +## Steps ### Prepare @@ -8,8 +8,18 @@ > In order to run this sample, make sure that OpenSSL is available on your system. +### Running -This sample requires a private RSA key and a 256-bit symmetric (AES) key. We will generate them using OpenSSL: +1. This sample requires a private RSA key and a 256-bit symmetric (AES) key. We will generate them using OpenSSL: + + ```bash mkdir -p keys @@ -21,19 +31,21 @@ openssl rand -out keys/symmetric-key-256 32 -3. Run the Go service app with Dapr: +2. Run the Go service app with Dapr: ```bash @@ -44,20 +56,13 @@ dapr run --app-id crypto --resources-path ./components/ -- go run . ### Cleanup - +`ctrl + c` to stop execution ```bash dapr stop --app-id crypto (lsof -i:8080 | grep crypto) | awk '{print $2}' | xargs kill ``` - - ## Result ```shell