Setting up catalog mode as challenge in data security does not work correctly for insert and update transactions.
When setting up a write rule and catalog mode as challenge, the server does not send a 401 error for insert and update transactions. Instead it sends a 200 with a “InvalidParameterValue” exception code. For the delete transaction it works.
Example:
Url: http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=Transaction
Post content:
<Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<Update xmlns:cite="http://www.opengeospatial.net/cite" typeName="cite:test_layer">
<Property>
<Name>geom</Name>
<Value>
<Polygon xmlns="http://www.opengis.net/gml" srsName="urn:x-ogc:def:crs:EPSG:4326">
<exterior>
<LinearRing srsName="urn:x-ogc:def:crs:EPSG:4326">
<posList srsDimension="3">51.91127107388905 4.463865432685971 46.04273014049977 51.91124549388897 4.463875762683407 46.04272890929133 51.911239793888946 4.463838892692554 46.04272756911814 51.91126537388902 4.4638285526951185 46.042728800326586 51.91127107388905 4.463865432685971 46.04273014049977</posList>
</LinearRing>
</exterior>
</Polygon>
</Value>
</Property>
<Filter xmlns="http://www.opengis.net/ogc">
<FeatureId fid="test_layer.15" />
</Filter>
</Update>
</Transaction>
Server Response:
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" 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://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="InvalidParameterValue">
<ows:ExceptionText>Update error: Cannot access test_layer with the current privileges</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Thanks in advance!
|