Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

OSLC integration failing using JazzRootServicesHelper when JAS(Jazz Authentication Server) is enabled

We have an OSLC client built that utilizes the JazzRootServicesHelper Java classes, provided by IBM for implementing OSLC clients. This had been working perfectly in the past. However, once we configured the ELM applications to utilize your Jazz Authentication Server (JAS) for authentication, the client.formLogin() calls return an error.

I realize that IBM Support does not officially support 3rd part written integrations. However, they do provide the OSLC libraries for customers to utilize. And IBM also provides JAS to be used for authentication.

What we are looking for is assistance on what changes are required to make the following calls work in a JAS enabled ELM deployment:

rootServices = new JazzRootServicesHelper(server,
OSLCConstants.OSLC_CM_V2);
                  
              
                  JazzFormAuthClient client = rootServices.initFormClient(login, password);
                  
                  this.oslcClient = client;
                  
                  //Try to login
                  if (client.formLogin() != HttpStatus.SC_OK) {
                        System.out.print(">> login failed.");
                        System.exit(-1);
                  }

IBM provides documentation for implementing an OSLC client. Can you provide updated instructions for getting this to work with JAS please.

Note1: We have other integration code using direct httpClient REST calls and we got those to work switching from form based authentication to basic authentication. Is it possible to do the same thing using the JazzRootServicesHelper class?

Notye2: This issue is blocking our deployment of Multi-Factor Authorization on our production ELM server which is a mandatory GE requirement.

0 votes



5 answers

Permanent link

I do not know where the JazzRootServicesHelper is defined. I can not find it in the EWM SDK, so I can not comment on who has provided it for which purpose.


Anyway, If you configure JAS, Form Based Login does no longer work. You can not use Form Based Login in your case, you can see Form in the name of the methods. You would have to use a different approach.

0 votes

Comments

https://download.eclipse.org/lyo/docs/oslc-java-client/latest/org/eclipse/lyo/client/oslc/jazz/JazzRootServicesHelper.html 


The JazzRootServicesHelper is not an IBM product. It is a deprecated class that is part of the Eclipse Lyo framework. The current version of Lyo should support JAS. You need to upgrade to the latest Lyo version.


Permanent link

Hi Ralph


In order to support JAS (for authentication), we have downloaded eclipse LYO 5.0.0 libraries in our OSLC integration application. This in turn requires use a newer version of Java (JDK - 11), so for that we have downloaded JDK-11 version also and it works in our local machine.

But the ELM version 7.0.2 which we are using is supporting JDK-8 only and does not support JDK-11. Then how could we resolve this issue with JDK-8?

Could you please help on what we could do in this case to solve the issue we are seeing.

Thanks
Arghya

0 votes

Comments

I do not understand why the Java version the Jazz Servers run on is relevant to your LYO based automation. You use whatever Java version you need with Lyo. The Jazz servers use the version they need. Your Lyo stuff is not supposed to run in the Jazz servers. They are supposed to run in their own environments, as far as I can tell. 


Permanent link

Hi Ralph,


Thank you very much for your response. 

The code which I wrote in my machine using the LYO 5.0.0 version with JDK-11 and it is working perfectly fine. But when I deployed the same code on my server where I am using ELM - v7.0.2 with JDK 1.8. I am seeing the following error message -

JVMCFRE003 bad major version; class=org/eclipse/lyo/oslc4j/enovia/services/RootServicesService, offset = 6

When I have done some more research on that and found that there is a difference between JDK version and eclipse LYO client. I raised a case to IBM and they said - Unfortunately, ELM version702 only support version 8.
It is not until 703 that we support 11.

Could you please let me know your thought on that ?

Thanks 
Arghya


 

0 votes


Permanent link
My 2 cents.

  1. The code you shared is client code. Client code is not supposed to run on an ELM server.
  2. I do not know if you could configure Liberty to run different apps on different java versions in the same server. Assuming that is doable, try that.
  3. Otherwise if you have to run your Lyo Client or Server code on a separate Liberty profile server that is configured to run Java 11.

0 votes

Comments

Liberty does support setting up different java versions for different applications.  We use it ourselves. 

Is there a howto, Michael? I googled for a bit but did nt find how to configure this.


Permanent link

 Hi Ralph

 I have tried to run the EWM sample code which provided by you earlier through a GitHub link. So in that I have changed the QA URL (JAS enabled) to our production URL (which is Non - JAS environment) in the run configuration. After I run it It goes perfectly till Step 4, it fetched the rootservices document. In step 5 after printing the normal print statement it is throwing this error below : - 

 

[DEBUG] (org.eclipse.lyo.samples.client.EWMSample) - STEP 1: Configure the ClientBuilder as needed for your client application

[DEBUG] (org.eclipse.lyo.samples.client.EWMSample) - STEP 2: Set up authentication

[ INFO] (org.eclipse.lyo.samples.client.EWMSample) - Using Basic authentication

[DEBUG] (org.eclipse.lyo.samples.client.EWMSample) - STEP 3: Create a new OslcClient

[DEBUG] (org.eclipse.lyo.samples.client.EWMSample) - STEP 4: Get the URL of the OSLC ChangeManagement service from the rootservices document

[DEBUG] (org.eclipse.lyo.client.RootServicesHelper) - Fetching rootservices document at URL <"our rootservice url" [DEBUG] (org.eclipse.lyo.client.RootServicesHelper) - Using catalog domain <"our catalog domain URL" [DEBUG] (org.eclipse.lyo.samples.client.EWMSample) - STEP 5: Find the OSLC Service Provider for the project area we want to work with

[ERROR] (org.eclipse.lyo.samples.client.EWMSample) - Jazz server returned an HTML page instead of RDF. Are you sure you have chosen between Basic and JAS Forms auth correctly?

 

Could you please let me know your what is this error actually expecting ?

0 votes

Comments
The original question in this question is already answered. I am not willing to piecemeal debug your lyo code here in the same question. 
  1. Please open a new question if you want to continue the conversation on this forum
  2. Please consider to ask in the Lyo forum https://www.eclipse.org/forums/index.php?t=thread&frm_id=228
  3. Read the error message, it exactly explains what the issue is. You are apparently not logged in. Look at the authentication and make sure that works, after you switched to a system with another authentication setup.

Note that you get the rootservices document, because that does not require authentication.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937
× 7,495
× 1,325

Question asked: Jan 08, 9:58 a.m.

Question was seen: 1,458 times

Last updated: Jan 31, 12:46 p.m.

Confirmation Cancel Confirm