Is there a way to identify sender on RPC call

  • pmunsey

    pmunsey - 2012-03-09

    I am wanting to identify the sender/caller of an RPC call in order to validate
    (with my DB) if the sender is permitted to receive the response. I can pass
    the caller's IP address as a parameter (which could be spoofed), but would
    prefer to have JGroups provide me with the sender's identification.

  • Bela Ban

    Bela Ban - 2012-03-10

    You can pass the sender's address (a UUID) as argument, e.g.

    JChannel ch;
    Address my_addr=ch.getAddress(); // a UUID
    ch.callRemotemethods("foo", ..., new Class[]{Address.class}, new Object[]{my_addr}, ...);
    public void foo(Address sender, ...) {
       // check if sender is allowed to make the invocation on foo()
  • Bela Ban

    Bela Ban - 2012-03-10

    You could also pass a hashed password to prevent spoofing of the address


Log in to post a comment.