How to connect Rifidi via RMI Client
From RifidiWiki
- 1) Ensure you set client java property to ensure ssl Cipher matches
javax.rmi.ssl.client.enabledCipherSuites=SSL_DH_anon_WITH_RC4_128_MD5
- 2) Sample RMI Client code
// SecurityContextHolder.getContext().setAuthentication(auth);
RmiProxyFactoryBean proxy = new RmiProxyFactoryBean(); proxy.setCacheStub(true); proxy.setRefreshStubOnConnectFailure(true); proxy.setServiceInterface(SensorManagerService.class); proxy.setServiceUrl("rmi://[replace with ipaddress such as 127.0.0.1]:1101/SensorManagerService"); proxy.setRemoteInvocationFactory(new ContextPropagatingRemoteInvocationFactory()); proxy.afterPropertiesSet(); SensorManagerService service = (SensorManagerService) proxy.getObject(); ReaderDTO reader = service.getReader("LLRP_1");
}
Note: The RMI settings for Rifidi edge can be found in
within org.rifidi.edge_5.5.4.jar
found in the server/plugins directory
inside the jar is META-INF\spring
rmi-server.xml is the config file
<bean id="SSLserverSocketFactory" class="javax.rmi.ssl.SslRMIServerSocketFactory"> <constructor-arg index="0" value="SSL_DH_anon_WITH_RC4_128_MD5"> </constructor-arg> <constructor-arg index="1"> <null /> </constructor-arg> <constructor-arg index="2" value="false" /> </bean>
This could mean on the client u need to set (java property) to ensure ssl Cipher matches
javax.rmi.ssl.client.enabledCipherSuites=SSL_DH_anon_WITH_RC4_128_MD5