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.

Note: 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"]).

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

  1. On the Extensibility > Actions page, select an existing extensibility action or create a new extensibility action.
  2. Under Default Inputs, select the type Secret.
  3. Search for your secret and add it to the extensibility action inputs.
  4. Add the secret to the script of the extensibility action by using the context.getSecret() function.
  5. To test your secret, click Test.