RPC Authentication

大憨熊 提交于 2019-12-11 03:14:29

问题


I'm working on communicating data on local machine using Remote Procedure Calls ( RPC ). My requirement is use RPC to communicate data between two processed, but server should authenticate client by some means.

I came across RpcBindingSetAuthInfo which set authentication and authorization information. The fourth parameter is authentication service which can be anything from http://msdn.microsoft.com/en-us/library/windows/desktop/aa373556(v=vs.85).aspx

WINNT authentication is not applicable in my case since client does not run under any particular user. Looking at the documentation, I don't understand which authentication service would be applicable in my case. I need some way to authenticate the client based on some token etc. It would be great if someone could shed some light/ give some pointers of RPC authentication.

Thanks,


回答1:


Yes token generation is what we use in our product as well . For e.g when the client requests to connect to the server , after authentication the server generates a unique id which it sends to the client . Now the client creates an instance of the server interface and which returns a pointer on which all the further communication can take place . When the client disconnects , the server unregisters or removes the unique id from its list of client's connected



来源:https://stackoverflow.com/questions/23445354/rpc-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!