Managing Config Data Object authentications
The Config Data Object authentication service type provides a flexible way to manage structured configuration data in your IBM® Concert Workflows® instance. By using the Config Data Object authentication you can view and update variable keys after creation.
With Config Data Object authentication, you can perform the following tasks:
- View variables and values after the authentication is saved.
- Add new variables and values without recreating the authentication.
- Update existing variable keys and values directly in the Edit authentication dialog.
- Delete variables.
Understanding Config Data Object authentications
The Config Data Object authentication differs from traditional authentication in how it handles configuration data visibility and management.
- Traditional authentication
-
Traditional authentication (such as Config Data) treat authentication data as a secure box not exposed to users. After you create the traditional authentication, the following restrictions apply:
- You cannot view variables and values in the Edit authentication dialog.
- You cannot update individual values.
- You must redefine the entire authentication object to make any changes.
- Config Data Object authentication
- The Config Data Object authentication provides greater flexibility by supporting retrievable keys and retrievable values. After you create the Config Data Object authentication, you can manage it in the following ways:
- You can view variable keys when you edit the authentication.
- Variable values remain hidden for security, but you can override them.
- You can update, add, or delete individual variables without recreating the authentication.
Creating a Config Data Object authentication
- In your Concert Workflows instance, in the sidebar, click Authentications.
- Click + Create authentication.
- Enter a name and, optionally, a description.
- In the Service field, select Config Data Object.
- In the Data field, in the data object, specify your variable keys and values. Click + to add additional key-value pairs.
- Click Create.
The new authentication is now available in the authentications list.
Editing a Config Data Object authentication
- In your Concert Workflows instance, in the sidebar, click Authentications.
- Locate your Config Data Object authentication.
- Open the overflow (three-dot) menu and select Edit.
- Click Update. The Data (variable keys) are displayed, but the Object (values) remain hidden for security reasons.
- To update values:
- Select Update.
- Enter new values in the Object column for existing keys.
- Add or remove variables as needed.
- Click Save.
The next time a workflow uses this authentication, it runs with the updated values.
Deleting a Config Data Object authentication
- In your Concert Workflows instance, in the sidebar, click Authentications.
- Open the overflow menu for the authentication.
- Select Delete.
Accessing configuration data from a workflow
In workflows, you can access configuration data stored in a Config Data Object authentication type by using the Get Config Data block. See the following example to learn more.
- Example of creating and using configuration variables:
- Step 1: Create a Config Data Object authentication with sample variables:
-
- In your Concert Workflows instance, in the sidebar, click Authentications.
- Click + Create authentication.
- Enter the following information:
- Name:
GlobalConfig. - Description:
Global configuration variables for workflows. - Service: Config Data Object.
- Name:
- In the Property section, under Data, add the following variables:
- Variable:
apiEndpoint, Value:https://api.example.com. - Variable:
timeout, Value:30.
- Variable:
- Click Create.
- Step 2: Create a workflow to access the configuration data:
-
- In your Concert Workflows instance, in the sidebar, click Workflows.
- Click .
- Enter a name (for example,
TestGlobalVariables) and description, then click Create. - In the workflow editor, in the side panel, open .
- Drag the Get Config Data block into the workflow.
- In the block configuration, in the authKey field, select the Config Data Object authentication that you created.
- In the Assign block, set the output of the Get Config Data block to
$result.- For Variable, enter
$result. - For Value, enter
$GetConfigData_1.result.
- For Variable, enter
- Click Run to execute the workflow.
After the workflow runs successfully, check the output and verify that the$resultvariable displays the configuration variables and their values in JSON format:{ "apiEndpoint": "https://api.example.com", "timeout": "30" }
- Step 3: Edit the authentication and add a new variable:
-
- In your Concert Workflows instance, in the sidebar, click Authentications.
- Locate the GlobalConfig authentication.
- Open the overflow (three-dot) menu and select Edit.
- Click Update.
- Add a new variable that is called
retryCountand set its value to3. - Click Save.
- Step 4: Run the workflow again and verify the updated values:
-
- Open the TestGlobalVariables workflow.
- Click Run to execute the workflow again.
- Check the output of the
$resultvariable.The output now displays the updated variables and values:
For more information about workflows, see Using workflows.{ "apiEndpoint":"https://api.newexample.com", "timeout": "30", "retryCount": "3" }
Relationship to FaaS Terraform and FaaS Ansible authentications
- additionalFiles.
- inputVariables.
- environmentVariables.
- Variable names are visible.
- Variable values are not displayed.
- For additionalFiles, the file name is retrievable, but the file content is not shown.
The Config Data Object authentication extends this retrievable-structure pattern to a general-purpose authentication type that is suitable for complex configuration objects, shared workflow data, and simplified management of FaaS Terraform and FaaS Ansible configurations.
For more information about authentications, see Using authentications.