mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Refactor subsystems for authentication chaining
- An authentication chain of size 1 configured by default - DefaultChildApplicationContextManager supports dynamic configuration of the authentication chain via Spring or JMX. Any number of instances of any type allowed in chain. - SubsystemChainingAuthenticationComponent and SubsystemChainingAuthenticationService iterate across configured chain for Authentication - SSO (NTLM / Kerberos) and CIFS authentication independently activatable for any component in chain (where supported). - SubsystemChainingProxyFactory used to proxy directly to first active CIFS authenticator or SSO filter in the chain - CIFS server knows not to bother starting if authentication chain doesn't have an active CIFS authenticator (e.g. LDAP only) - Rationalization of subsystem configuration folder structure and JMX object naming - Classpath based extension mechanism for community edition - alfresco/extension/subsystems/<category>/<typeName>/<id>/*.properties in classpath can be used to configure specific subsystem instances - Simplification of JMX infrastructure. No longer Spring bean definition based, thus allowing dynamic creation/registration of new instances at runtime. - New AuthenticationChainTest unit test git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14030 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,7 +29,6 @@ import javax.naming.directory.InitialDirContext;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AbstractAuthenticationComponent;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.service.Managed;
|
||||
|
||||
/**
|
||||
* Currently expects the cn name of the user which is in a fixed location.
|
||||
@@ -51,25 +50,21 @@ public class LDAPAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
||||
super();
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory)
|
||||
{
|
||||
this.ldapInitialContextFactory = ldapInitialDirContextFactory;
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setUserNameFormat(String userNameFormat)
|
||||
{
|
||||
this.userNameFormat = userNameFormat;
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setEscapeCommasInBind(boolean escapeCommasInBind)
|
||||
{
|
||||
this.escapeCommasInBind = escapeCommasInBind;
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setEscapeCommasInUid(boolean escapeCommasInUid)
|
||||
{
|
||||
this.escapeCommasInUid = escapeCommasInUid;
|
||||
|
@@ -38,7 +38,6 @@ import javax.naming.directory.BasicAttributes;
|
||||
import javax.naming.directory.InitialDirContext;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.service.Managed;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -61,7 +60,6 @@ public class LDAPInitialDirContextFactoryImpl implements LDAPInitialDirContextFa
|
||||
super();
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setInitialDirContextEnvironment(Map<String, String> initialDirContextEnvironment)
|
||||
{
|
||||
this.initialDirContextEnvironment = initialDirContextEnvironment;
|
||||
|
@@ -44,7 +44,6 @@ import javax.transaction.UserTransaction;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.importer.ExportSource;
|
||||
import org.alfresco.repo.importer.ExportSourceImporterException;
|
||||
import org.alfresco.service.Managed;
|
||||
import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -85,25 +84,21 @@ public class LDAPPersonExportSource implements ExportSource
|
||||
super();
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setPersonQuery(String personQuery)
|
||||
{
|
||||
this.personQuery = personQuery;
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setSearchBase(String searchBase)
|
||||
{
|
||||
this.searchBase = searchBase;
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setUserIdAttributeName(String userIdAttributeName)
|
||||
{
|
||||
this.userIdAttributeName = userIdAttributeName;
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory)
|
||||
{
|
||||
this.ldapInitialContextFactory = ldapInitialDirContextFactory;
|
||||
@@ -114,7 +109,6 @@ public class LDAPPersonExportSource implements ExportSource
|
||||
this.personService = personService;
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setAttributeDefaults(Map<String, String> attributeDefaults)
|
||||
{
|
||||
this.attributeDefaults = attributeDefaults;
|
||||
@@ -125,13 +119,11 @@ public class LDAPPersonExportSource implements ExportSource
|
||||
this.namespaceService = namespaceService;
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setAttributeMapping(Map<String, String> attributeMapping)
|
||||
{
|
||||
this.attributeMapping = attributeMapping;
|
||||
}
|
||||
|
||||
@Managed(category="Security")
|
||||
public void setErrorOnMissingUID(boolean errorOnMissingUID)
|
||||
{
|
||||
this.errorOnMissingUID = errorOnMissingUID;
|
||||
@@ -175,7 +167,7 @@ public class LDAPPersonExportSource implements ExportSource
|
||||
|
||||
userSearchCtls.setCountLimit(Integer.MAX_VALUE);
|
||||
|
||||
NamingEnumeration searchResults = ctx.search(searchBase, personQuery, userSearchCtls);
|
||||
NamingEnumeration<SearchResult> searchResults = ctx.search(searchBase, personQuery, userSearchCtls);
|
||||
RESULT_LOOP: while (searchResults.hasMoreElements())
|
||||
{
|
||||
SearchResult result = (SearchResult) searchResults.next();
|
||||
|
Reference in New Issue
Block a user