4

I have Geoserver and Geofence properly installed and configured. I have rules in place for different users and their access to various layers. HOWEVER, when I send a WFS request for a layer, how can I add authentication info for that user?

Ex: http://myserver:8080/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=rapid%3Aecologically_significant_areas&maxFeatures=200&outputFormat=text%2Fjavascript&format_options=callback%3A%20getJson&callback=getJson&_=1463949789269

I tried putting the authorization in a header to no avail. On the server logs I see the following when I make the request:

Requesting access for RuleFilter[user:""+ role:ANY inst:name+:default-gs ip:"---.---.---.---"+ serv:"WFS"+ req:"GETFEATURE"+ ws:"rapid"+ layer:"ecologically_significant_areas"+]

How do I tell Geofence which user to use?

2

That depends on the authentication filters setup in your GeoServer instance: http://docs.geoserver.org/latest/en/user/security/auth/index.html

If you have it configured as out of the box, you can add HTTP basic authentication headers: https://it.wikipedia.org/wiki/Basic_access_authentication

Of course, best use that only along with SSL encryption to protect the user credentials (HTTPS)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.