I have Geoserver 2.1.3 set up for WFS transaction. I am using basic authentification and I have set up the following:
- A role(ROLE_RMP_WFS)
- A user(user_rmp) which belongs to the role above
- Data security where rmp..w is set to the role above and rmp..r is set to *
- No service security
- Catalog mode config set to mixed
I can query the layer with WFS just fine.
However, doing a insert post transaction through OpenLayers with the URL _http://user_rmp:rmppassword@kart10utv.ad.skogoglandskap.no/geoserver_ekstern/wfs/ fails with the following message:
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows http://kart10utv:80/geoserver_ekstern/schemas/ows/1.0.0/owsExceptionReport.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows">
<ows:Exception exceptionCode="InvalidParameterValue">
<ows:ExceptionText>Error performing insert: Cannot access rmp_kartobjekt_flate_v with the current privileges</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
However, the object is inserted just fine running the same query in CURL: curl -vv --header "Content-Type:text/xml" -X POST -d @feature.xml _http://user_rmp:rmppassword@kart10utv.ad.skogoglandskap.no/geoserver_ekstern/wfs
The feature.xml is the same as the POST content: http://pastebin.com/yPwFb9g7
I do not understand why it works using CURL, but not working using a regular browser?