Securely connect a dev web app to a database?

Metallkiller 21 Reputation points
2020-06-07T16:56:15.927+00:00

So I'm working on an application where a Blazor frontend calls a coreFx backend, which in turn handles data in a sql server.

I would like to securely connect the web app to the database.

So far I found two options that don't involve completely opening the DB server to azure services or the internet itself:

1) Add all the outgoing IP addresses from the web app to the server's firewall. Cumbersome, and seems a very not-straight-forward solution.

2) Make a V-NET. Put db in a subnet, web app in another subnet, make private endpoint on the db, have web app access private endpoint.
This seems like the "right" way to do it on a production level. But in dev, this would mean scaling the web app to S1, which is way overpowered for what it's used for and also too expensive. I was gonna go with B1/2 maximum.

Any better ideas?

Edit: The DB is a basic 5 DTU Database on an Azure SQL Server instance on database.windows.net

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,526 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,935 questions
{count} votes

Accepted answer
  1. brtrach-MSFT 16,586 Reputation points Microsoft Employee
    2020-06-10T18:38:14.117+00:00

    @Metallkiller-2862 I would suggest you look into using a hybrid connection. It's supported on the basic tier and allows you to securely connect your web app to a database. More information here.

    Please let me know if you have any questions regarding hybrid connections.


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.