Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Custom Payload Converter (Crypto converter)

The sample demonstrates how you can override the default Json Converter to encrypt/decrypt payloads using jackson-json-crypto.

Running

  1. Start Temporal Server with "default" namespace enabled. For example using local Docker:
git clone https://github.com/temporalio/docker-compose.git
cd  docker-compose
docker-compose up
  1. Run the following command to start the sample:
./gradlew -q execute -PmainClass=io.temporal.samples.payloadconverter.crypto.Starter
  1. View the history in Temporal Web UI You will see your workflow inputs fields that were set to be encrypted in the MyCustomer model class are indeed encrypted, for example:
[
  {
    "name": {
      "salt": "uZnKfjmFzwYsH6ncZBVgvvmAPTw=",
      "iv": "0nK++kg8IgtOJFs+gQ/U0A==",
      "value": "cvXFWXfU8RFKdlWgjrHaog=="
    },
    "age": {
      "salt": "uZnKfjmFzwYsH6ncZBVgvvmAPTw=",
      "iv": "0nK++kg8IgtOJFs+gQ/U0A==",
      "value": "OFA/XDiwep153xZHOECqJA=="
    },
    "approved": {
      "salt": "uZnKfjmFzwYsH6ncZBVgvvmAPTw=",
      "iv": "0nK++kg8IgtOJFs+gQ/U0A==",
      "value": "Tm23RaHHKz2wM56G2Bn6Vw=="
    }
  }
]