Page 1 of 1

Passing CAS credentials using SDK 1.1.

PostPosted:Mon Mar 20, 2017 10:16 am
by PSHREYASHOLLA
Hi,

We are using openKM with CAS. And for development we are using openKM SDK 1.1.

How to pass TGT/Service ticket as part of the request.

We are using,

import com.openkm.sdk4j.OKMWebservices;
import com.openkm.sdk4j.OKMWebservicesFactory;

OKMWebservices ws= OKMWebservicesFactory.newInstance(host, user, password);

Here instead of user and password, how can we pass TGT/Service ticket? Please help.

Re: Passing CAS credentials using SDK 1.1.

PostPosted:Tue Mar 21, 2017 7:06 pm
by jllort
First step should be OpenKM webservices be configured for accepting the ticket. You are welcome in helping us to modifying the source code for it https://github.com/openkm/document-management-system ( do in a simple method like /services/auth/getUsers to evaluate the change in the whole code ).

Re: Passing CAS credentials using SDK 1.1.

PostPosted:Thu Aug 22, 2019 12:45 am
by m.carlzy
Hello jllort,
I also have the same query. Could you please confirm, is the current method for newinstance in webservice will not be able to accept any service ticket from CAS and will require some sdk changes:

OKMWebservices ws= OKMWebservicesFactory.newInstance(host, user, password);


I tried some combinations of what to pass either use the cas host/service ticket for the password on the newInstance but I always end up with 401 http error code.

Re: Passing CAS credentials using SDK 1.1.

PostPosted:Sat Aug 24, 2019 10:32 am
by jllort
I think the source code should be modified to allow CAS authentication in webservices. Currently webservices only allow basic authentication and should be added some filter to allow CAS, might be modifying something in the appContext.xml and probably with some extra class in the OpenKM core.
Code: Select all
<!-- REST -->
  <security:http pattern="/services/rest/**" create-session="stateless">
    <security:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY"/>
    <security:http-basic/>
  </security:http>