Connect/Authenticate Django Web App on SQL server not using user-pass on my code

Luca Chiavarini 71 Reputation points
2022-10-10T08:42:03.383+00:00

I have Django web app, with an SQL server db, deployed on my Azure subscription. I need to connect/authenticate my Web App to SQL server (still on my Azure subscription) but I can't using username-password on my code.

How can I do it? By key vault? By Azure AD? Other ways?

Thanks!

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,448 questions
Azure SQL Database
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,934 questions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Bas Pruijn 956 Reputation points
    2022-10-10T08:48:30.377+00:00

    The best approach would be to use the managed identities. Your webapp can connect to the database using a AAD identity automatically provided by Azure. This is secure, without you needing to implement all kinds of difficult set-up.

    have a look at https://github.com/Azure-Samples/msdocs-django-web-app-managed-identity/blob/main/README.md for some examples.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.