Custom automation adapter gets 403 on registration
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
Comments
What's the friendly name of "com.ibm.rqm.execution.ToolAdapter" (what would it be called in the RQM web interface)?
Register Tool Adapter/Register and Register Tool Adapter/Edit.
The account in question already had a green "Permitted" checkmark by both permissions and it didn't work.
I just now tried revoking those permissions, hitting save, granting the permissions, hitting save, and testing...still didn't work. HTTP 403 forbidden.
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?
<o:p> </o:p>
Part 2 - ran out of space in the comment.
Part 3- ran out of space again.
Thanks Michael for the follow-up. I've opened Custom automation adapter gets 403 on registration. (122857) to address this issue.