
Corporate.Net
internetRx
Q:
We have developed a Java applet that is downloaded from an Internet server to a browser. The applet transfers data from the server to the browser on a regular basis. It works well when the browser accesses the server via a transparent firewall, but has problems when connecting via an application-level proxy server. Do these problems have anything to do with the Java security model?
A:
No. Let's review what happens when an applet is downloaded and runs within the local machine.
There are certain environments in which you may encounter problems. As you know, your browser communicates with the proxy server on TCP Port 80 for HTTP requests. At this stage, the HTTP request identifies the remote host to contact via a host name. The proxy server then resolves this host name to an IP address and sends out a new request to the desired host.
The only computer your browser talks to directly
is the proxy server. This works for all applications that are using HTTP as the transport protocol to talk between browser and server. Problems arise, however, when a Java applet or other application tries to communicate with an external host using a protocol or service that is not programmed into the proxy server. In this type of situation, the only way to get from the inside network to the Internet is via the proxy server, which leaves you one of two options.
Either the applet must use HTTP requests to contact the Internet host, or the proxy server needs a proxy service for the protocol that the applet uses to communicate with the Internet host. Neither of these options is particularly attractive.
Wrapping all of the applet requests in HTTP affects browser performance for server communication, but programming proxy services into the proxy server is no simple task. Here is one of the drawbacks of using an application-level proxy; it works fine for common services like FTP,
HTTP and telnet, but anythi
ng else requires additional work or some compromises.
As far as the Java security model is concerned, there is no issue with the proxy environment. The Java security model restricts an applet to establish a network connection only with the host it was downloaded from. In the proxy environment, all communication works via the proxy.
As far as the browser is concerned, the applet is downloaded from the proxy server. As long as the Java applet uses HTTP as its transport protocol, it, too, will be contacting the proxy server for communication with Internet hosts.
In this mode, the Java security manager sees that the applet is contacting the host from which it was downloaded and lets the conversation continue.
Chris Lewis is vice president of international operations at ILX Systems. He is currently working in Europe. He can be reached at chrisl@ilx.com.

Internal Search Engines Get You Where You Want to Go
By Barry Nance
Web caches In With Proxy Servers
By Christopher Smith
Updated October 8, 1997
 |