Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi:

I'm hoping to create a multi-tenanted system with database-per-tenant (as per CodeProject article: Multi-Tenancy System With Separate Databases in MVC).

My target infrastructure is Azure, and I've successfully followed this tutorial: MSDN: How to create an Azure SQL Database programmatically with Visual Studio 2015

The MSDN article describes how to register a desktop app so it has a clientId that can create Azure Databases. However, this process requires authentication, and so Azure/MDSN account login credential popups appear.

I'd like to build a system whereby the databases are fully-auto provisioned by a web app (also running in Azure) without the need to manually provide credentials, i.e. there will be an onboarding process whereby the new client gets a nice "provisioning your database...." spinner and is ready to work in short time, instead of submitting an onboarding request which has to be provisioned manually by support teams offline.

Is there a way to implicitly "trust" an application to create Azure databases?
- I'm hoping it's possible without embedding my admin credentials in the app.
- I'm assuming even *if* this is possible there would be safeguards for example the web app must be hosted in the same Azure subscription / geolocation as the databases in order for trust to be established.

I appreciate that such a system (if possible) would need some pretty robust protection against DOS or other abuse - I wouldn't want to find out that overnight someone had auto-provisioned ten thousand Azure DBs and I had a bill to match! But assuming these issues are overcome is it possible?

Many thanks,
Glen.

What I have tried:

Successful proof-of-concepts based on tutorial at: Q and A - How to create an Azure SQL Database programmatically with Visual Studio 2015 in C# for Visual Studio 2015[^]
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900