GeoServer with Data Security and OpenLayers

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

GeoServer with Data Security and OpenLayers

bumbala
Dear all,

I developing a simple web app using GeoServer as server and OpenLayers as client with JavaScript. Previously, I set up my layers etc in GeoServer and displayed them using OpenLayers successfully. Now I want to add some security to my app. So, I opened GeoServer and defined some users and roles in order to prevent my data to be accessed anonymously. Everything is ok, ppl can't see any layers without logging in.

However, on OpenLayers side, I couldn't succeed in logging to GeoServer WMS/WFS services with the appropriate credentials. Searching the web, I heard about the GeoServer Proxy Extension. Downloaded, copied to the WEB-INF/lib directory and restarted GeoServer. Now I can see the Proxy Admin Page. I tried "http://[MY SERVER URL]/geoserver/rest/proxy?url=http://www.google.com" and it's working, but I can't seem to connect my WMS/WFS services through this proxy. I am using the following format:

http://[MY SERVER URL]/geoserver/rest/proxy?url=http://localhost:8080/geoserver/wms

What is the best way to consume WMS/WFS services with Data Security from JavaScript ?

(I am investigating this for two days and going crazy :) )
Thanks in advance...