Class 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 transaction
    • Authorizer: Allow or deny specific requested operations
    • UrlSigner: 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:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doGet​(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.
      void doPost​(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.
      void init​(javax.servlet.ServletConfig servletConfig)
      Initialises the pluggable implementation classes for Authorizer, TransactionIdProvider, and UrlSigner
      • Methods inherited from class javax.servlet.http.HttpServlet

        service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
    • Constructor Detail

      • GatekeeperServlet

        public GatekeeperServlet()
    • Method Detail

      • init

        public void init​(javax.servlet.ServletConfig servletConfig)
                  throws javax.servlet.ServletException
        Initialises the pluggable implementation classes for Authorizer, TransactionIdProvider, and UrlSigner
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class javax.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.ServletException
        IOException
      • 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.ServletException
        IOException