You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this sample, the optional `encryption` dependency group must be included. To include, run:
8
9
9
10
poetry install --with encryption
@@ -17,38 +18,34 @@ This will start the worker. Then, in another terminal, run the following to exec
17
18
18
19
poetry run python starter.py
19
20
20
-
The workflow should complete with the hello result. To view the workflow, use [tctl](https://docs.temporal.io/tctl-v1/):
21
+
The workflow should complete with the hello result. To view the workflow, use [temporal](https://docs.temporal.io/cli):
21
22
22
-
tctl workflow show --workflow_id encryption-workflow-id
23
+
temporal workflow show --workflow-id encryption-workflow-id
23
24
24
-
Note how the input/result look like (with wrapping removed):
25
+
Note how the result looks like (with wrapping removed):
25
26
26
27
```
27
-
Input:[encoding binary/encrypted: payload encoding is not supported]
28
-
...
29
-
Result:[encoding binary/encrypted: payload encoding is not supported]
28
+
Output:[encoding binary/encrypted: payload encoding is not supported]
30
29
```
31
30
32
-
This is because the data is encrypted and not visible. To make data visible to external Temporal tools like `tctl` and
31
+
This is because the data is encrypted and not visible. To make data visible to external Temporal tools like `temporal` and
33
32
the UI, start a codec server in another terminal:
34
33
35
34
poetry run python codec_server.py
36
35
37
-
Now with that running, run `tctl` again with the codec endpoint:
36
+
Now with that running, run `temporal` again with the codec endpoint:
38
37
39
-
tctl --codec_endpoint http://localhost:8081 workflow show --workflow_id encryption-workflow-id
38
+
temporal workflow show --workflow-id encryption-workflow-id --codec-endpoint http://localhost:8081
40
39
41
40
Notice now the output has the unencrypted values:
42
41
43
42
```
44
-
Input:["Temporal"]
45
-
...
46
43
Result:["Hello, Temporal"]
47
44
```
48
45
49
46
This decryption did not leave the local machine here.
50
47
51
48
Same case with the web UI. If you go to the web UI, you'll only see encrypted input/results. But, assuming your web UI
52
-
is at `http://localhost:8080`, if you set the "Remote Codec Endpoint" in the web UI to `http://localhost:8081` you can
49
+
is at `http://localhost:8233` (this is the default for the local dev server), if you set the "Remote Codec Endpoint" in the web UI to `http://localhost:8081` you can
53
50
then see the unencrypted results. This is possible because CORS settings in the codec server allow the browser to access
54
51
the codec server directly over localhost. They can be changed to suit Temporal cloud web UI instead if necessary.
0 commit comments