-
There is no easy way to add support for setting (overriding) remote IP address for
IOService
(base ofXMPPIOServer
andWebSocketXMPPIOService
.In theory you could modify
WebSocketXMPPIOService
to return different IP as a result ofgetRemoteAddress()
method after WebSocket headers are processed. You could also get header value fromheaders
variable inWebSocketXMPPIOService:: processWebSocketHandshake()
method as we parse all HTTP headers.Also
WebSocketClientConnectionManager:: getXMPPIOServiceInstance()
method returns instance ofWebSocketXMPPIOService
so it would be possible to override it and return a custom class extendingWebSocketXMPPIOService
. -
Hi Andrzej
Nice to see you around.
Thats aligned with our own thoughts.Grabbing the value of the header on the handshake and making available to the rest of rhe server through "getRemoteAddress".
We have still a doubt on how to make those overriden classes available at the classpath. Should we fork the Tigase repository or is there any more covinient way to inject those classes in the classpath?
Best regards,
Rafael
Type |
Question
|
Priority |
Major
|
Assignee | |
Version |
7.X , 8.1.0
|
Sprints |
n/a
|
Customer |
n/a
|
Issue Votes (0)
Dear Tigase support team
We have a great interest in placing Tigase behind an application LB. We face the problem that the IP reaching Tigase is not the one of the client, and we also have great interest in knowing the IP of the client so we can implement some security ideas.
Based on this, I have a few questions:
WebSocketXMPPIOService
) so it can process the XFF header and make it available in the session context for other components later?Please note that we are in the process of migration to 8.1.0, but we are currently in the latest 7.X version ... so we would like answers for both versions in case there are differences in this matter.
Best regards,
Rafael.