Hugo Sousa
Hugo Sousa

Reputation: 916

How to know which client invoke RMI method on the server

I'm developing a system using Java RMI. I've several RMI clients and one RMI server. My system is supposed to be Byzantine Fault Tolerant, so the clients can be malicious (not only crash-stop).

In that sense, I should be able to recognize in the server when a client is invoking duplicated or trying to invoking methods using other clients information (to trap de server and the majority voting). To solve that, I'm using a public/private key shared by client and server. Each client has a unique key to generate and hash and the server will verify the hash. Now, I need to know in the server side which client invoke the method to know which key I should use to verify data.

Is possible to know, on the server, which server are invoking the methods?

Regards and thank you, Hugo

Upvotes: 1

Views: 1230

Answers (2)

user207421
user207421

Reputation: 310850

Use the result of RemoteServer.getClientHost().

Upvotes: 2

Thihara
Thihara

Reputation: 6969

I think the RemoteServer has a method to get the client IP address when someone is invoking a method.

If the IP is sufficient you can look into that.

Upvotes: 0

Related Questions