rsocket / rsocket-java

Java implementation of RSocket
http://rsocket.io
Apache License 2.0
2.35k stars 354 forks source link

Please expose WebsocketConnection headers for auditing/security #1112

Open bas-velthuizen opened 1 month ago

bas-velthuizen commented 1 month ago

Our application needs to be able to store the client address of a client in a database for any auditable action. When those actions are initiated via an RSocket request, there is no possibility to retrieve the client IP via normal actions.

Of course there are some dirty ways around, like using reflection to expose the connection fields of the RSocket server or the Requester, but this feels like hacking, and reverting the field exposition results in access errors.

(I'm at this moment using the solution in issue #831, which works, but feels hacky)

Can the connection fields or just the headers be exposed in the RSocket and Requester classes instead of keeping them protected?

We're using RSocket 1.1.3 via Spring Boot 3.3.1