Class MyProxyServlet

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.core.Logable, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.oa4mp.delegation.common.servlet.TransactionFilter
    Direct Known Subclasses:
    ACS2, AuthorizedServlet

    public abstract class MyProxyServlet
    extends OA4MPServlet
    This is the super class of the servlet that is supposed to retrieve a cert. This happens at different times in different protocols. This will retrieve the cert and assumes that there is an MyProxyConnectable that has been found and is cached. This will close the connection at the end of the request. If the client should get a limited proxy, that will be done here as well.
    Finally, if the DN from the cert is to be returned as the username in the final call to the service, that will be set here.

    Created by Jeff Gaynor
    on 2/6/14 at 11:30 AM

    See Also:
    Serialized Form
    • Field Detail

      • myproxyConnectionCache

        public static edu.uiuc.ncsa.security.core.cache.Cache myproxyConnectionCache
      • myproxyConnectionCleanup

        public static edu.uiuc.ncsa.security.core.cache.Cleanup<edu.uiuc.ncsa.security.core.Identifier,​edu.uiuc.ncsa.security.core.cache.CachedObject> myproxyConnectionCleanup
    • Constructor Detail

      • MyProxyServlet

        public MyProxyServlet()
    • Method Detail

      • doRealCertRequest

        protected abstract void doRealCertRequest​(ServiceTransaction trans,
                                                  String statusString)
                                           throws Throwable
        Indirection call. If your extension to this class needs to do any prep work before calling doCertRequest(ServiceTransaction, String) put it here. And this should contain the actual call to that method. This is called in the authorization leg and the getCert call. You should point this at the doCertRequest(ServiceTransaction, String) method here which does all the dirty work of tracking down the connection and getting the cert. So, depending on your protocol you will have only one of two places where this is fully implemented.
        Throws:
        Throwable
      • getAccessToken

        protected abstract org.oa4mp.delegation.common.token.AccessToken getAccessToken​(javax.servlet.http.HttpServletRequest request)
        There are various requirements for transmitting the access token, so specific methods have to be used.
        Parameters:
        request -
        Returns:
      • getMyproxyConnectionCache

        public static edu.uiuc.ncsa.security.core.cache.Cache getMyproxyConnectionCache()
      • hasMPConnection

        protected boolean hasMPConnection​(edu.uiuc.ncsa.security.core.Identifier identifier)
      • getMPConnection

        protected MyProxyConnectable getMPConnection​(edu.uiuc.ncsa.security.core.Identifier identifier)
      • getX509Certificates

        protected LinkedList<X509Certificate> getX509Certificates​(ServiceTransaction transaction,
                                                                  edu.uiuc.ncsa.security.util.crypto.MyPKCS10CertRequest localCertRequest,
                                                                  String statusString)
        Loops through the facade looking for the active connection and calls it.
        Parameters:
        transaction -
        localCertRequest -
        statusString -
        Returns:
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class OA4MPServlet