You can add encrypted inputs to your extensibility action by using project level secrets.
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.
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"])
.
Prerequisites
- 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.
Procedure
- On the page, select an existing extensibility action or create a new extensibility action.
- Under Default Inputs, select the type Secret.
- Search for your secret and add it to the extensibility action inputs.
- Add the secret to the script of the extensibility action by using the
context.getSecret()
function. - To test your secret, click Test.