SQL Server JDBC 可信连接身份验证如何工作?

发布于 2024-07-07 19:15:46 字数 217 浏览 4 评论 0原文

SQL Server JDBC 可信连接身份验证如何工作? (即可信连接如何以如此透明和优雅的方式对登录的 AD 用户进行身份验证,以及如何在没有数据库连接或任何现有 SQL Server 解决方案的情况下为 Java 中的客户端-服务器应用程序实现类似的身份验证解决方案.)

假设 * 在 Windows 2003 域中工作 * 您可以通过 JNI/JNA 访问 Windows API

How does the SQL Server JDBC Trusted Connection Authentication work? (ie how does the trusted connection authenticate the logged in AD user in such a transparent and elegant fashion and how can I implement a similar authentication solution for my client-server applications in Java without a database connection or any use of the existing SQL Server solution.)

Assumptions
* Working within a Windows 2003 domain
* You have access to the Windows API via JNI/JNA

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

茶色山野 2024-07-14 19:15:46

这取决于客户。 例如,如果您有 Web 浏览器,它可以使用 NTLM 身份验证将当前客户端的域身份验证传递到服务器。 在这种情况下,IE或FF等浏览器支持此功能,并且您的Web服务器需要NTLM的支持。 以 Tomcat 为例: http://jcifs.samba.org/src/docs/ ntlmhttpauth.html

还有 SPNEGO 协议与 Kerberos 结合使用,如下所述: http://java.sun.com/javase/6/docs/technotes/guides/security/jgss/lab/index.html

如果您有您自己的客户端,这取决于客户端的框架是否能够使用本地用户的安全上下文并能够传递它。 上面的页面至少针对 kerberos 场景描述了这一点。

问候
Bernd

PS:我不确定您是否可以将使用 jcifs/ntmlm 解决方案建立的身份验证上下文传递给 SQL Server 等后端组件。 它应该与 Kerberos 票证一起使用(如果已配置)。

It depends on the client. For example if you have a Web Browser, it can use the NTLM Authentication to pass the domain authentication of your current client to the server. In this case the browser like IE or FF supports this, and you web server needs the support for NTLM. For example here for Tomcat: http://jcifs.samba.org/src/docs/ntlmhttpauth.html

There is also the SPNEGO protcol in combination with Kerberos, as explained here: http://java.sun.com/javase/6/docs/technotes/guides/security/jgss/lab/index.html

If you have your own client, it depends on the client's framework if it is able to use the local user's security context and is able to pass it on. The page above describes this at least for a kerberos scenario.

Greetings
Bernd

PS: I am not sure if you can pass the authentication context established with the jcifs/ntmlm solution to a backend component like SQL Server. It should work with Kerberos tickets (if configured).

我三岁 2024-07-14 19:15:46

jTDS 和 Microsoft JDBC 驱动程序都提供本机 Windows 身份验证。

jTDS and Microsoft JDBC Driver both offer native Windows Authentication.

何以心动 2024-07-14 19:15:46

您看过这个问题吗? 情况似乎与您的情况类似(使用 Windows 身份验证连接到 SQL Server 数据库)。

Have you looked at this question? The situation seems to be similar to yours (connecting to a SQL Server database using Windows authentication).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文