The Subject created on the client is not what is propagated. Read the JAAS Howto topic in this forum to understand the security context propagation. If you want this info it would have to be attached using a custom login module on the server side.
But it implies that I have to have client?s IP address on the server, which is what exactly I am trying to achieve by propagating this IpPrincipal. So, it seems like adding a new Principal is not going to work for me. Do you know any other way how I can get client?s IP address on server?
Thanks in advance
By adding a callback (like a TextInputCallback) in the client to add the ip address and by having a custom login module on the server to understand this extra callback and add it to the subject, you should be able to achieve what you need.
The client ip can be passed in using a custom interceptor in the client proxy.