Interface DelegateServletRequest

All Superinterfaces:
jakarta.servlet.ServletRequest

public interface DelegateServletRequest extends jakarta.servlet.ServletRequest
The default installation of Internet Explorer and Active Directory allow the user's/requester's credential to be delegated.

By default, SpnegoHttpURLConnection has delegation set to false. To allow delegation, call the requestCredDeleg method on the SpnegoHttpURLConnection instance.

Also, the server/service's pre-authentication account must be specified as "Account is trusted for delegation" in Active Directory.

Finally, the server/service's spnego servlet init params must be specified to allow credential delegation by setting the property spnego.allow.delegation to true (false by default).

Custom client programs may request their credential to be delegated by calling the requestCredDeleg on their instance of GSSContext.

Java Application Servers can obtain the delegated credential by casting the HTTP request.

Example usage:

     if (request instanceof DelegateServletRequest) {
         DelegateServletRequest dsr = (DelegateServletRequest) request;
         GSSCredential creds = dsr.getDelegatedCredential();
         ...
     }
 

To see a working example and instructions, take a look at the credential delegation example.

Author:
Darwin V. Felix
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the requester's delegated credential.

    Methods inherited from interface jakarta.servlet.ServletRequest

    getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
  • Method Details

    • getDelegatedCredential

      GSSCredential getDelegatedCredential()
      Returns the requester's delegated credential.

      Returns null if request has no delegated credential or if delegated credentials are not supported.

      Returns:
      delegated credential or null