[GeoNetwork-devel] CSW GetRecordById Operation not allowed

Hi

The GetRecordById if provided the uuid of a non existing metadata it returns an empty response.

But if provided the uuid of a metadata not allowed to the user it returns:

<ows:ExceptionReport xmlns:ows=“http://www.opengis.net/ows” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” version="1.0.0"xsi:schemaLocation=“http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd”>

<ows:Exception exceptionCode=“NoApplicableCode”>

ows:ExceptionTextOperationNotAllowedEx : Operation not allowed</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>


Would not be better to return an empty response also, the error returned looks pretty confusing.

Looks fine if we change it?

Regards,
Jose García

···

GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net

Jose: good question. The empty response articulates that the resource does not exist. In this case, the resource does exist, but the client is not allowed to view it. I would lean towards throwing an exception. In the case of permissions changing along the lifecycle, at least the exception tells the client the resource never went away, it's permissions changed. Then again, this may or may not be a security issue telling a client that something is there, they just can't see it.

Maybe a clearer exception report?

-----Original Message-----
From: Jose Garcia [mailto:jose.garcia@anonymised.com]
Sent: Fri 31-Oct-14 04:18
To: Devel geonetwork-devel@lists.sourceforge.net
Subject: [GeoNetwork-devel] CSW GetRecordById Operation not allowed

Hi

The GetRecordById if provided the uuid of a non existing metadata it
returns an empty response.

But if provided the uuid of a metadata not allowed to the user it returns:

<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows&quot; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance&quot; version="1.0.0"xsi:schemaLocation
="http://www.opengis.net/ows
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd&quot;&gt;
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>OperationNotAllowedEx : Operation not allowed
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

*Would not be better to return an empty response also, the error returned
looks pretty confusing. Looks fine if we change it?Regards,Jose García*

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on
GeoServer and GeoNetwork. Visit http://geocat.net/&gt; for
details. _________________________Jose GarcíaGeoCat bvVeenderweg 136721 WD
BennekomThe Netherlandshttp://GeoCat.net/>*