Generate Secrets
These actions provide ability to encrypt, decrypt and hash data, as well as validate and generate tokens and certificates.
Generate Secrets Actions
All actions of this handler share the following event metadata parameters for getting key inputs:
All secret actions also support Event Step.
Key
Constant key to use for operations
1234567890ABC
-
Key Path
Json path of key in event payload
parameters.key
-
Key Id
ID of the key to use from key state
123
-
Key Id Path
Json path of key id to use from key state
parameters.id
-
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"eventMeta": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Constant key to use for operations",
"example": "1234567890ABC"
},
"keyPath": {
"type": "string",
"description": "Json path of key in event payload",
"example": "parameters.key"
},
"keyId": {
"type": ["string", "integer"],
"description": "ID of the key to use from key state",
"example": 123
},
"keyIdPath": {
"type": "string",
"description": "Json path of key id to use from key state",
"example": "parameters.id"
}
}
}
}
}
}
}Encrypt
Encrypts a given json node or string value using preferred algorithms. Event metadata fields applicable for this action are as follows:
Input Element
Json path for the input in request event payload
data
-
Output Element
Json path for the output in response event payload
secret
-
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"eventMeta": {
"type": "object",
"properties": {
"inputElement": {
"type": "string",
"description": "Json path for the input in request event payload",
"example": "data"
},
"outputElement": {
"type": "string",
"description": "Json path for the output in response event payload",
"example": "secret"
}
}
}
}
}With event metadata parameters as:
Algorithm
Custom cipher algorithm to use
-
Handler default
Key Algorithm
Custom SecretKey algorithm to use
-
Handler default
Provider
Custom security provider to use
-
Handler default
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"eventMeta": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
"properties": {
"algorithm": {
"type": "string",
"description": "Custom cipher algorithm to use",
"default": "Handler default"
},
"keyAlgorithm": {
"type": "string",
"description": "Custom SecretKey algorithm to use",
"default": "Handler default"
},
"provider": {
"type": "string",
"description": "Custom security provider to use",
"default": "Handler default"
}
}
}
}
}
}
}Decrypt
Decrypts a previously encrypted value and returns as a json node or string value. This action uses the same fields as Encrypt action, with the addition of following event metadata parameter:
Is Json
Whether encrypted value is json and should be parsed into an object
true
false
Hash
Hashes a given json node or string value using preferred algorithms. Event metadata fields applicable for this action are as follows:
Input Element
Json path for the input in request event payload
data
-
Output Element
Json path for the output in response event payload
secret
-
With event metadata parameters as:
Algorithm
Custom hash algorithm to use
-
Handler default
Provider
Custom security provider to use
-
Handler default
Iterations
Iterations to update the hash
100
1
ValidateHash
Validates the hash of a given json node or string value using preferred algorithms. Event metadata fields applicable for this action are as follows:
Input Element
Json path for the input in request event payload, with "hash" and "data" elements
parameters
-
Output Element
Json path for the output in response event payload
secret
-
With event metadata parameters as:
Algorithm
Custom hash algorithm to use
-
Handler default
Provider
Custom security provider to use
-
Handler default
Iterations
Iterations to update the hash
100
1
GenerateToken
Generates a JWT token for given claims (including special claims such as audience). Event metadata fields applicable for this action are as follows:
Input Element
Json path for the fields to include as claims in token
parameters
-
Output Element
Json path to add token at
secret
-
With event metadata parameters as:
Provider
Custom security provider to use
-
Handler default
Expiration Time
Milliseconds to expiration of token
60000
0
ValidateToken
Validates a JWT token. Event metadata fields applicable for this action are as follows:
Input Element
Json path for the token
parameters.token
-
Output Element
Json path to add validation result to
isValid
-
With event metadata parameters as:
Provider
Custom security provider to use
-
Handler default
Input Pattern
Jmespath expression to apply on input element
-
-
DecodeToken
Decodes a JWT token and returns its claims. Event metadata fields applicable for this action are as follows:
Input Element
Json path for the token
parameters.token
-
Output Element
Json path to add decoded claims to
claims
-
With event metadata parameters as:
Provider
Custom security provider to use
-
Handler default
Input Pattern
Jmespath expression to apply on input element
-
-
Validate
Whether the token must be valid to decode
false
true
GenerateCertificate
Generates a certificate, returning private key and public certificate values. Event metadata fields applicable for this action are as follows:
Input Element
Json path for custom certificate DN and lifetime
parameters.cert
-
Output Element
Json path to add "key" and "certificate" outputs to
produced
-
With event metadata parameters as:
Provider
Custom security provider to use
-
Handler default
Certificate Algorithm
Custom certificate algorithm
-
Handler default
Certificate SignatureAlgorithm
Custom signature algorithm
-
Handler default
Certificate Key Size
Custom key size
-
Handler default
Certificate DN
Custom certificate DN
-
Handler default
Certificate Life Time
Custom certificate lifetime in days
-
Handler default
Input Pattern
JMESPath pattern applied to the data input
-
-
Last updated
