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"])
.
Procedure
- Create a new secret.
- Navigate to .
- Select New Secret.
- Enter the name of the project that the secret is assigned to.
Note: The extensibility action you want to assign the secret to must be part of the same project as the secret.
- Enter a name for your secret.
- Enter the value you want to assign to the secret.
- (Optional) Enter a description.
- Click Create.
- Add your secret to a extensibility action.
- Select an existing extensibility action or create a new extensibility action.
- Under Default Inputs, tick the Secret check box.
- 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.