Digital Signature
Know the component and how to use it.
Digital Signature signs and verifies messages based on public and private keys.
Take a look at the configuration parameters of the component:
- Account: use this parameter to set the account to be used by the connector.
- Operation: operation types of the component (Sign Fields, Sign Payload or Verify).
- Charset: name of the encoding that reads the value.
- Hash Algorithm: algorithm used to sign/verify the data (eg.: SHA256WithRSA).
- Public Key Algorithm: public key algorithm type (eg.: RSA). This field is available only when Verify is selected in the Operation parameter.
- Hash: base64 or hex base to be verified against the payload. This field is available only when Verify is selected in the Operation parameter.
- Sign Fields: fields to be signed/verified (must be separated by comma). This field is available only when Sign Fields is selected in the Operation parameter.
- Hash in Hexadecimal: if the option is activated, the value to be verified or signed must be provided in hex format; otherwise, it will be signed or verifies as base64.
- Payload: defined by a single value or Double Braces. This field is available only when Sign Payload or Verify are selected in the Operation parameter.
- Fail On Error: if the option is enabled, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.
IMPORTANT: to sign, you must configure a PRIVATE_KEY account or send the property of the key via body. To verify, you must configure a PUBLIC_KEY account or send the property of the key via body.
1. In your components palette, select Digital Signature.
2. Open the component configurations.
3. In the Operation field, select Sign Fields.
4. Insert the following specifications in the indicated fields:
- Sign Fields: parameter
- Hash Algorithm: SHA256WithRSA
5. Keep the options Hash in Hexadecimal and Fail On Error activated.
6. Click on Continue.
7. Deploy the pipeline.
8. The pipeline will receive a payload like this one:
{
"parameter": "Test for encryption"
}
9. The result of the executed test will appear as shown below:
{
"parameter": "....032281762E01B6C50C1DE825A2FD5A177CCFD5C1DB54E88ADD188A0B80311E672EDE5F8B......"
}
1. In your components palette, select Digital Signature.
2. Open the component configurations.
3. In the Operation field, select Sign Payload.
4. Insert the following specifications in the indicated fields:
- Payload: [{ \"result\": \"{{ message.$.parameter }}\"}]
- Hash Algorithm: SHA256WithRSA
5. Keep the options Hash in Hexadecimal and Fail On Error activated.
6. Click on Confirm.
7. Deploy the pipeline.
8. The result of the executed test will appear as shown below:
{
"result": "....032281762E01B6C50C1DE825A2FD5A177CCFD5C1DB54E88ADD188A0B80311E672EDE5F8B......"
}
1. In your components palette, select Digital Signature.
2. Open the component configurations.
3. In the Operation field, select Verify.
4. Insert the following specifications in the indicated fields:
- Sign Fields: {{ message.$.signed }}
- Parameter: {{ message.$.rawData }}
- Hash Algorithm: SHA256WithRSA
- Public Key Algorithm: RSA
5. Keep the options Hash in Hexadecimal and Fail On Error activated.
6. Click on "Confirm".
7. Deploy the pipeline.
8. The pipeline will receive a payload like this one:
{
"rawData": "Test for encryption",
"signed": "...032281762E01B6C50C1DE825A2FD5A177CCFD5C1DB54E...."
}
9. The result of the executed test will appear as shown below:
{
"success": true
}
Last modified 1mo ago