I am no security expert, but do know some concepts.
We have a web application which currently uses Java Applets to do some operations on files in Client's File system (Browse, create, upload and download). Since Java applet support is being removed. We are planning to go for client side websocket server. Which will be installed on client side when first time such operation is being attempted.
I am concerned about the security of such system. Basically we will have 3 entities involved.
- Client Websocket server (aka LocalServer)
Some points I am considering:
- Plugin should only accept connections from localhost
- Authentication Logic
- WebServer will send some Unique Identification Key to Browser
- Browser will send the same to LocalServer
- LocalServer will forward the same to WebServer for authentication.
- It will accept connection from browser only if authenticated by WebServer.
An important point is that data theft should not happen when the Browser visits a Malicious page. Basically LocalServer should only connect to WebServer's page's websockets.
What Additional points do I have to consider for hardening this?
If possible inform other points of consideration for this system.
Update 1: LocalServer: Can upload, download files from the specific WebServer only.