cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS session through LDAP auth

matvieira
Champ on-the-rise
Champ on-the-rise
I have a alfresco Com. 4.2.f being sync and auth with a apacheDS, as LDAP server. It works fine for almost everything, it syncs well and I can login through Alfresco/Share. But those sync users dont work correctly through CMIS. The users I create directly on Alfresco works fine, I can create folders/docs, navigate and etc, but not with the ldap ones.

In my app I have:

Map<String, String> parameters = new HashMap<String, String>();
parameters.put(SessionParameter.ATOMPUB_URL, URL_CMIS_REPOSITORY);
parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
parameters.put(SessionParameter.USER, username);
parameters.put(SessionParameter.PASSWORD, password);
SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
Repository repository = sessionFactory.getRepositories(parameters).get(0);
parameters.put(SessionParameter.REPOSITORY_ID, repository.getId());
Session session = sessionFactory.createSession(parameters);

And when I try, for example:

session.getObject("13fdd031-1b12-4470-9002-eb0adf039f36");

It freezes forever…

Same behavior when I try to login trhough CMIS Workbench. It works fine with Alfresco users but not with LDAP ones.

Am I doing something wrong?
3 REPLIES 3

kaynezhang
World-Class Innovator
World-Class Innovator
Please paste your authentication.chain here.
Can you just get the ticket for the current user, then authenticate with username of ROLE_TICKET and the ticket as the password

jpotts
World-Class Innovator
World-Class Innovator
Using Alfresco 4.2.f, ApacheDS 2.0.0, OpenCMIS 0.10.0, and the AtomPub binding with service URL of http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom, I can connect to Alfresco using a user that resides in LDAP and can fetch an object in the Groovy console like this:

// Use the CMIS object ID
doc = session.getObject("a6f61dd5-6919-41d3-abb7-8170dc04b134;1.0")
println doc.name

// Use the CMIS version series ID
doc = session.getObject("a6f61dd5-6919-41d3-abb7-8170dc04b134")
println doc.name


Jeff

matvieira
Champ on-the-rise
Champ on-the-rise
I'm sorry for this post. I figured that my apacheDs was the reason for that weird behavior. I connected to another ApacheDs installation and it worked fine.

Thx.