CreateSecret

Estimated reading: 4 minutes 1007 views

This activity assists the user in creating a new secret within your Azure Key Vault using the Key Vault URI. It must be placed within the body of the AzureServiceScope activity. Click here to refer to the Secrets.

Limitations

1. Creating a new secret using this activity does not permit setting ‘activation’ and ‘expiration’ dates for your secret values.

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.

SecretValue*:  This parameter is used to provide the value for the secret that will be created in the specified Key Vault. 

This parameter accepts values in “String” datatype. You can either hardcode the values in “String” format or provide the value in String” datatype.

MISC

BodyGets 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

CreatedStatus*: It provides the result of the status of the secret created in the key vault in Azure. It returns values in “Boolean.”

True: Indicates that the provided secret value has been created successfully in the specified key vault.
False: Indicates that the provided secret value creation has been unsuccessful due to an unexpected error.

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.

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. Place the “CreateSecret” activity inside the “AzureServiceScope” activity, which will serve as a parent activity for all associated activities in AzureKeyVault.
a. Create a secret value in your Key Vault using this method.     
b. Specify the value as a variable in the “KeyVaultUri” property.
c. For the “SecretName” property, I am providing the value “TestApplicationCredential1.
     i. This will be the name used to identify secret values.
d. Next, in the “SecretValue” property, I am going to provide the value as below:
     i. Username: ABC0123
    ii. Password: Pass0123.
   iii. This is the value of your credentials that you are going to store in the Key Vault.
e. Navigate to the “CreatedStatus” property to define a variable for monitoring the status of the secret created in the Key Vault. 
    i. There are two methods to define a variable:
   ii. Method 1 – Select the “CreatedStatus” property within the “CreateSecret” activity and enter the variable name “CreatedS.” Then, use the shortcut “Ctrl+Q” to create the variable.
  iii. Method 2 – Go to the Variables pane, enter the name “CreatedS.” In the “Variable Type” column, choose “Boolean” from the dropdown menu, as the output will be either True or False.
2. Set the remaining properties to their default values.
3. Insert the “WriteLog” activity adjacent to the “CreateSecret” activity in the workflow.
a. Provide the input string as “Secret Created: ” + CreatedS.ToString().
b. Select the log level as “Info.”
4. Save the workflow and initiate execution to view the results. The bot will create a new secret in your Azure Key Vault using the provided values.

Share this Doc

CreateSecret

Or copy link

CONTENTS