Class BaseKerberosAuthenticationFilter

    • Constructor Detail

      • BaseKerberosAuthenticationFilter

        public BaseKerberosAuthenticationFilter()
    • Method Detail

      • setPassword

        public void setPassword​(java.lang.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​(java.lang.String realm)
        Sets the HTTP service account realm.
        Parameters:
        realm - the realm to set
      • setJaasConfigEntryName

        public void setJaasConfigEntryName​(java.lang.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
      • authenticateRequest

        public boolean authenticateRequest​(javax.servlet.ServletContext context,
                                           javax.servlet.http.HttpServletRequest req,
                                           javax.servlet.http.HttpServletResponse resp)
                                    throws java.io.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:
        java.io.IOException
        javax.servlet.ServletException
      • checkLoginPage

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

        public void handle​(javax.security.auth.callback.Callback[] callbacks)
                    throws java.io.IOException,
                           javax.security.auth.callback.UnsupportedCallbackException
        JAAS callback handler
        Specified by:
        handle in interface javax.security.auth.callback.CallbackHandler
        Parameters:
        callbacks - Callback[]
        Throws:
        java.io.IOException
        javax.security.auth.callback.UnsupportedCallbackException
      • restartLoginChallenge

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

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