Skip to main content

Configuring Secrets for Azure Connections

To use Azure Service Bus or Azure Storage, you'll need to configure the connection strings to azure. To avoid accidentally committing credentials to git it is recommended to use Dapr secrets. The examples below assumes you have configured dapr secrets.

  • Copy dev\dapr\alt-components\secretstore.yml to dev\dapr\components\

  • Create the file secrets.json in dev\dapr\configuration. It should contain the following:

    {
    "connections": {
    "ASBConnectionString": "Endpoint=sb://jens-dcc-poc.servicebus.windows.net/;SharedAccessKeyName=XXX_YOUR_VALUE_XXX;SharedAccessKey=XXX_YOUR_VALUE_XXX",
    "AzureStorageAccountKey": "XXX_YOUR_VALUE_XXX"
    }
    }
  • For the values of these properties:

    • ASBConnectionString can be found on https://portal.azure.com → Service Bus → Your service bus (ex: jens-dcc-poc) → Shared access policies → Your Policy.
    • AzureStorageAccountKey can be found on https://portal.azure.com → Storage accounts → Your storage account (ex: jensdccpocsa) → Access keys → Key.