Dynamic database connection strings and how to store them securely

Nuwan Wickramanayaka 81 Reputation points
2023-08-10T09:01:02.3833333+00:00

My requirement is like below

In my recent project contains .NET core API and Angular web client. Single instance of the application is deployed Azure and multiple customer are using this. Customers are having separate databases and unique customer ref will be provided when they login to the application. That reference is used to identity the customer and connected to the relevant customer database. Customer db connection string will be retrieved from master database and application will be connected that customer db. All the customer transactions will be saved on related customer db. As per the existing behavior customer db connection strings a maintain in a table. I need to come up with a solution to improve the security of those sensitive information.

One solution in my mind is :- Store databases connection string in key vault as encrypted and retrieve it.

Is there a way to user User assigned identities for that purpose (some kind of way to pick the identity based on customer reference) ?

What is the most suitable architecture for this kind of scenario?

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,411 questions
Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
829 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,644 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vahid Ghafarpour 22,800 Reputation points
    2023-08-14T05:47:11.9466667+00:00

    Using Azure Key Vault to store sensitive information is a recommended practice. Keep your customer database connection strings securely in Key Vault as secrets. This prevents direct access to sensitive data and allows you to control access to the secrets.

    1 person found this answer helpful.
    0 comments No comments

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.