Re: Is it bad to connect to a database via an applet?
jmDesktop wrote:
On May 15, 11:06 pm, Arne VajhHj <a...@vajhoej.dk> wrote:
The only half safe way is to have end user specific accounts on the
database.
Is that middleware piece a "servlet"?
I was kinda confused by Arne first comment too, but "user specific
accounts" in his second reply makes it plain what he is getting at here.
If your applet or JWS program can access a database, so can anyone else.
Your database is "bare" on the 'net and anyone at all can connect to
it anytime he or she wants. It's a security hole.
So, with that in mind: servlets can be one way to implement the
protection needed on your server to prevent unauthorized access your
database.
However, especially in the case of JWS, the answer might even be
"probably not" with respect to using servlets as middleware. Certainly
it possible to write your own protection layer in Java, deamonize it,
and then let it listen for connections and provide the level of security
desired.
Servlets do have some built-in advantages. The networking code is done
for you already. Port 80 is almost always allowed on client system.
And SSL provides encryption, which will be necessary for any real form
of security. But using servlets should be weight against all other
options. It's not a given and definitely not the only choice.
Well I hope this was at least partly clear....