Crypto Decrypt Action
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
Decrypts the body of each message that crypto-encrypt-action encrypted, with the same algorithm and secret key.
Use it to get back the original data that was encrypted with crypto-encrypt-action, for example after reading it from storage or receiving it from another system.
Input: the encrypted data exactly as crypto-encrypt-action produced it, as bytes or a stream. If it was encoded on the way, for example in Base64, decode it first.
Output: the body is the original data, as bytes (a stream). The headers are kept.
Good to know: data that was changed, or a different algorithm, mode or key than when encrypting, fails the message with "Message authentication failed". The key is a secret; keep it in a vault or a secret, not in plain configuration.
Configuration Options
The following table summarizes the configuration options available for the crypto-decrypt-action Kamelet:
| Property | Name | Description | Type | Default | Example |
|---|---|---|---|---|---|
Algorithm | Required The name of the encryption algorithm the data was encrypted with, such as | string | AES | ||
Secret Key | Required The secret key the data was encrypted with, as text. Its length must fit the algorithm: for | string | |||
Mode | The block cipher mode, | string | CBC |
Dependencies
At runtime, the crypto-decrypt-action Kamelet relies upon the presence of the following dependencies:
-
camel:kamelet
-
camel:crypto
Camel JBang usage
Prerequisites
-
You’ve installed JBang.
-
You have executed the following command:
jbang app install camel@apache/camel Supposing you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:timer-source"
parameters:
period: 10000
message: 'test'
steps:
- to:
uri: "kamelet:crypto-decrypt-action"
parameters:
.
.
.
- to:
uri: "kamelet:log-sink" You can now run it directly through the following command
camel run route.yaml