Custom automation adapter gets 403 on registration
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?
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
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
showing 5 of 9
show 4 more comments