Get on oslc query base returns 403 Forbidden from DNG
I've received 4 oslc query bases from the services.xml document identified in the Service Provider catalog returned from DNG (6.0.6.1). Three of these query bases work without issue. The fourth one, against the project area, returns 403 Forbidden. The response body also contains - CRRRS1602W The operation is forbidden.
The administrator can only tell me that I have Author permission.
Has anyone else seen this issue? Am I doing something wrong?
Accepted answer
I think Ian got it. My request was missing the configuration. I added it to the request url and I did get a response; however, it took over an hour. I'm a bit confused since the other oslc query bases did not require a configuration and did return appropriate information. I has assumed these were going to my local configuration.
Comments
Hi Doug - if you don't specify a configuration for an opt-in (i.e. with configuration management enabled) project then usually you get the default configuration - e.g. for project xyz that's the initial configuration "xyz Initial Stream" in the component called xyz. I haven't tried doing the folder queries without configuration but I'd have expected these to work the same way - perhaps they don't. Anyway bottom line is you should always provide a configuration on any query that could be affected by configurations, as either a header Configuration.Context with the unencoded configuration URL, or as query parameter (in the full URL) &oslc_config.context=(encoded URL)
3 other answers
There could be a number of things that cause a 403 error. This error can mean that you have a wrong value in the query or in the headers of the REST call. One way to find out what is happening is to look in the rm.log file on the DNG server. There may be an error logged that will specify what is wrong.
The administrator said he "cleaned up LQE" and my query base request started working without issue.
Comments
Any idea what he cleaned up in LQE? What has this issue to do with LQE?
I don't know what he cleaned up, but it looks like the fix was only temporary. The 403 showed up again a few days later. Currently, using the same query base url, DNG is returning 400 with java.lang.NullPointerException in the detailed message. We've been having indexing issue. I wonder if this exception is related. But all the other query base url's work.
DOORS Next OSLC query doesn't go anywhere near LQE so no relation to LQE indexing. If DNG indexes are having problems then that could affect query.
There's an example of a full query URL in my answer to this question https://jazz.net/forum/questions/273866/how-to-create-a-oslc-query-to-download-a-artifact-of-type-document-in-dng
The error 403 I get so far only on querying the requirements collections.
We are not using configurations. Installed RM version is v6.0.6.1, iFix013.
'<host>/rm/oslc_rm/<projectid>/services.xml'. From there I use the following 3 OSLC queries:
curl -X GET -k -H 'OSLC-Core-Version: 2.0' -H 'Accept: application/rdf+xml' -i '<server>/rm/views?oslc.query=true&projectURL=<server>/rm/process/project-areas/<projectid>'
Hi Donat
This error indicates that the server has determined that you are not allowed access to the thing you've requested, either on purpose or due to a misconfiguration . It's probably because the site owner has limited access to it and you don't have permission to view it. The vast majority of the time, there's not much you can do to fix things on your (*client) end. There are four common causes for 403 Forbidden error (server side) . Here they are listed from most likely to least likely:
- An empty website directory
- No index page
- Incorrect settings in the .htaccess file
- Permission / Ownership error
Comments
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 27 '20, 9:54 a.m.You'll have to be a lot more specific to get any more help because there are very many ways of making a bad request. What were the oslc:resourceType entries in that query capability? What request (GET/POST/PUT/etc.) did you make? What headers did you add? What query did you add to the query base? Did you fully escape the query? What tool did you use to make the request?