mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Align Alfresco, CIFS and FTP authentication stacks for NTLM passthru, kerberos and LDAP
- PassthruServerFactory created to allows PassthruServers singleton to be shared by CIFS, FTP and Alfresco passthru authenticators - Also added NTLM + Alfresco (non-passthru) example. Doesn't seem to work yet! - ExtendedServerConfigurationAccessor interface added BaseSSOAuthenticationFilter to get at local server name info from file server configuration - toString() added to CIFSAuthenticator so that we can still properly log the authenticator type - Fixed WebDAVServlet to go through ServerConfigurationAccessor interface to avoid ClassCastException git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13823 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -76,7 +76,9 @@ import org.springframework.context.event.ContextRefreshedEvent;
|
||||
*
|
||||
* @author gkspencer
|
||||
*/
|
||||
public abstract class AbstractServerConfigurationBean extends ServerConfiguration implements ApplicationListener, ApplicationContextAware {
|
||||
public abstract class AbstractServerConfigurationBean extends ServerConfiguration implements
|
||||
ExtendedServerConfigurationAccessor, ApplicationListener, ApplicationContextAware
|
||||
{
|
||||
|
||||
// Debug logging
|
||||
|
||||
@@ -178,6 +180,7 @@ public abstract class AbstractServerConfigurationBean extends ServerConfiguratio
|
||||
// Local server name and domain/workgroup name
|
||||
|
||||
private String m_localName;
|
||||
private String m_localNameFull;
|
||||
private String m_localDomain;
|
||||
|
||||
// Disable use of native code on Windows, do not use any JNI calls
|
||||
@@ -630,11 +633,49 @@ public abstract class AbstractServerConfigurationBean extends ServerConfiguratio
|
||||
*/
|
||||
public final String getLocalServerName(boolean trimDomain)
|
||||
{
|
||||
// Use cached untrimmed version if necessary
|
||||
if (!trimDomain)
|
||||
{
|
||||
return getLocalServerName();
|
||||
}
|
||||
|
||||
// Check if the name has already been set
|
||||
|
||||
if (m_localName != null)
|
||||
return m_localName;
|
||||
|
||||
// Find the local server name
|
||||
String srvName = getLocalServerName();
|
||||
|
||||
// Strip the domain name
|
||||
|
||||
if (trimDomain && srvName != null)
|
||||
{
|
||||
int pos = srvName.indexOf(".");
|
||||
if (pos != -1)
|
||||
srvName = srvName.substring(0, pos);
|
||||
}
|
||||
|
||||
// Save the local server name
|
||||
|
||||
m_localName = srvName;
|
||||
|
||||
// Return the local server name
|
||||
|
||||
return srvName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the local server name (untrimmed)
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
private String getLocalServerName()
|
||||
{
|
||||
// Check if the name has already been set
|
||||
|
||||
if (m_localNameFull != null)
|
||||
return m_localNameFull;
|
||||
|
||||
// Find the local server name
|
||||
|
||||
String srvName = null;
|
||||
@@ -658,18 +699,9 @@ public abstract class AbstractServerConfigurationBean extends ServerConfiguratio
|
||||
}
|
||||
}
|
||||
|
||||
// Strip the domain name
|
||||
|
||||
if (trimDomain && srvName != null)
|
||||
{
|
||||
int pos = srvName.indexOf(".");
|
||||
if (pos != -1)
|
||||
srvName = srvName.substring(0, pos);
|
||||
}
|
||||
|
||||
// Save the local server name
|
||||
|
||||
m_localName = srvName;
|
||||
m_localNameFull = srvName;
|
||||
|
||||
// Return the local server name
|
||||
|
||||
|
Reference in New Issue
Block a user