Class UrlSigner

java.lang.Object
org.jets3t.servlets.gatekeeper.UrlSigner
Direct Known Subclasses:
DefaultUrlSigner

public abstract class UrlSigner extends Object
Provides signed URLs that will allow a client to perform the operation requested on a specific object in S3.

This sign methods in this class are not called for a signature request unless that request has already been allowed by the Authorizer.

Implementations of this class need only generate the appropriate signed URL. However, more advanced implementations may do other work such as renaming objects to comply with naming rules for an S3 account.

Author:
James Murty
  • Constructor Details

    • UrlSigner

      public UrlSigner(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException
      Constructs a UrlSigner with the following required properties from the servlet configuration:
      Parameters:
      servletConfig -
      Throws:
      javax.servlet.ServletException
  • Method Details

    • signGet

      public abstract String signGet(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
      Generate a signed GET URL for the signature request.
      Parameters:
      requestMessage - the request message received from the client.
      clientInformation - information about the client's end-point, and any Session or Principal associated with the client.
      signatureRequest - a pre-approved signature request.
      Returns:
      a signed URL string that will allow the operation specified in the signature request on the object specified in the signature request.
      Throws:
      S3ServiceException
    • signHead

      public abstract String signHead(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
      Generate a signed HEAD URL for the signature request.
      Parameters:
      requestMessage - the request message received from the client.
      clientInformation - information about the client's end-point, and any Session or Principal associated with the client.
      signatureRequest - a pre-approved signature request.
      Returns:
      a signed URL string that will allow the operation specified in the signature request on the object specified in the signature request.
      Throws:
      S3ServiceException
    • signPut

      public abstract String signPut(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
      Generate a signed PUT URL for the signature request.
      Parameters:
      requestMessage - the request message received from the client.
      clientInformation - information about the client's end-point, and any Session or Principal associated with the client.
      signatureRequest - a pre-approved signature request.
      Returns:
      a signed URL string that will allow the operation specified in the signature request on the object specified in the signature request.
      Throws:
      S3ServiceException
    • signDelete

      public abstract String signDelete(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
      Generate a signed DELETE URL for the signature request.
      Parameters:
      requestMessage - the request message received from the client.
      clientInformation - information about the client's end-point, and any Session or Principal associated with the client.
      signatureRequest - a pre-approved signature request.
      Returns:
      a signed URL string that will allow the operation specified in the signature request on the object specified in the signature request.
      Throws:
      S3ServiceException
    • signGetAcl

      public abstract String signGetAcl(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
      Generate a signed GET URL for an ACL-based signature request.
      Parameters:
      requestMessage - the request message received from the client.
      clientInformation - information about the client's end-point, and any Session or Principal associated with the client.
      signatureRequest - a pre-approved signature request.
      Returns:
      a signed URL string that will allow the operation specified in the signature request on the object specified in the signature request.
      Throws:
      S3ServiceException
    • signPutAcl

      public abstract String signPutAcl(GatekeeperMessage requestMessage, ClientInformation clientInformation, SignatureRequest signatureRequest) throws S3ServiceException
      Generate a signed PUT URL for an ACL-based signature request.
      Parameters:
      requestMessage - the request message received from the client.
      clientInformation - information about the client's end-point, and any Session or Principal associated with the client.
      signatureRequest - a pre-approved signature request.
      Returns:
      a signed URL string that will allow the operation specified in the signature request on the object specified in the signature request.
      Throws:
      S3ServiceException