使用仅限云的Azure Active Directory的SQL Azure集成身份验证失败

问题描述 投票:5回答:1

我创建了一个Azure租户并配置了以下内容:

Azure广告:

  • 一个简单的自定义域名(少于15个字符)。 DNS验证等一切都很好。
  • 用户和管理员组
  • 两个组中的用户
  • VNET,DNS和IP地址
  • 启用设备管理
  • 启用域服务并连接到VNET

请注意,没有任何内部部署,这一切都在云端。我的实体笔记本电脑实际上只是用作跳箱​​。

SQL Azure数据库和服务器:

  • 防火墙规则为所有必要的传入连接打开
  • Active Directory管理员设置为我在Azure AD中创建的管理员组
  • AD用户都使用CREATE USER FROM EXTERNAL PROVIDER在SQL Azure中创建;

我可以使用Active Directory通用身份验证或Active Directory密码身份验证从笔记本电脑上的SSMS连接到SQL Azure数据库。对于这两种情况,我都会因为预期的用户名和密码而受到质疑。

目标:我希望能够使用集成身份验证,以便可以从a)机器,b)ASP.NET MVC站点无缝地传输身份。我没有尝试过场景b是的,所以让我们停下来吧。对于方案a,我已经完成了以下操作。

配置Azure VM:

  • 标准D2 - Windows 10完全修补
  • 连接到与域相同的VNET
  • 安装SQL Server Management Server 2016(SSMS)(最新和修补 - 13.0.15700.28)
  • 安装了ODBC 13.1(虽然我认为这不相关)
  • 阿达尔
  • 面向IT专业人员RTW的Microsoft Online Services登录助手

简而言之,我的完整“环境”包括Azure AD,SQL Azure DB和客户端VM。

问题:我使用目录服务将VM加入我的Azure Active Directory,注销并以有效域用户身份登录(在AD和SQL Azure中有效,具有适当的登录和权限)。当我打开SSMS时,我可以很好地连接Active Directory通用身份验证或Active Directory密码身份验证,但是当我尝试连接Active Directory身份验证安全性时,我收到以下错误。如果我将VM直接加入Azure AD,也会发生这种情况。我的部署是100%云,因此没有联邦。

所以我有两个问题:

  • 我在配置或方法中遗漏了什么或是否有解决方法? It may be an existing issue - see here
  • 如果使用C#在.net 4.6.2中编码并部署在云中,这种连接(通过)是否有效?可能与ODBC 13.1驱动程序?

谢谢

===================================

无法连接到.database.windows.net。

===================================

无法在Active Directory中验证用户NT Authority \ Anonymous Logon(Authentication = ActiveDirectoryIntegrated)。错误代码0xCAA9001F; state 10仅在联合流中支持的集成Windows身份验证。 (.Net SqlClient数据提供程序)

------------------------------如需帮助,请点击:http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476

------------------------------服务器名称:.database.windows.net错误号:0严重性:11状态:0过程:ADALGetAccessToken

------------------------------计划地点:

at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,SqlConnectionString connectionOptions,SqlCredential credential,Object providerInfo,String newPassword,SecureString newSecurePassword,Boolean redirectedUserInstance,SqlConnectionString userConnectionOptions,SessionData reconnectSessionData,DbConnectionPool pool,String accessToken,Boolean applyTransientFaultHandling)at System .Data.SqlClient.SqlConnectionFactory.CreateConnection在系统(DbConnectionOptions选项,DbConnectionPoolKey poolKey,对象poolGroupProviderInfo,池类DBConnectionPool,的DbConnection owningConnection,DbConnectionOptions USEROPTIONS)在System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(的DbConnection owningConnection,DbConnectionPoolGroup poolGroup,DbConnectionOptions USEROPTIONS)。 Sys上的Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection,TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry,DbConnectionOptions userOptions) tem.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry),位于Microsoft的System.Data.SqlClient.SqlConnection.Open()处的System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)。 Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()中的SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci,IServerType服务器)

authentication azure-sql-database azure-active-directory federated-identity
1个回答
5
投票

从Azure支持获得更新:

这不起作用,因为:

  1. 要使用Active Directory集成身份验证,必须联合Azure Active Directory。这是因为Kerberos必须这样做(登录到计算机时生成的Kerberos TG票证),但Azure AD不知道Kerberos,因此需要ADFS。
  2. Azure AD域服务预览:这使得旧功能(NTLM,Kerberos等)可用。但Azure SQL数据库不支持旧式Windows身份验证。

因此,您可以添加2-3个低功耗VM来实现AD + ADFS + AAD + AAD-DS,但这绝对不是理想的方式。

如果我获得有关未来计划的信息,我将在此处分享。

**

有相同的问题和一些打开的门票。一旦获得其他信息,将更新此答案。

截至今天,只有联邦设置支持记录的here。您必须使用AD Connect建立ADFS setup

这是AAD-DS应该为仅限云的解决方案提供的东西。 AAD-DS仍在预览中......

© www.soinside.com 2019 - 2024. All rights reserved.