NtlmSsp 与 kerberos

发布于 2024-07-23 00:03:27 字数 103 浏览 2 评论 0原文

谁能详细说明不同之处?

我目前正在使用 ntlmssp.authenticaten ( jcifs) 但似乎无法执行 getPassword()。 它总是返回 null

can anyone elaborate the different?

i'm currently using ntlmssp.authenticaten ( jcifs) but seems not able to do getPassword(). it's always return null

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

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

发布评论

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

评论(1

じее 2024-07-30 00:03:28

它们是有区别的。

使用 Kerberos,您必须向域管理员询问服务主体名称 (SPN)您的网络应用程序。 本质上,这是 Active Directory 中的一个条目,带有加密密钥,可让您的 Web 应用程序解码身份验证请求。

使用 NTLM,您不需要管理员的配合。 您的 Web 应用程序将从客户端(即浏览器)获取一些信息,可用于尝试登录域控制器。 来自客户端的信息不包括用户的密码——这太不安全了。 相反,NTLM 筛选器从域控制器获取质询,并将其传递给客户端。 客户端使用质询对密码进行哈希处理以创建响应。 当此响应作为登录请求发送回域控制器时,域控制器将告诉 jcifs 过滤器密码是否正确。

某些 jcifs 类具有 getPassword 方法,因为它允许您直接根据用户名和密码创建登录请求。 如果您使用这种方法,那么除了设置密码之外,您还可以检索它。 但这不是让浏览器为您进行身份验证时使用的方法,因此您将无法检索实际密码。

There is a difference.

With Kerberos, you will have to ask your domain administrator for a Service Principal Name (SPN) for your web app. Essentially this is an entry in the Active Directory with a cryptographic key that will let your web app decode authentication requests.

With NTLM, you don't need the cooperation of your administrator. Your web app will get some information from the client (ie. browser) that it can use to attempt a logon to a domain controller. The information from the client doesn't include the user's password - that would be too insecure. Instead, the NTLM filter gets a challenge from the domain controller, passes it to the client. The client hashes the password with the challenge to create a response. When this response is sent back to the domain controller as a logon request, the domain controller will tell the jcifs filter whether the password was correct or not.

Some jcifs classes have a getPassword method, because it allows you to create the logon request from a username and password directly. If you use that approach, then as well as setting the password you can retrieve it. But this isn't the approach used when you let the browser authenticate for you, so you won't be able to retrieve the actual password.

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