Digital Signature

Discover more about the Digital Signature component and how to use it on the Digibee Integration Platform.

Digital Signature signs and verifies messages based on public and private keys.

Parameters

Take a look at the configuration options for the component. Parameters supported by Double Braces expressions are marked with (DB).

Parameter
Description
Default value
Data type

Account

Use this parameter to set the account to be used by the connector.

N/A

String

Operation

Operation types of the component (Sign Fields, Sign Payload, or Verify).

Sign Fields

String

Charset

Name of the encoding that reads the value.

UTF-8

String

Hash Algorithm

Algorithm used to sign/verify the data (e.g., SHA256WithRSA).

SHA256WithRSA

String

Public Key Algorithm

Public key algorithm type (e.g., RSA). This field is available only when Verify is selected in the Operation parameter.

N/A

String

Hash (DB)

Base64 or hex base to be verified against the payload. This field is available only when Verify is selected in the Operation parameter.

N/A

String

Sign Fields

Fields to be signed/verified (must be separated by a comma). This field is available only when Sign Fields is selected in the Operation parameter.

parameter

String

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 verified as base64.

False

Boolean

Payload (DB)

Defined by a single value or Double Braces. This field is available only when Sign Payload or Verify is selected in the Operation parameter.

N/A

String

Fail On Error

If the option is enabled, the execution of the pipeline with an error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.

False

Boolean

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.

Digital Signature in Action

Operation Sign Fields

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......"
}

Operation Sign Payload

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......" 
}

Operation Verify

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 updated