Secret Key and Local Secret
Overview
When importing data via HTTP, you sometimes need to provide authentication to an external site. There are several options for how to store and then reference the username and password; see Authenticating for an API. One option is to use the Secret Key section to create a key associated with the username or password, which is encrypted and stored in the PhixFlow database.
For Private Secret Keys, see Private Secrets.
Secret Key
Basic Settings
Field | Description |
|---|---|
Name | Enter a name. |
Key | Read-only. When you save the secret key, PhixFlow automatically generates a unique key in this field. The key is a combination of the Name and the internal ID of the HTTP datasource. This key remains the same if you change the name of the secret key. |
Enabled |
|
Secret | Click When you save the local secret, PhixFlow displays asterisks here to show that the secret value has been encrypted. To edit a secret value, click You can save the secret key without adding a secret. In this case, you must add the secret key and a value to the keystore; see Authenticating for an API and Adding Data to a Keystore. |
Local Secret
Basic Settings
Field | Description |
|---|---|
Key | Read-only. The same automatically-generated key in the secret key is paired with this local secret. In PhixFlow version 11.1.1+, this field is not visible. |
Secret | Enter the value that you want to encrypt, such as a password. To switch between displaying or hiding the value, click PhixFlow encrypts the value when storing it in the database, but when it is required to authenticate to an external site, PhixFlow supplies the unencrypted string. |
External Secret (Keystore)
Secret values such as passwords can be held in the Java Keystore used as part of your PhixFlow installation. This enables a single instance of the secret to exist outside off PhixFlow.
Setup
In PhixFlow, open the Properties of the HTTP of Database Datasource where the secret value will be used.
In the Advanced section, record the 32 character Internal ID.
Create an entry on the server Keystore with the naming convention
datasourceInternalID.KeyName. Where the KeyName should be unique from any other secret name used in PhixFlow.The Datasource can now reference the secret using the syntax, _datasource.KeyName
PhixFlow will now use the Keystore value secret.
Note, PhixFlow checks for a local secret with the KeyName first and if one exists it will be used. If one is not found PhixFlow checks the keystore for the value and uses it where found. All names are case-sensitive.
Using a Secret
For HTTP objects connected to the HTTP datasource, and HTTP Action nodes you can reference a secret key in:
HTTP Collectors and HTTP Exporters → URL Expression or Statement Expression
HTTP Headers Properties → Basic Settings → Value.
HTTP Action → Headers