You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/common/migrate-azure-credentials.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,11 @@ Application requests to Azure Storage must be authenticated using either account
19
19
20
20
The following tutorial explains how to migrate an existing application to connect to Azure Storage to use passwordless connections instead of a key-based solution. These same migration steps should apply whether you're using access keys directly, or through connection strings.
21
21
22
-
###Configure roles and users for local development authentication
22
+
## Configure roles and users for local development authentication
###Sign-in and migrate the app code to use passwordless connections
26
+
## Sign-in and migrate the app code to use passwordless connections
27
27
28
28
For local development, make sure you're authenticated with the same Azure AD account you assigned the role to on your Blob Storage account. You can authenticate via the Azure CLI, Visual Studio, Azure PowerShell, or other tools such as IntelliJ.
29
29
@@ -56,15 +56,15 @@ Next you need to update your code to use passwordless connections.
56
56
57
57
:::image type="content" source="../blobs/media/storage-quickstart-blobs-dotnet/storage-account-name.png" alt-text="Screenshot showing how to find the storage account name.":::
58
58
59
-
####Run the app locally
59
+
### Run the app locally
60
60
61
61
After making these code changes, run your application locally. The new configuration should pick up your local credentials, such as the Azure CLI, Visual Studio, or IntelliJ. The roles you assigned to your local dev user in Azure allows your app to connect to the Azure service locally.
62
62
63
-
###Configure the Azure hosting environment
63
+
## Configure the Azure hosting environment
64
64
65
65
Once your application is configured to use passwordless connections and runs locally, the same code can authenticate to Azure services after it's deployed to Azure. The sections that follow explain how to configure a deployed application to connect to Azure Blob Storage using a managed identity.
@@ -101,7 +101,7 @@ Complete the following steps in the Azure portal to associate an identity with y
101
101
102
102
---
103
103
104
-
####Assign roles to the managed identity
104
+
### Assign roles to the managed identity
105
105
106
106
Next, you need to grant permissions to the managed identity you created to access your storage account. Grant permissions by assigning a role to the managed identity, just like you did with your local development user.
107
107
@@ -149,7 +149,7 @@ If you connected your services using Service Connector you don't need to complet
149
149
150
150
---
151
151
152
-
####Update the application code
152
+
### Update the application code
153
153
154
154
You need to configure your application code to look for the specific managed identity you created when it is deployed to Azure. In some scenarios, explicitly setting the managed identity for the app also prevents other environment identities from accidentally being detected and used automatically.
155
155
@@ -169,7 +169,7 @@ You need to configure your application code to look for the specific managed ide
169
169
170
170
3. RedeployyourcodetoAzureaftermakingthischangeinorderfor the configuration updates to be applied.
171
171
172
-
#### Test the app
172
+
### Test the app
173
173
174
174
After deploying the updated code, browse to your hosted application in the browser. Your app should be able to connect to the storage account successfully. Keep in mind that it may take several minutes for the role assignments to propagate through your Azure environment. Your application is now configured to run both locally and in a production environment without the developers having to manage secrets in the application itself.
0 commit comments