Export AuthenticationService via RMI, in preparation for adding over the wire

authentication for CLTs.  Until we use SSL transport for RMI this is subject
to authentication password and authentication ticket snooping, but that can
be fixed easily later.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4480 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-12-01 01:40:12 +00:00
parent bbd8db7b69
commit 7ff8eaef28
3 changed files with 40 additions and 0 deletions

View File

@@ -26,4 +26,16 @@
<value>true</value>
</property>
</bean>
<bean id="authenticationService" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
<property name="serviceUrl">
<value>rmi://localhost:1313/authentication</value>
</property>
<property name="serviceInterface">
<value>org.alfresco.service.cmr.security.AuthenticationService</value>
</property>
<property name="refreshStubOnConnectFailure">
<value>true</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,21 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- The AuthenticationService exported as an RMI service. -->
<bean id="rmiAuthenticationService" class="org.springframework.remoting.rmi.RmiServiceExporter">
<property name="service">
<ref bean="AuthenticationService"/>
</property>
<property name="serviceInterface">
<value>org.alfresco.service.cmr.security.AuthenticationService</value>
</property>
<property name="serviceName">
<value>authentication</value>
</property>
<property name="registryPort">
<value>${avm.remote.port}</value>
</property>
</bean>
</beans>

View File

@@ -10,6 +10,7 @@ import java.util.Map;
import org.alfresco.repo.avm.AVMRemote;
import org.alfresco.service.cmr.avmsync.AVMSyncService;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -34,6 +35,11 @@ public abstract class AVMCltBase
*/
protected ConfigurableApplicationContext fContext;
/**
* The Authentication Service.
*/
protected AuthenticationService fAuthenticationService;
/**
* Construct a new one. This takes care of instantiating
* the application context and grabs references to the
@@ -45,6 +51,7 @@ public abstract class AVMCltBase
fContext = new ClassPathXmlApplicationContext("alfresco/avm-clt-context.xml");
fAVMRemote = (AVMRemote)fContext.getBean("avmRemote");
fAVMSyncService = (AVMSyncService)fContext.getBean("avmSyncService");
fAuthenticationService = (AuthenticationService)fContext.getBean("authenticationService");
}
/**