cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to CMIS using authentication ticket

alfred
Champ in-the-making
Champ in-the-making
Hey there

Well, here's the question : How can I connect to the cmis services using an authentication ticket.
I searched for an answer, and I found here http://issues.alfresco.com/jira/browse/ALF-7074 ,that :
Ticket can be specified in password, if any of the following are true:
a) username is not specified (i.e. null, or length of zero)
b) username is equal to "ROLE_TICKET" (case insensitive)
The CMIS REST API has also been updated to support the above, so it's consistent with Web Services.

this is dated from 4 months ago.

I'm using Opencmis 0.3.0, passing the informations as specified
SessionFactory factory= SessionFactoryImpl.newInstance();
      Map<String, String> parameter = new HashMap<String, String>();
      parameter.put(SessionParameter.USER,"");
      parameter.put(SessionParameter.PASSWORD,theTicket);
      parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
      parameter.put(SessionParameter.ATOMPUB_URL,"URLToService/cmis");
      parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, "URLToService/cmis/services/NavigationService?wsdl");
      parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, "URLToService/cmis/services/ObjectService?wsdl");
, but it returns me this :
org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Parsing exception!
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:465)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:653)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:58)
   at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:85)
   at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:69)

I'm using Alfresco 3.4b

Can you tell me what is wrong?

Thanks a lot
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
The change to support ticket authentication is not in community 3.4b  since it was done 4 months after that release :cry:

You can pick up a nightly build, however HEAD is very unstable at the moment.   It will be in Community 4.0.a.  (If that's the next release)  And is in Enterprise 3.4 SP1 and above.

alfred
Champ in-the-making
Champ in-the-making
Ah, that's a good explanation. Thanks mrogers!

What if I only take the changes concerning the ticket authentication on the head ? Is it something to do? And could you tell me where i'll find what I'm interested in, if you know that?


Thanks a lot

fmui
Champ in-the-making
Champ in-the-making
Have a look at these files in HEAD:

…/remote-api/source/java/org/alfresco/repo/cmis/ws/AuthenticationInterceptor.java
…/remote-api/source/java/org/alfresco/repo/web/util/auth/Authorization.java
…/remote-api/source/java/org/alfresco/repo/web/scripts/servlet/BasicHttpAuthenticatorFactory.java


Good luck!

Florian