Class BaseKerberosAuthenticationFilter

All Implemented Interfaces:
CallbackHandler, ActivateableBean, DependencyInjectedFilter, AuthenticationDriver, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
KerberosAuthenticationFilter, KerberosAuthenticationFilter

public abstract class BaseKerberosAuthenticationFilter extends BaseSSOAuthenticationFilter implements CallbackHandler
Base class with common code and initialisation for Kerberos authentication filters.
Author:
gkspencer
  • Constructor Details

    • BaseKerberosAuthenticationFilter

      public BaseKerberosAuthenticationFilter()
  • Method Details

    • setPassword

      public void setPassword(String password)
      Sets the HTTP service account password. (the Principal should be configured in java.login.config)
      Parameters:
      password - the password to set
    • setRealm

      public void setRealm(String realm)
      Sets the HTTP service account realm.
      Parameters:
      realm - the realm to set
    • setJaasConfigEntryName

      public void setJaasConfigEntryName(String jaasConfigEntryName)
      Sets the HTTP service login configuration entry name. The default is "AlfrescoHTTP".
      Parameters:
      jaasConfigEntryName - the jaasConfigEntryName to set
    • setStripKerberosUsernameSuffix

      public void setStripKerberosUsernameSuffix(boolean stripKerberosUsernameSuffix)
      Indicates whether the @domain suffix should be removed from Kerberos user IDs
      Parameters:
      stripKerberosUsernameSuffix - true if the @domain suffix should be removed from Kerberos user IDs
    • init

      protected void init() throws javax.servlet.ServletException
      Description copied from class: BaseSSOAuthenticationFilter
      Initializes the filter. Only called if the filter is active, as indicated by BaseSSOAuthenticationFilter.isActive(). Subclasses should override.
      Overrides:
      init in class BaseSSOAuthenticationFilter
      Throws:
      javax.servlet.ServletException
    • authenticateRequest

      public boolean authenticateRequest(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException, javax.servlet.ServletException
      Description copied from interface: AuthenticationDriver
      Authenticate user based on information in http request such as Authorization header or cached session information.
      Specified by:
      authenticateRequest in interface AuthenticationDriver
      Parameters:
      context - the context
      req - http request
      resp - http response
      Returns:
      true if authentication was successful
      Throws:
      IOException
      javax.servlet.ServletException
    • checkLoginPage

      protected boolean checkLoginPage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
    • handle

      public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
      JAAS callback handler
      Specified by:
      handle in interface CallbackHandler
      Parameters:
      callbacks - Callback[]
      Throws:
      IOException
      UnsupportedCallbackException
    • restartLoginChallenge

      public void restartLoginChallenge(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
      Restart the Kerberos logon process
      Specified by:
      restartLoginChallenge in interface AuthenticationDriver
      Parameters:
      context - ServletContext
      req - HttpServletRequest
      resp - HttpServletResponse
      Throws:
      IOException
    • logonStartAgain

      public void logonStartAgain(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
      The logon to start again
      Parameters:
      context - ServletContext
      req - HttpServletRequest
      resp - HttpServletResponse
      Throws:
      IOException