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.
5 answers
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.
Comments
https://github.com/OSLC/lyo-samples/blob/master/lyo-client-samples/src/main/java/org/eclipse/lyo/samples/client/EWMSample.java shows how this would work with the current version.
Hi Ralph
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.
Hi Ralph,
- The code you shared is client code. Client code is not supposed to run on an ELM server.
- 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.
- 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.
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 ?
Comments
-
Please open a new question if you want to continue the conversation on this forum
- Please consider to ask in the Lyo forum https://www.eclipse.org/forums/index.php?t=thread&frm_id=228
-
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.