How can I create secrets for use in
extensibility actions
You can add encrypted inputs to your extensibility action by using project level
secrets.
- Create a secret to use with the extensibility action. See Secret Automation Assembler properties.
- Verify that the extensibility action and the secret you want to use together are associated with the same project.
With secrets, you can add encrypted input values to your extensibility actions.
Encryption is useful for use cases where your inputs are used to manage sensitive
data, such as passwords and certificates. Secrets are available for all FaaS
providers and runtimes.
You can also add encrypted input
values by using action constants. See How can I create extensibility action constants.
Access to secrets depends on the project
that they are created in. Secrets created in Project A, for example, are accessible
only to users included in Project A.
Secrets use the
context.getSecret()
function to decrypt the secret value when
it is added to your script. This function uses the name of the secret as a
parameter. For example, you might use an secret named abxsecret
as
an encrypted input parameter in your action. To add this input parameter to your
action script, you must use
context.getSecret(inputs["abxsecret"])
.- On thepage, select an existing extensibility action or create a new extensibility action.
- UnderDefault Inputs, select the typeSecret.
- Search for your secret and add it to the extensibility action inputs.
- Add the secret to the script of the extensibility action by using thecontext.getSecret()function.
- To test your secret, clickTest.