如何清除 AuthzGetInformationFromContext API 使用的缓存?
我有一个域,我在客户端计算机上使用 AuthzGetInformationFromContext API 来检索用户所属组的 sid。
效果很好。但是,如果我将用户添加到某个组或将其从域控制器上的某个组中删除,此 API 仍将显示旧的组列表。在这种情况下,如果我等待 10 分钟或更长时间,它将显示更新的组列表。
我尝试在不同的计算机上执行此操作,发现应用程序将在不同的时间显示更新的组列表。因此,它不是域控制器缓存。
此外,我的应用程序退出并再次启动。因此,它也不是应用程序级缓存。
因此,我相信存在一些用于组成员资格的计算机级缓存(通过此 API 检索)。
有谁知道如何以编程方式清除此缓存或更改某些设置以将这 10 分钟间隔缩短到更短的时间。
I have a domain and I use AuthzGetInformationFromContext API on the client machine to retrieve sid of the groups to which a user belongs.
It works fine. However, if I add the user to some group or remove him from some group on domain controller, this API will still show old list of groups. In the case, if i will wait 10 minutes or more, it will show updated list of groups.
I tried to do this on different computers and saw that the application will show updated list of groups at a different time. So, it's not a domain controller cache.
Also, my applications exits and starts again. So, it's not application level cache either.
So, I believe there is some computer level cache for group membership (retrieved through this API).
Does anybody know how to clear this cache programmatically or change some settings to decrease this 10 minutes interval to something shorter.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 此帖子和Kerberos 身份验证问题 – 服务主体名称 (SPN) 问题 - 第 1 部分,您可以清除 Kerberos TGT(以及所有您的服务票证),使用诸如
klist purge
之类的工具(该工具存在于 Windows 7 上)。您必须在用户登录的计算机上本地运行该工具。您可以在Windows Platform SDK中找到Klist.exe的源码(我们的API是
LsaCallAuthenticationPackage
)Accordig to this post and Kerberos Authentication problems – Service Principal Name (SPN) issues - Part 1, You can purge the Kerberos TGT (and all your service tickets) using something like
klist purge
(The tool is present on Windows Seven). You have to run the tool locally on the machine the user is logged in to.You can find the source of Klist.exe in the Windows Platform SDK (the API in us is
LsaCallAuthenticationPackage
)