Archived
This forum has been archived. Please start a new discussion on GitHub.
a problem of using SSLPermissionsVerifier
in Help Center
Hello.
I am studying Glacier2->Access Control. My program tool is Microsoft VS 2005. I modify the code in demo chat.
When I try SSLPermissionsVerifier,Firstly,in client I create a session with the router like this:
My problem is how the authorize function decide which client to accept. I try to write simple code as follows:
Your answers will do me a good favor,thanks!
I am studying Glacier2->Access Control. My program tool is Microsoft VS 2005. I modify the code in demo chat.
When I try SSLPermissionsVerifier,Firstly,in client I create a session with the router like this:
session = ChatSessionPrx::uncheckedCast(_router->createSessionFromSecureConnection());Secondly I config the Glacier2 like this:
Glacier2.SSLPermissionsVerifier=verifier:tcp -h 127.0.0.1 -p 10002Thirdly,the verifer uses SSLPermissionsVerifierI::authorize function to decide the router whether to accept the connection of client.
My problem is how the authorize function decide which client to accept. I try to write simple code as follows:
bool SSLPermissionsVerifierI::authorize(const Glacier2::SSLInfo& info , std::string& reason, const Ice::Current&) const { if (info.localHost == "192.168.102.65") { cout << "you are permitted!" << endl; return true; } else { reason = "you are not authorized!"; return false; } }Is that right? Does the client needs to install a Certificate? If so ,then how to install?
Your answers will do me a good favor,thanks!
0
Comments
-
I'm afraid explaining all the intricacies of SSL is beyond the scope of the free support that we provide on this form.
You only want to install an SSL permissions verified if you want to look at the clients credentials to determine authorization. Looking at the clients ip address isn't very useful!0