// Check if an authenticator has been specified
ConfigElement authElem = config.getConfigElement("authenticator");
if (authElem != null)
{
// Get the authenticator type, should be either 'local' or 'passthru'
String authType = authElem.getAttribute("type");
if (authType == null)
authType = "alfresco";
// Get the authentication component type
NTLMMode ntlmMode = m_authenticationComponent.getNTLMMode();
// Set the authenticator class to use
CifsAuthenticator auth = null;
if (authType.equalsIgnoreCase("passthru"))
{
// Check if the appropriate authentication component type is configured
if ( ntlmMode == NTLMMode.MD4_PROVIDER)
throw new AlfrescoRuntimeException("Wrong authentication setup for passthru authenticator (cannot be used with Alfresco users)");
// Load the passthru authenticator dynamically
auth = loadAuthenticatorClass("org.alfresco.filesys.server.auth.passthru.PassthruAuthenticator");
if ( auth == null)
throw new AlfrescoRuntimeException("Failed to load passthru authenticator");
}
else if (authType.equalsIgnoreCase("alfresco"))
{
// Standard authenticator requires MD4 or passthru based authentication
if ( ntlmMode == NTLMMode.NONE)
throw new AlfrescoRuntimeException("Wrong authentication setup for alfresco authenticator");
// Load the Alfresco authenticator dynamically
auth = loadAuthenticatorClass("org.alfresco.filesys.server.auth.AlfrescoAuthenticator");
if ( auth == null)
throw new AlfrescoRuntimeException("Failed to load Alfresco authenticator");
}
else if( authType.equalsIgnoreCase("enterprise"))
{
// Load the Enterprise authenticator dynamically
auth = loadAuthenticatorClass("org.alfresco.filesys.server.auth.EnterpriseCifsAuthenticator");
if ( auth == null)
throw new AlfrescoRuntimeException("Failed to load Enterprise authenticator");
}
else
throw new AlfrescoRuntimeException("Invalid authenticator type, " + authType);
// Get the allow guest and map unknown user to guest settings
boolean allowGuest = authElem.getChild("allowGuest") != null ? true : false;
boolean mapGuest = authElem.getChild("mapUnknownUserToGuest") != null ? true : false;
// Initialize and set the authenticator class
setAuthenticator(auth, authElem, allowGuest);
auth.setMapToGuest( mapGuest);
}
else
throw new AlfrescoRuntimeException("Authenticator not specified");
// Make sure that either Kerberos support is enabled and/or the authentication component
// supports MD4 hashed passwords
if ( isKerberosEnabled() == false && m_authComponent.getNTLMMode() != NTLMMode.MD4_PROVIDER)
{
// Log an error
logger.error("No valid CIFS authentication combination available");
logger.error("Either enable Kerberos support or use an authentication component that supports MD4 hashed passwords");
// Throw an exception to stop the CIFS server startup
throw new AlfrescoRuntimeException("Invalid CIFS authenticator configuration");
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.