自定义Windows身份验证程序包 [英] Custom Windows Authentication Package

查看:160
本文介绍了自定义Windows身份验证程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,这是场景.我正在Windows 7中开发登录系统.我创建了一个凭据提供程序,其中包含一个凭据.凭据具有三个输入字段,即用户名,密码和PIN.

So, here is the scenario. I am developing a logon system in windows 7. I have created a Credential Provider, containing one Credential. The Credential has three input fields, username, password, and PIN.

据我了解到的文档(CMIIW),当我们填写字段并单击登录时,WINLOGON将检索用户名和密码,并通过调用LSALogonUser()将其发送给LSA进行身份验证.然后,LSA将尝试与身份验证程序包KERBEROS(用于远程登录)或MSV1_0(用于本地登录)进行协商.

From what I have learned the documentation (CMIIW) is that when we fill in the fields and click logon, WINLOGON will retrieve the username and password, and send it to LSA by calling LSALogonUser() to authenticate. LSA then will try negotiate with Authentication Package KERBEROS (for remote logon) or MSV1_0 (for local logon).

现在仅假设本地方案,用户名和密码将传递到MSV1_0,并与SAM数据库中的用户名和密码进行检查.现在的事情是,我不想使用SAM数据库对其进行检查.假设我有一个文件C:\ users.txt,其中包含作为三胞胎的条目:{username;密码 ;别针}.这里的所有用户名都是Windows中的现有用户.如何使身份验证按照我的方式进行(检查文件C:\ users.txt.

Assume only the local scenario for now, the username and password will be passed to MSV1_0, and be checked with those in SAM database. Now the thing is, I don't want it to be checked with SAM database. Lets say I have a file C:\users.txt which contains entries as triplets: {username ; password ; PIN}. All the username here is an existing user in windows. How do I make it so that the authentication is following my way (checking the file C:\users.txt.

如果我没记错的话,我们可以创建自己的身份验证程序包,以包装" MSV1_0.你们有一个示例代码吗?还是还有另一种更合适的方法?

If I'm not mistaken, we can create our own Authentication Package that 'wraps' the MSV1_0. Do you guys have a sample code for that? Or is there another more appropriate way?

谢谢,非常感谢您的帮助.

Thank you, I appreciate your helps very much.

推荐答案

您可以尝试Windows sdk中的示例.有一些子身份验证软件包比完整的AP更易于实现.

You could try samples from windows sdk. There are sub authentication packages which are simpler to implement than full AP.

这篇关于自定义Windows身份验证程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆