In the backend I am currently working on I have a servlet (call it S) and a WebSocket endpoint (call it E). S needs to communicate with E, yet, as of now, any WebSocket client may connect to E.
My question is: how should I name the URI of E and how can I enforce that only S is allowed to communicate with E (if that is possible in the first place).
(I am interested in any answer, approximated or exact.)