Its currently not supported in camel-cmis.
I suggest to look at what Apache Chemistry
supports. Then we can see what it takes to add that to the camel-cmis component. for SSL there is camel jsse that would be great to support then
Then its a matter of using that to setup a SSLContextParameters that camel-cmis can use.
Yup. Apache Chemistry exports an AuthenticationProvider interface org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider that includes:
SSLSocketFactory getSSLSocketFactory(); HostnameVerifier getHostnameVerifier();
May be we can subclass org.apache.chemistry.opencmis.client.bindings.spi.StandardAuthenticationProvider to overload these 2 methods with the SSLSocketFactory created from SSLContextParameters.
Currently Camel CMISSessionFacade creates the chemistry Session using SessionFactoryLocator.getSessionFactory().createSession(parameter);
Instead, we could use
createSession(Map<String, String> parameters, ObjectFactory objectFactory, AuthenticationProvider authenticationProvider, Cache cache)
under org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl class to inject the AuthenticationProvider.
Creating custom AuthenticationProvider creates OSGi classloader issues as the OpenCMIS api does not have visibility to custom class.. it may work on non-OSGi environments.
Thanks very much, Claus. Few concerns:
1. Apache Chemistry exports an AuthenticationProvoider interface, but the interface SessionFactory only exports createSession(parameter) and only the implementation class org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl supports using AuthenticationProvider.
2. The package org.apache.chemistry.opencmis.client.runtime is not osgi-exported by Chemistry API, so we cannot directly access org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl in OSGi environments.
3. Chemistry API supports custom AuthenticationProvider using the SessionParameter.AUTHENTICATION_PROVIDER_CLASS parameter , but then it does Class.forName(authProviderClassName).newInstance() to create the instance which is causing ClassNotFoundException since Chemistry API does not have visibility to custom authentication provider in OSGi environment.
It looks like few changes are required at Chemistry side as well. Once again, thanks very much.