Java security socket permission

Anish kumar anish_8617 at rediffmail.com
Thu Aug 3 16:48:36 UTC 2017


Hi,Greeting!I'm working on the Java security and enabled security manager with the custom grant policy file.I'm facing issue related to socket permission. My application is listening to localhost on the port '3333', for which listen socket permission is granted in the policy file. For this port I created ServerSocket by giving argument Inet4Address.getLocalHost(). But when my client running on different node trying to send packets to my application on the port '3333' it throws connection reset exception.And the server side when it's trying to accept on the socket throws security check exception capturing client IP with the port and the action is (connect, resolve).java.security.AccessControlException: access denied ("java.net.SocketPermission" "XX.XXX.XXX.10:52610" "accept,resolve")Server IP - XX.XXX.XXX.11Client IP - XX.XXX.XXX.10I can't add client IP and port in the grant policy file at the server side because the port range varies and also may be some other client can try to send packet to the server on the port '3333'.Could please provide me some inputs on the same, also how it can be handled in the case of web server i.e. Tomact.Thanks & Regards,Anish Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20170803/e60d7d37/attachment.htm>


More information about the security-dev mailing list