GetSecret
This activity helps you retrieve secret values from the Key Vault in Azure. Ensure this activity is included within a designated parent activity.
Properties
INPUT
KeyVaultURI*: This parameter specifies the “Vault URI” for your Key Vault created in Azure services. It’s used to authenticate the specific Azure Key Vault between Robility and Azure services.
This parameter accepts values in “String” datatype. You can either hardcode the values in “String” format or provide the value in String” datatype.
MethodType: This parameter specifies the method type of the execution mode.
Normal: It allows the bot to execute the activity completely before proceeding to the next activity.
Async: It allows the bot to run the activity in the background without causing any disruption to the user interface (UI) performance. It is ideal for scenarios where the activity can continue running independently, when there is no immediate activity for further execution.
By default, the method type is set to “Normal”.
SecretName*: This parameter indicates to provide the name of the secret that identifies your credentials in the specified key vault.
It accepts values in “String” datatype. You can either hardcode the values in “String” format or provide the value in String” datatype.
MISC
Body: Gets auto filled once the “Activity” is dropped into the body.
DisplayName: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.
SkipOnError: Specify the “Boolean” value as “True” or “False.”
True: Continue executing the workflow regardless of any errors thrown.
False: Halt the workflow if it encounters any errors.
None: If the option is left blank, the activity will, by default, behave as if “False” were chosen.
Version: It indicates the version of the feature being used.
OUTPUT
Result: It provides the ability to view the execution status of the activity. It returns values in “Boolean.”
True: Indicates that the activity has been executed successfully without any errors.
False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.
SecretValue*: This parameter enables you to observe the output of the activity, displaying the ‘secret values’ retrieved from the specified secret name. The output is returned in the ‘String’ datatype.
* Represents mandatory fields to execute the workflow.
Example
Click here to find the key vault URI in Azure services portal.
Let’s explore how this activity operates:
1. Now, insert the “GetSecret” activity within the “AzureServiceScope” activity.
a. In the “KeyVaultUri” property, use the variable “Vault_URI” as the value.
b. Next, navigate to the “SecretName” property and set the value to “TestApplicationCredential1” to retrieve its values.
i. This is the secret name that I previously created in the “CreateSecret” example.
c. Now, move to the “SecretValue” in the output section of the properties panel and set a variable to capture the retrieved credentials.
i. Refer the create secret activity to know how to declare the variable.
2. Leave all other properties set to their default values.
3. Add the “WriteLog” activity adjacent to the “GetSecret” activity in the workflow.
a. For this, use the input string “Secret Values: ” + Secret_V.”
b. Select “Info” as the log level.
4. Save and execute the workflow.
The bot will pull the secret values from the specified secret name within the Azure Key Vault.