Package org.jets3t.servlets.gatekeeper
Class GatekeeperServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.jets3t.servlets.gatekeeper.GatekeeperServlet
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class GatekeeperServlet
extends javax.servlet.http.HttpServlet
A servlet implementation of an S3 Gatekeeper, as described in the document
Gatekeeper Concepts.
This servlet offers an easily configurable and extensible approach, where key steps in the authorization and signature generation process are performed by pluggable interfaces:
TransactionIdProvider: Generate a transaction ID to uniquely identify a request/response transactionAuthorizer: Allow or deny specific requested operationsUrlSigner: Generate signed URLs for each operation that has been allowed by the Authorizer
These pluggable interfaces are configured in the servlet's configuration file, or if left unconfigured the default JetS3t implementations are used.
For more information about this servlet please refer to: JetS3t Gatekeeper
- Author:
- James Murty
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Sends a simple HTML page in response to GET requests, indicating that the servlet is running.voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Handles POST requests that contain Gatekeeper messages encoded as POST form properties, and sends a plain text response document containing the Gatekeeper response message encoded as a properties file.voidinit(javax.servlet.ServletConfig servletConfig) Initialises the pluggable implementation classes forAuthorizer,TransactionIdProvider, andUrlSignerMethods inherited from class javax.servlet.http.HttpServlet
serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
GatekeeperServlet
public GatekeeperServlet()
-
-
Method Details
-
init
public void init(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException Initialises the pluggable implementation classes forAuthorizer,TransactionIdProvider, andUrlSigner- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException Sends a simple HTML page in response to GET requests, indicating that the servlet is running.- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException Handles POST requests that contain Gatekeeper messages encoded as POST form properties, and sends a plain text response document containing the Gatekeeper response message encoded as a properties file.- Throws:
javax.servlet.ServletExceptionIOException
-