fedora.server.management
Class BESecurityServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by fedora.server.management.BESecurityServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class BESecurityServlet
extends javax.servlet.http.HttpServlet

Servlet for editing the config/beSecurity.xml file in a user-friendly way. A GET request will present an HTML form populated with existing values in beSecurity.xml and non-configured values for all other bMechs and methods that exist in the repository at the time of the request. A POST request will save the results of the form submission over the existing config/beSecurity.xml file, cause an automatic reload of the policies, then describe to the user how/why they may change the servlet password database to reflect the changes.

Author:
cwilper@cs.cornell.edu
See Also:
Serialized Form

Constructor Summary
BESecurityServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Respond to an HTTP GET request.
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Respond to an HTTP POST request.
 void init()
          Initialize the servlet by getting a reference to the required modules of the running Fedora instance and making sure the beSecurity.xml and stylesheet files exist.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BESecurityServlet

public BESecurityServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse res)
           throws javax.servlet.ServletException
Respond to an HTTP GET request. Displays an html form for editing backend security configuration, or an xml document providing enough information to construct the form (if xml=true).

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse res)
            throws javax.servlet.ServletException
Respond to an HTTP POST request. This will overwrite the existing config/beSecurity.xml file based on the parameters passed in, re-generate the policies, then inform the user of what needs to be done to tomcat-users_fedoraTemplate.xml.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException

init

public void init()
          throws javax.servlet.ServletException
Initialize the servlet by getting a reference to the required modules of the running Fedora instance and making sure the beSecurity.xml and stylesheet files exist.

Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException