It's all about the answers!

Ask a question

Custom automation adapter gets 403 on registration


Michael Freeman (247) | asked Sep 03 '14, 8:30 a.m.
I'm working on a custom automation adapter based on the Eclipse Lyo sample.
I've gotten it to log in successfully and the sample code successfully finds the adapter creation factory URL, but it gets a 403 Forbidden in response to the HTTP POST.

Please note:
1. The RQM server is RQM 5.0, just upgraded last weekend.

2. The registration code is unchanged from the Eclipse Lyo sample provider.

3. The Eclipse Lyo sample, when set up in its own Eclipse workspace, *also* gets a 403 Forbidden.

4. I went in to the RQM web interface, went to Manage Project Area, and added the appropriate ID under Test Artifacts -> Custom Execution Adapter Types -> Custom Test Automation Script Types. This got me from getting a 500 error to getting a 403 error (incidentally, https://jazz.net/wiki/bin/view/Main/RQMTestAutomationAdapterAPI says nothing about having to do this first).

5. When I log in to the web interface as the user in question, I can see that they're getting a standard RQM license from our floating license pool (checked this after seeing another posting mention it as a possibility)

6. The user in question has the Project Admin role and has been granted the Register Tool Adapter permission (as well as all of its sub-permissions). (checked this after seeing another posting mention it as a possibility)

7. I tested it under a second user account with the Test Team Member role and Register Tool Adapter permission and got a 403 Forbidden with that user too.

8. Our server admins could see nothing in the server-side logs involving my 403 errors.

Hopefully this copy of what the OSLC4J code is posting doesn't get mangled.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:oslc="http://open-services.net/ns/core#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:j.0="http://jazz.net/ns/auto/rqm#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >
  <rdf:Description rdf:nodeID="A0">
    <rdf:type rdf:resource="http://jazz.net/ns/auto/rqm#AutomationAdapter"/>
    <j.0:macAddress>AA:BB:CC:DD:EE:FF</j.0:macAddress>
    <j.0:fullyQualifiedDomainName>automationthingy.automation.example.com</j.0:fullyQualifiedDomainName>
    <dcterms:description rdf:parseType="Literal">RQM Adapter that passes execution requests to the Automation Thingy</dcterms:description>
    <j.0:pollingInterval rdf:datatype="http://www.w3.org/2001/XMLSchema#int">120</j.0:pollingInterval>
    <dcterms:type>com.example.automationthingy.model.RunConfig</dcterms:type>
    <j.0:capability>EXECUTE</j.0:capability>
    <dcterms:title rdf:parseType="Literal">Automation Thingy Adapter</dcterms:title>
    <j.0:hostname>automationthingy</j.0:hostname>
    <j.0:ipAddress>192.168.1.1</j.0:ipAddress>
  </rdf:Description>
</rdf:RDF>


And here's the response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="https://rqm.example.com:9443/qm/web/com.ibm.rqm.oslc.web/ui/internal/style/ErrorStyle.xsl"?>
<rdf:RDF xmlns:jproc="http://jazz.net/xmlns/prod/jazz/process/1.0/" xmlns:oslc_qm="http://open-services.net/ns/qm#" xmlns:ns6="http://open-services.net/xmlns/qm/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oslc_disc="http://open-services.net/xmlns/discovery/1.0/" xmlns:jpres="http://jazz.net/xmlns/prod/jazz/presentation/1.0/" xmlns:oslc="http://open-services.net/ns/core#" xmlns:rqm_qm="http://jazz.net/ns/qm/rqm#" xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <oslc:Error ns12:type="oslc:Error" xmlns:ns12="http://www.w3.org/2001/XMLSchema-instance">
        <oslc:statusCode>403</oslc:statusCode>
        <oslc:message>AQXCM5007E You do not have permission to run the HTTP operation, POST, at this URL: https://rqm.example.com:9443/qm/oslc_auto_test/contexts/_-NMhPWhkEeGTMtCZWt_3KQ/resources/com.ibm.rqm.execution.ToolAdapter. </oslc:message>
        <oslc:extendedError>
            <oslc:ExtendedError>
                <oslc:moreInfo rdf:resource="https://rqm.example.com:9443/clmhelp/topic/com.ibm.messages.CLMic/AQXCM5007E.html"/>
                <oslc:rel>alternate</oslc:rel>
            </oslc:ExtendedError>
        </oslc:extendedError>
        <rqm_qm:clientLocale>en-us</rqm_qm:clientLocale>
    </oslc:Error>
</rdf:RDF>

What's going on?

Are there other permissions besides Register Tool Adapter that a user needs to use OSLC automation adapters?

One answer



permanent link
Paul Slauenwhite (8.3k12) | answered Sep 03 '14, 9:23 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Please see https://jazz.net/wiki/bin/view/Main/RqmOslcQmV2Api#Permissions.  You need will need POST permissions for the com.ibm.rqm.execution.ToolAdapter resource type.

Comments
Michael Freeman commented Sep 03 '14, 9:28 a.m.

What's the friendly name of "com.ibm.rqm.execution.ToolAdapter" (what would it be called in the RQM web interface)? 


Paul Slauenwhite commented Sep 03 '14, 10:01 a.m. | edited Sep 03 '14, 10:03 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Register Tool Adapter/Register and Register Tool Adapter/Edit.


Michael Freeman commented Sep 03 '14, 11:06 a.m. | edited Sep 03 '14, 11:07 a.m.

The account in question already had a green "Permitted" checkmark by both permissions and it didn't work.


Michael Freeman commented Sep 03 '14, 1:15 p.m.

I just now tried revoking those permissions, hitting save, granting the permissions, hitting save, and testing...still didn't work. HTTP 403 forbidden.


Paul Slauenwhite commented Sep 04 '14, 10:44 a.m. | edited Sep 04 '14, 10:45 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Wondering if your project area UUID is referencing a different project area, which you don't have permissions.  Alternatively, do you have the correct license (see https://jazz.net/wiki/bin/view/Main/RqmOslcQmV2Api#Licenses)?

I tried your RDF/XML (I edited your comment to copy the RDF/XML) but changed the adapter type to com.ibm.rqm.adapter.commandline and the POST request (using Firefox's HTTP Requester plug-in) returned 201 (Created).  Can you try the same?


Michael Freeman commented Sep 04 '14, 12:18 p.m.
Just saw your reply. 

I think I got it working...read on for details.

Yesterday afternoon I logged in to RQM as the account in question and I tried a manual test HTTP POST using Firefox + Poster and saw “AQXCA5009E You do not have the required permissions to change the project area catalog.” appear in my browser pretty much as soon as I did so.
To me, it appears that the issue mentioned in the other jazz.net post may not have been resolved completely.

<o:p> </o:p>




 


Michael Freeman commented Sep 04 '14, 12:18 p.m.

 Part 2 - ran out of space in the comment.


After searching for AQXCA5009E online, I found this other jazz.net post: https://jazz.net/forum/questions/150950/rqm-does-rqm-loadruner-adaptor-site-adapter-require-a-jazzadmins-repository-permission-for-the-initial-use-only

I asked our server admins to grant JazzProjectAdmin repository privileges to one account - and once they did, the adapter registered successfully. I then tried to connect with the adapter using an account that did not have JazzProjectAdmin privileges and it connected and was able to send heartbeat pings successfully.


Michael Freeman commented Sep 04 '14, 12:19 p.m.

 Part 3- ran out of space again.



In short, the issue mentioned in the other jazz.net posting may still exist in some form in RQM 5.0.

This was the work item mentioned:

https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.viewWorkItem&id=79790


Paul Slauenwhite commented Sep 04 '14, 12:54 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Thanks Michael for the follow-up.  I've opened Custom automation adapter gets 403 on registration. (122857) to address this issue.

showing 5 of 9 show 4 more comments

Your answer


Register or to post your answer.