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

How to I solve the "Unable to receive attribute values" error I get for an attribute customization?

Hello,

I am using RTC 3.0.1.1 configured with URI https://localhost (this is a test environment) and a self-signed SSL certificate generated on websphere.

I have configured an HTTP Filtered Value Set attribute customization to retrieve values from an XML file that I have stored under the project area's source control.

I have configured the com.ibm.team.workitem.service.internal.connector.AuthenticationService ccm server setting with an account that is used to retrieve the data (the value is "ID|||account|||password") which has been made a Project Administrator for the project area.  Within the HTTP Filtered Value Set configuration I am using "Basic Authentication" with the credential identifier set to ID and the username and password blank (I have also tried setting these... it doesn't seem to make a difference)

When I create a work item, instead of providing the values from the XML file I get the error "Unable to receive attribute values (HTTP request failed with 302 Found)".  Since I am using a self-signed certificate I flagged the option "Ignore invalid SSL certificates" but I get the error "Unable to receive attribute values (Problems accessing 'XML data source URL': Connection to https://localhost refused)."

I thought that this might be the result of the jre not accepting a self-signed certificate so I extracted it from websphere and imported the .crt into the cacerts keystore belonging to the jre that the application is configured to use.  I still get the same error...

When I login to the project are with the credentials specified in the AuthenticationService and access the XML data source URL that is provided in the error, I can download it without any problems, which is why I think it has something to do with the self-signed certificate and the jre.

Any ideas as to what this could be?

Thank you and best regards,

Andrew

0 votes

Comments

Andrew, please have a look at this post from Jorge Diaz: http://jorgediazblog.wordpress.com/2012/06/27/work-item-customization-httpconector-and-oauth-in-rtc-4-0-for-oslc/ it explains your situation well. And as mentioned below, you might not be able to access all the data you want.



4 answers

Permanent link
Just use Form based authentication and use
"j_username" for username parameter
"j_password" for password parameter.

You should also use
"https://servername:9443/ccm/j_security_check" for URL and
"ID" for Credential Identifier. ID can be changed according to your definition in your
ccm/admin->Advanced Properties

But you say: "XML file that I have stored under the project area's source control", I dont think RTC might be able to fetch that item. You should call a webservice in the XML DataSource URL like "https://servername:9443/ccm/oslc/contexts/_hAweEADbEeGk55ehjdc7IA/workitems"

What did you use  in the XML data Source URI?

0 votes

Comments

Hello Canberk,

Thank you for your reply.

I have set the form based authentication and I use the URL format that you mentioned but I still receive errors.

An example of the XML data source URL is:

https://localhost/ccm/service/com.ibm.team.filesystem.service.internal.rest.IFilesystemContentService/_eQp88UnNEeK3x-eF3YRumA/_eUWKIEnNEeK3x-eF3YRumA/MetaDataCommon.xml?itemId=_lQ0NAEnNEeK3x-eF3YRumA

To attain this value I simply copied the link to the XML file under source control (right click within the repository and then "Copy Link Location").  If I paste the link into my browser it works.  This is why I thought it might be due to the self-signed certificate since the jre being invoked uses a different keystore to my browser.

Do you have any other ideas?

Thank you and best regards,

Andrew

You will not be able to fetch the xml file by that method. You can only fetch the reportable rest api of the Jazz Product if I'm not mistaken.

What you do is calling the xml file under the source control and some kind of downloading as far as I understand.

Andrew, I have seen this use case work before (using SCM as the HTTP Value set provider), although this approach is not officially supported.  The XML data source URL you're using looks right, although there is no port (is that on purpose?).  I'm not sure this is a cert problem given that you've selected to ignore invalid SSL certs.  You should select the same authentication method in your value set definition as your server is set up to use.  If it is Basic, you only need to provide a username and password.  Can you confirm you also have a row XPath expression defined?  Perhaps a screen shot of the value set configuration would help.


Permanent link
 I am having the same issue.  Below is an example of the XML file and configuration.

<Defect>
  <Types>
    <Type>Enhancement</Type>
  </Types>
</Defect>

Row XPath expression:  //Defect/TestTypes/TestType
Column XPath expressions:  ./
Column identifiers:  
Entry label format:
  

0 votes


Permanent link
@Michael - what error were you seeing?  The xpath in your sample doesn't look like it matches the xml.  I think it should be //defect/types/type

0 votes

Comments

You are right.  Typo on my part.  But that's just an example.  I had it correct in the system.  I still get the red circle with the X next to the field.  When I hover over, I get "Unable to receive attribute values (HTTP request failed with 302 Found)"


Permanent link
Based on comments in this workitem:
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=174347
the 302 error being seen appears to be due to this defect, fixed in 4.0: 
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=181120
What happens if you uncheck the "Ignore invalid SSL certificates" option?

I can reproduce the connection refused error by removing the port number from the URL for the XML data source.  Of course doing that would also cause the same URL to fail in a browser, which is not what Andrew described.  So the original problem remains a bit of a mystery.

Perhaps its worth explicitly adding the port to the localhost URL to see what happens.
https://localhost:443/ccm/service/com.ibm.team.filesystem.service.internal.rest.IFilesystemContentService/_eQp88UnNEeK3x-eF3YRumA/_eUWKIEnNEeK3x-eF3YRumA/MetaDataCommon.xml?itemId=_lQ0NAEnNEeK3x-eF3YRumA

0 votes

Comments

Hello Brian,

Thank you for taking the time to help me.  I have noted your comments above and I will reply here.  JTS has been configured on the standard https port 443 on purpose.

The setup I started using was with basic authentication:


Under my server settings, I have this:


This user corresponds to a windows account created for recovering these values. (RTC 3.0.1.1 is using websphere based on windows authentication).  It has JazzAdmin repository permissions, a Developer license, and is added as a project administrator in the project area (I can login with the account and access the XML file).

When creating the work item with this configuration, I get:


If I uncheck the "Ignore invalid SSL certificates" option or specify port 443 I get the error:


Ideas?
Best regards,
Andrew

I think adding the port is a must.  A 302 is better than a connection refused (at least you're getting into the application).  After some more digging, I suspect this is the defect you are running into.  The HTTPConnector is not following redirects (see comment 1).  This was fixed in 4.0 and backported to 3.0.1.3 via 193423
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=186852




Hello Brian,

Thank you for the update.  I will see what I can do and let you know.

EDIT: I have accessed another instance where there is no port set in both the public URI and the project area configuration and the setup works.  The only difference is that the SSL certificate has been verified by a CA and isn't self signed.

In terms of the com.ibm.team.workitem.service.internal.connector.AuthenticationService property (mentioned above), what sort of permissions must the account specified there have?  Must it have repository permissions and a CAL?  Must it be added to the project area as admin?

Thank you and best regards,

Andrew

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

Question asked: Dec 21 '12, 3:27 a.m.

Question was seen: 7,133 times

Last updated: Jan 11 '13, 4:13 a.m.

Confirmation Cancel Confirm