🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #474

Re: Servlet security with database access

#474
From: Sachin Hamirwasia
Date: Tue, 18 Jan 2000 00:00
37 lines
1926 bytes
Please get back to me if you ever manage to download the .class file of
a servlet (kept in the servlet directory of the web-server) from a
browser. 

You cannot!

But since you insist, here is another solution: you can store the
username/passsword in a text file, which is kept in some path not
accessible via the web server but readable by the servlet (in Unix you
ought to take care of this). 

Cheers, 
Sachin

eherebonus@my-deja.com wrote:
> 
> I am using Apache Jserv for servlet engine, my servlet will access
> databases on the web server, so I have to program the database login
> and password into the servlet! The problem: is this secure? Since the
> servlet directory has to be readable and execuable, some strangers can
> just get the servlet class, decompile it, and get the login/password
> for my database?
> 
> Any response will be appreciated.
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.

-- 
+----------------------------------------------------+
                    Sachin Hamirwasia 
               Hall 9, Room #45-1-849, NTU 
             Nanyang Avenue,  SINGAPORE 639798
                  Phone: 7927605(Room)

Email : sachinh@singnet.com.sg
Web site : http://www.singnet.com.sg/~sachinh
Technical Details
Message-ID: <38841B95.F2CE582A@Singnet.com.sg>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8608ne$2ii$1@nnrp1.deja.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 115238,da65d672b0892627
X-Google-Attributes: gid115238,public
X-Google-Thread: 10a146,da65d672b0892627
X-Google-Attributes: gid10a146,public
From: Sachin Hamirwasia <SachinH@Singnet.com.sg>
Subject: Re: Servlet security with database access
Date: 2000/01/18
Message-ID: <38841B95.F2CE582A@Singnet.com.sg>
X-Deja-AN: 574132638
Content-Transfer-Encoding: 7bit
References: <8608ne$2ii$1@nnrp1.deja.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Sun Microsystems
Mime-Version: 1.0
Newsgroups: comp.lang.java.programmer,borland.public.jbuilder.servlet