Troubleshooting issues with OAuth consumer keys

Technote (troubleshooting)


Problem(Abstract)

While configuring or upgrading the server, problems can occur that make the server unusable. To address these issues, it is necessary to troubleshoot the OAuth consumer key that is stored in configuration files and the database. OAuth keys are used by the Rational® Requirements Composer server to communicate with the Jazz server and gain access to the storage areas in the database.

Symptom

The following symptoms are typical of OAuth configurations that are not valid:

  • Errors in the server/logs/rdm.log file. For example, "CRJZS0033E Invalid consumer key." means that the consumer might not be registered.
  • Buttons are disabled in the Rational Requirements Composer setup wizard.

Resolving the problem

To determine if there are problems with the OAuth consumer key, first you must check the differences between the OAuth keys in the database: https://server:9443/jazz/admin#action=com.ibm.team.repository.admin.configureOAuth

and the ones in the configuration files on the server:

\server\conf\jazz\friendsconfig.rdf

\server\conf\rdm\friendsconfig.rdf

If there is no 'Rational Requirements Server' key defined in Jazz Web admin, but there is an entry in the friendsconfig.rdf file, the entries can be removed.

    1. Remove the friend entry in the files.
    2. Restart the Rational Requirements Composer server and run the setup again.
If the database entry exists, but the keys do not match, you can restore the key in the property files to match the one in the database. The Rational Requirements Server key can be recovered from the Jazz Web admin.

https://server:9443/jazz/admin#action=com.ibm.team.repository.admin.configureOAuth

To obtain the oauthConsumerSecret:

    1. Click on the 'Rational Requirements Server' authorized key.
    2. Enter a new value for the secret and click 'Enter'.
    3. Enter this secret value into the following files and restart the server:

        \server\conf\rdm\friendsconfig.rdf

        \server\conf\jazz\friendsconfig.rdf

If the friendsconfig.rdf files do not have entries, then you can manually create the files. The \server\conf\rdm\friendsconfig.rdf file should look like this:

<rdf:RDF
   xmlns:jfs="
http://jazz.net/xmlns/prod/jazz/jfs/1.0/"
   xmlns:dc="
http://purl.org/dc/terms/"
   xmlns:jd="
http://jazz.net/xmlns/prod/jazz/discovery/1.0/"
   xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <jd:Friend>
   <jfs:internal>false</jfs:internal>
   <jfs:oauthConsumerSecret>samplesecretvalue</jfs:oauthConsumerSecret>
   <jfs:oauthConsumerKey>samplekeyvalue</jfs:oauthConsumerKey>
   <jfs:oauthDomain>
https://server:9443/jazz</jfs:oauthDomain>
   <dc:title>RRS_JFS</dc:title>
   <jd:rootServices rdf:resource="
https://server:9443/jazz/rootservices"/>
 </jd:Friend>
</rdf:RDF>

The \server\conf\jazz\friendsconfig.rdf file should look like this:

<rdf:RDF
   xmlns:jfs="
http://jazz.net/xmlns/prod/jazz/jfs/1.0/"
   xmlns:dc="
http://purl.org/dc/terms/"
   xmlns:jd="
http://jazz.net/xmlns/prod/jazz/discovery/1.0/"
   xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <jd:Friend>
   <jfs:internal>true</jfs:internal>
   <jfs:oauthConsumerSecret>samplesecretvalue</jfs:oauthConsumerSecret>
   <jfs:oauthConsumerKey>samplekeyvalue</jfs:oauthConsumerKey>
   <jfs:oauthDomain>
https://server:9443/rdm,https://server:9443/jazz</jfs:oauthDomain>
   <dc:title>Rational Requirements Server</dc:title>
   <jd:rootServices rdf:resource="
https://server:9443/rdm/rootservices"/>
 </jd:Friend>
</rdf:RDF>

To restore these files, copy the above contents. Then edit the oauthDomain and rootServices values. Replace the server name with the actual host name or your server. The oauthConsumerKey can be obtained from Jazz Web admin:

https://server:9443/jazz/admin#action=com.ibm.team.repository.admin.configureOAuth

To obtain the oauthConsumerSecret, click on the 'Rational Requirements Server' authorized key. Enter a new value for the secret and click 'Enter'. Enter this secret value into the friendsconfig files and restart the server.

If the 'Rational Requirements Server' authorized key has been deleted from the database, and the RRC resources cannot be accessed, the key will need to be recreated.

The following repotools commands can be used to fix the consumer key of the affected storage areas:

   -listStorageAreaKeys --List the authorization consumer keys for each storage area, including archived storage areas.
        [toFile=*] --The path to the file the list is exported to. The format of the file is a comma separated list of storage area name, and consumer key.
        [teamserver.properties=conf/jazz/teamserver.properties] --Path to the teamserver.properties file.

  -setStorageAreaKeys --Set the authorization consumer keys for the given storage areas.
        [list=*] --A comma separated list of storageAreaName-consumerKey pairs, without spaces. E.g. storageArea1,key1,storageArea2,key2
        [fromFile=storageAreaKeys.csv] --The path to the file containing the storage area keys to set. The format of the file is a comma separated list of storage area name, and consumer key.
        [teamserver.properties=conf/jazz/teamserver.properties] --Path to the teamserver.properties file.

Create a new preauthrorized key, using the name and secret in \server\conf\rdm\friendsconfig.rdf, then update \server\conf\rdm\friendsconfig.rdf and \server\conf\jazz\friendsconfig.rdf with the new key value. Then, perform the following steps:

  1. Stop the server.
  2. From a command prompt, navigate to the /server directory.
  3. Enter the following command: repotools -listStorageAreaKeys toFile=keys.csv
  4. Open the keys.csv file, and change the old key values to the new one. This is the oauthConsumerKey value in the \server\conf\rdm\friendsconfig.rdf file.
  5. Save and close the file.
  6. Enter the following command: repotools -setStorageAreaKeys fromFile=keys.csv
  7. Start the server.

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Requirements Composer
General Information

Software version:

2.0, 2.0.0.1, 2.0.0.2, 2.0.0.3, 2.0.0.4

Operating system(s):

Linux, Windows

Reference #:

1428545

Modified date:

2010-05-19

Translate my page

Machine Translation

Content navigation