Package org.alfresco.repo.webdav.auth
Class BaseKerberosAuthenticationFilter
- java.lang.Object
-
- org.alfresco.repo.webdav.auth.BaseAuthenticationFilter
-
- org.alfresco.repo.webdav.auth.BaseSSOAuthenticationFilter
-
- org.alfresco.repo.webdav.auth.BaseKerberosAuthenticationFilter
-
- All Implemented Interfaces:
javax.security.auth.callback.CallbackHandler,org.alfresco.repo.management.subsystems.ActivateableBean,DependencyInjectedFilter,AuthenticationDriver,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
KerberosAuthenticationFilter,KerberosAuthenticationFilter
public abstract class BaseKerberosAuthenticationFilter extends BaseSSOAuthenticationFilter implements javax.security.auth.callback.CallbackHandler
Base class with common code and initialisation for Kerberos authentication filters.- Author:
- gkspencer
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.webdav.auth.BaseSSOAuthenticationFilter
loginPageLink, MIME_HTML_TEXT
-
Fields inherited from class org.alfresco.repo.webdav.auth.BaseAuthenticationFilter
ARG_TICKET, AUTHENTICATION_USER, authenticationComponent, authenticationListener, authenticationService, NO_AUTH_REQUIRED, nodeService, personService, remoteUserMapper, transactionService
-
Fields inherited from interface org.alfresco.repo.webdav.auth.AuthenticationDriver
AUTHENTICATION_USER
-
-
Constructor Summary
Constructors Constructor Description BaseKerberosAuthenticationFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauthenticateRequest(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)Authenticate user based on information in http request such as Authorization header or cached session information.protected booleancheckLoginPage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)voidhandle(javax.security.auth.callback.Callback[] callbacks)JAAS callback handlerprotected voidinit()Initializes the filter.voidlogonStartAgain(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)The logon to start againvoidrestartLoginChallenge(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)Restart the Kerberos logon processvoidsetJaasConfigEntryName(java.lang.String jaasConfigEntryName)Sets the HTTP service login configuration entry name.voidsetPassword(java.lang.String password)Sets the HTTP service account password.voidsetRealm(java.lang.String realm)Sets the HTTP service account realm.voidsetStripKerberosUsernameSuffix(boolean stripKerberosUsernameSuffix)Indicates whether the @domain suffix should be removed from Kerberos user IDs-
Methods inherited from class org.alfresco.repo.webdav.auth.BaseSSOAuthenticationFilter
afterPropertiesSet, allowsTicketLogons, checkForTicketParameter, doFilter, getLoginPage, getLoginPageLink, getSecurityConfigSection, getServerName, hasLoginPage, includeFallbackAuth, isActive, isFallbackEnabled, isNTLMSSPBlob, onLoginComplete, onValidate, onValidateFailed, performFallbackAuthentication, redirectToLoginPage, setActive, setFallback, setFallbackEnabled, setLoginPage, setLoginPageLink, setServerConfiguration, setTicketLogons, writeLoginPageLink
-
Methods inherited from class org.alfresco.repo.webdav.auth.BaseAuthenticationFilter
createUserEnvironment, createUserEnvironment, createUserObject, doInSystemTransaction, getLogger, getSessionUser, getUserAttributeName, handleLoginForm, invalidateSession, setAuthenticationComponent, setAuthenticationListener, setAuthenticationService, setNodeService, setPersonService, setRemoteUserMapper, setTransactionService, setUserAttributeName
-
-
-
-
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-trueif the @domain suffix should be removed from Kerberos user IDs
-
init
protected void init() throws javax.servlet.ServletExceptionDescription copied from class:BaseSSOAuthenticationFilterInitializes the filter. Only called if the filter is active, as indicated byBaseSSOAuthenticationFilter.isActive(). Subclasses should override.- Overrides:
initin classBaseSSOAuthenticationFilter- Throws:
javax.servlet.ServletException
-
authenticateRequest
public boolean authenticateRequest(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws java.io.IOException, javax.servlet.ServletExceptionDescription copied from interface:AuthenticationDriverAuthenticate user based on information in http request such as Authorization header or cached session information.- Specified by:
authenticateRequestin interfaceAuthenticationDriver- Parameters:
context- the contextreq- http requestresp- http response- Returns:
trueif authentication was successful- Throws:
java.io.IOExceptionjavax.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.UnsupportedCallbackExceptionJAAS callback handler- Specified by:
handlein interfacejavax.security.auth.callback.CallbackHandler- Parameters:
callbacks- Callback[]- Throws:
java.io.IOExceptionjavax.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.IOExceptionRestart the Kerberos logon process- Specified by:
restartLoginChallengein interfaceAuthenticationDriver- Parameters:
context- ServletContextreq- HttpServletRequestresp- 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.IOExceptionThe logon to start again- Parameters:
context- ServletContextreq- HttpServletRequestresp- HttpServletResponse- Throws:
java.io.IOException
-
-