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

Authentication to a application built on JAF

I have a Jazz application built on JAF and I am writing a Java utility to do authentication to the application. The public URI of the application is https://localhost:9445/jazz.

When I perform a GET on "https://localhost:9445/jazz/authenticated/Identity" I get the response as :

"HTTP/1.1 200 OK [Server: Apache-Coyote/1.1, Cache-Control: private, Expires: Thu, 01 Jan 1970 05:30:00 IST, Set-Cookie: JazzFormAuth=Form; Path=/jts, X-com-ibm-team-repository-web-auth-msg: authrequired, Content-Type: text/html;charset=UTF-8, Content-Length: 1977, Date: Mon, 10 Mar 2014 13:35:33 GMT]"

The response has Path="/jts" and X-com-ibm-team-repository-web-auth-msg: authrequired. Does this means that the authentication need to be delegated to "jts"?. If that is the case , where will I get the URL of the JTS?

One thing I noticed is that in the root service registry, the <jfs:oauthDomain> contains both jts and the application uri. So should I use the entries in the <jfs:oauthDomain> to do the authentication?

<jd:discovery rdf:resource="https://localhost:9445/jazz/discovery"/><jd:friends rdf:resource="https://localhost:9445/jazz/friends"/><jd:infocenterRoot rdf:resource="https://localhost:9445/jazz/../clmhelp"/><jd:viewletServiceRoot rdf:resource="https://localhost:9445/jazz"/><jd:viewletWebUIRoot rdf:resource="https://localhost:9445/jazz"/><jfs:oauthDomain>https://localhost:9443/jts,https://localhost:9445/jazz</jfs:oauthDomain><jfs:oauthRealmName>Jazz</jfs:oauthRealmName>

0 votes



One answer

Permanent link
Check out the "form-based authentication" section of this article and it should be a starting point of your quest.
http://www.ibm.com/developerworks/rational/library/10/programmatic-authentication-and-certificate-handling-for-rational-team-concert-2-0/

0 votes

Comments

Hi Donald, I had read the above article and the form-based authentication is working perfectly fine for any RTC that I tested. The issue I get is for an application built with JAF. So question is more on the response that I get for "https://localhost:9445/jazz/authenticated/Identity".

The response has Path="/jts" and X-com-ibm-team-repository-web-auth-msg: authrequired. Does this means that the authentication need to be delegated to "jts"?. If that is the case , where will I get the URL of the JTS?

I didn't really notice the "path=/jts" cookie when I tested with Perl. After you get the "X-com-ibm-team-repository-web-auth-msg: authrequired" header, you can simply POST "j_username:your_account" and "j_password:password" to https://<host>:<port>/jazz/j_security_check, and expect an HTTP 302 return code everything goes fine (same logic as mentioned in the article). Have you tried that?

Yes. I tried that too. It always get me the following response :


"HTTP/1.1 500 Internal Server Error [Connection: close, Server: Jetty(6.1.x)]"

That's when I noticed that the response for "authenticated/Identity" had the path=/jts.
So I tried the "j_security_check" with Jts https://<host><port>/jts/j_security_check, then it worked. This proves that the authentication is delegated to JTS and thus my above query on how to locate the url to the jts.

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
× 12,022

Question asked: Mar 10 '14, 11:49 a.m.

Question was seen: 3,868 times

Last updated: Mar 11 '14, 2:55 a.m.

Confirmation Cancel Confirm