Connect an Azure App Service to an Azure SQL Database with Windows Authentication

假如想象 提交于 2020-01-05 04:11:11

问题


We have:

  • an Azure App Service (like myappservice.azurewebsites.net) (written in C# & .net core 2.2)
  • An Azure SQL Server (like myserver.database.net)

Currently the App Service connects to the SQL Database via SQL Server Authentication (login+password).

However, if possible, we would like to have Windows Authentication. i.e. the service should be able to login without sending username and password. That way we would not need to store any login information in our service. Is that possible?


回答1:


Would this be a case to use a Managed Identity

The app service will have an identity with a thumbprint and sql will give that identity access by creating the user of the same name as the app service. This would eliminate the need for a username and password. The only downside is if the app is deleted and recreated the user on the sql side would need to be dropped and recreated since it has a different thumbprint. This is only if the app service is deleted and recreated, not needed for updates or redeployments



来源:https://stackoverflow.com/questions/59439359/connect-an-azure-app-service-to-an-azure-sql-database-with-windows-authenticatio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!