Add File Secrets
You can upload encrypted files and use them in your resources like Pipelines and Connectors, in the same way as encrypted text.
This topic describes how to add an encrypted file in Harness.
In this topic:
Before You Begin
- Learn Harness' Key Concepts
- Harness Secret Manager Overview
- Add Secrets Manager
- Add Text Secrets
- Add SSH Secrets
Step 1: Add Encrypted File
This topic assumes you have a Harness Project set up. If not, see Create Organizations and Projects.
You can add an encrypted file at Project/Organization/Account scope. To do this, go to Project SETUP, Organization, or Account Resources.
Click Secret and select File.
The Add new Encrypted File settings appear.
Select the Secrets Manager you will use to encrypt this secret.
Enter a name for the encrypted file. You will use this name to reference the file in your resources.
Click Browse to locate and add a file. The default Secrets Manager for your account is used to encrypt the file.
Enter Description for your secret.
Enter Tags for your secret.
Step 2: Reference the Encrypted File
You can reference the encrypted file in any resource that uses files.
For example, in the following Configuration and Authentication dialog, click Create or Select a Secret under Select or Create a SSH Key File:
Click Select an existing Secret in the dialog and the dropdown lets you choose the file you added in Secrets Management:
For an Encrypted File secret at the Project scope, you reference the secret in a Resource using the expression:
You can reference a secret at the Org scope using the expression:
If your secret is scoped at the Account level, you can refer it like this: