Java API Access to CLM with JAS and Remote Authentication
We use the Java API to create and link projects in several CLM applications (RQM, CCM, and RM). Today, our environment uses basic authentication in CLM, with a user registry file on the filesystem of the server that runs these applications. However, we wish to migrate this to JAS, tied into a remote OpenID provider.
Error: Replaying the original POST/PUT/DELETE request on a redirection sequence more than 10 times
Accepted answer
I post this for Nick, who seems to be unable to get this through. I replaced the XML stype brackets by [] to avoid messing up the post:
With help from IBM, I was able to resolve the issue and wanted to document it here in case it helps someone else in the future.
To resolve the issue, I updated the JAS appConfig.xml file to direct only browsers to my upstream OpenID Connect Provider, using the User-Agent header on incoming requests. Because the Java SDK doesn't send a User-Agent header that matches popular browsers, we can bypass the upstream provider and use JAS's local authentication mechanism.
For reference, here is a snippet of my appConfig.xml configuration:
[openidConnectClient authFilterRef="oidcAuthFilter [-- Some output omitted --] /][authFilter id="oidcAuthFilter"]
[!-- Some output omitted --] [userAgent id="javaAgent" agent="Opera|Mozilla" matchType="contains" /][/authFilter]
2 other answers
Nick, the RTC Eclipse client uses the same code to log into the server and that works. So you don't have to do anything special as far as I can tell. The only thing you might need is to provide a newer commons library. See
https://rsjazz.wordpress.com/2016/09/21/cant-connect-to-rtc-running-with-jazz-authentication-server/ for some experience we had.
The error above might be related to some setup issue in JAS e.g. the redirect and other URI pattern entered in the configuration.
Comments
Hi, Ralph.
Can you login with an Eclipse client? I don't recognize your error message.
Hi, Ralph. For some reason, I didn't see your latest comment until just now. No, I could not login using the Eclipse client - it gave me the same error that I referenced above.
It might be the XML in your post. I got your answer, but the forum seems to suppress it. So I posted your answer myself. thank you so much to for your feedback.
Awesome, thanks for sharing. This is a gold nugget of information.