RE: Potential Security Flaw in Struts MVC

2001-05-07 Thread Manabendra Sarkar

but if i use external security mechanism, will it be dynamic? i mean to say,
if the admin wants to change his/her password from the application
(using admin interface), how can he/she do that without restarting the
server? 

 -Original Message-
 From: Martin Duffy [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, May 07, 2001 5:57 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Potential Security Flaw in Struts MVC
 
 A basic problem with most web development is that people are building
 security into their applications. It should be handled outside of the
 application. You can have your application work in conjunction with an
 external security mechanism for more granular control but I the security
 mechanism should be external to the application for the most part.
  
 You could use for example one of the authorization and access modules for
 apache. Then when you create your application you can create specific
 *protected* URLs for say an admin area. Then only the person that is
 logged into the security mechanism with the proper *authorization*  can
 access that URL (or one that contains that URL and parameters being passed
 to it in the URL). Security needs to be considered when building the
 applications but trying to build it into the application is a big mistake.
 
  
 A big reason to not build it into the app is that as your security
 requirements change you invariably have to make code changes to your
 application. By using an external mechanism you just change the rules
 governing the authorization and access control usually without any code
 changes to your app.
  
  
  
  
 
   - Original Message - 
   From: Jeff Trent mailto:[EMAIL PROTECTED] 
   To: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
   Sent: Monday, May 07, 2001 6:37 PM
   Subject: Potential Security Flaw in Struts MVC
 
   I may be wrong about this (only been working w/ Struts for a week
 now).  But I do see a potential security flaw in struts that I would like
 to hear from others regarding.

   Consider a simple set of struts classes that represent a user in a
 system. You would probably have classes that look something like this:
   User(the model representing the user)
   UserForm(an enrollment form for a new user)
   UserAction(Saves the UserForm information to db, etc)
   
   The User class would have accessors and modifiers like
 getFirstName(), setFirstName(), getAdministrativeUserFlag(),
 setAdministrativeUserFlag(), etc.  The basic implementation of the
 UserForm is to take the UI form data, introspect the beans, and call the
 correct modifier of the UserForm bean based on the fields contained within
 the UI submission/form.  A developer of course would not expose the
 Administrative User Flag option on the UI for enrollment (that would be
 found possibly in some other administrative-level module).  However, if
 someone is familiar with the db schema and the naming convention the
 developer used, that user could subvert the application by writing his own
 version of the UI which contains an Administrative User Flag field (or
 any other field for that matter) and the basic form processing in Struts
 will kindly honor the request and set the Administrative Flag on the
 user.  Unless, of course, the developer makes special provisions to
 prevent this behavior.  However, its not entirely obvious to the struts
 user (in my opinion) that this is even a concern.  Am I making sense here?

   - jeff

 



regd. action classes --- please help

2001-05-04 Thread Manabendra Sarkar

Hi All,
  is there init() and destroy() like methods in Action class so that we
can be sure that those methods will always be called
by the action servlet?
  actually i need to aquire some resources (like database connection)
and initialize the action class. i want to hold thoise resources
through out the life of the action object. i want to release those resources
only when i don't need the action object anymore.   
 please help me in doing this. any other procedure to do this except
init()  destroy() ? 


Regards

Manabendra Sarkar




RE: New to struts

2001-05-03 Thread Manabendra Sarkar

Hi,
u copy the struts-example.war to tomcat\webapps and then type the url
localhost:8080\struts-example. u should get a pge which is the home page for
the 
example application that comes with the struts

thanx

manabendra

 -Original Message-
 From: Geoffrey Van Nuffelen [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, May 03, 2001 3:25 PM
 To:   Struts-User (E-Mail)
 Subject:  New to struts
 
 Hi,
 
 I am new to struts.
 I did the download of the release of strust (1.0b1).
 
 I use winzip, and now I have a directories structure. 
 
 But where to begin ?  What I have to do to create a new application ?
 
 Thanks 
 geoffrey...
 



RE: using advance databse connection manager

2001-05-02 Thread Manabendra Sarkar

i m a new struts user. i want to instantitiate my ConnectionManager at the
start up
of Tomcat 3.2.1. i saw there is a way to do that for the default conection
manager '
by adding some entry in struts-config.xml. how can i instantitiate my own
ConnectionManager
class at start up and put the object in servlet context so that it can be
shared accross the application?
please advice.

 -Original Message-
 From: Ted Husted [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, April 30, 2001 6:44 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: using advance databse connection manager
 
 The Struts connection pool is wholly optional. You can just ignore it,
 and use any connection manager you like, in the same was as you would
 for any  Web application.
 
 Manabendra Sarkar wrote:
   How can i use my won database connection manager in struts, instead
 of
  using
  org.apache.struts.util.GenericDataSource?
  regards
  Manu



new to struts

2001-05-02 Thread Manabendra Sarkar

Hi All,
   i m new to struts. i am facing a small problem. im trying to use
GenericDatasource to connect to the database.
this class implements javax.sql.DataSource. when i strsrt tomcat, it gives
an error saying javax.sql.DataSource not found.
i am using jdk1.2.2. can anyone pls help me in finding where is
javax.sql.DataSource class located?


Regards

Manabendra Sarkar