How Can I Add a Multi-Line Private Key as a Secret?
Question
I want to add a private key as a secret for my function connector. However, the private key spans multiple lines. How should I format it, and how can I add it as a secret in Fivetran?
Environment
All function connectors
Answer
To add a multi-line private key as a secret for your function connector, you must convert the private key to a single-line Base64 encoded string. To add the Base64 encoded string as a secret for an existing connector, do the following:
- In Fivetran, go to your connector page.
- Select the Setup tab.
- Click Edit connection details.
- Click + Add secrets to specify your secret.
- In the Secret Name field, enter a unique secret name.
- In the Secret Key field, enter the Base64 encoded string.
- Click Save.
- Click Save & Test.
- In your function code, decode the Base64 encoded string back to its original format.