Hi all, I would like to ask you if you can give me an idea to solve the problem I have with my Goeserver 2.2.1 deployed on Tomcat 6.0.36 on port 80. I have some problems with requests to Geoserver wms.
When running an Openlayers application that ask for wms layer on this server I receive an alert asking me to signin with the following message:
“A username and password are required to http://My-address. The site reports: ‘GeoServer Realm’”
My-address is local address and I access via VPN because it runs on an internal network.
If I insert correct geoserver user credentials, the server keeps on asking for username and password once for each requested layer. After I have correctly inserted the credentials it works like a charm.
Does it depend on Geoserver configuration?
I tried to change data/security/config.xml configuration adding:
anonymous
It does not ask for credential but I get pink tiles and if I ask directly for the wms request I got this error:
HTTP Status 500 - Request processing failed; nested exception is org.springframework.security.access.AccessDeniedException: Cannot access WMS.GetMap with the current privileges
type Exception report
message Request processing failed; nested exception is org.springframework.security.access.AccessDeniedException: Cannot access WMS.GetMap with the current privileges
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.security.access.AccessDeniedException: Cannot access WMS.GetMap with the current privileges
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:97)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
root cause
org.springframework.security.access.AccessDeniedException: Cannot access WMS.GetMap with the current privileges
org.geoserver.security.OperationSecurityCallback.operationDispatched(OperationSecurityCallback.java:83)
org.geoserver.ows.Dispatcher.fireOperationDispatchedCallback(Dispatcher.java:727)
org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:722)
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:263)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:97)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
Does it maybe depend on Tomcat configuration?
I tried to look at tomcat-users.xml but couldn’t find a solution.
Do you have any suggestion for some test?
Thank you in advance,
Federica
Do you send the Authorization header attribute (needed for basic authentication) with each request ?
Zitat von Federica De Martin <fdemartin@anonymised.com>:
Hi all, I would like to ask you if you can give me an idea to solve the
problem I have with my Goeserver 2.2.1 deployed on Tomcat 6.0.36 on
port 80. I have some problems with requests to Geoserver wms.
When running an Openlayers application that ask for wms layer on this
server I receive an alert asking me to signin with the following
message:
"A username and password are required to http://My-address. The site
reports: 'GeoServer Realm'"
My-address is local address and I access via VPN because it runs on an
internal network.
If I insert correct geoserver user credentials, the server keeps on
asking for username and password once for each requested layer. After I
have correctly inserted the credentials it works like a charm.
Does it depend on Geoserver configuration?
I tried to change data/security/config.xml configuration adding:
/ <filters name="wms" path="/wms/**">//
// <filter>anonymous</filter>//
// </filters>/
It does not ask for credential but I get pink tiles and if I ask
directly for the wms request I got this error:
HTTP Status 500 - Request processing failed; nested exception is
org.springframework.security.access.AccessDeniedException: Cannot
access WMS.GetMap with the current privileges
type Exception report
message Request processing failed; nested exception is
org.springframework.security.access.AccessDeniedException: Cannot
access WMS.GetMap with the current privileges
description The server encountered an internal error that prevented it
from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Request processing
failed; nested exception is
org.springframework.security.access.AccessDeniedException: Cannot
access WMS.GetMap with the current privileges
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:97)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
root cause
org.springframework.security.access.AccessDeniedException: Cannot
access WMS.GetMap with the current privileges
org.geoserver.security.OperationSecurityCallback.operationDispatched(OperationSecurityCallback.java:83)
org.geoserver.ows.Dispatcher.fireOperationDispatchedCallback(Dispatcher.java:727)
org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:722)
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:263)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:97)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
Does it maybe depend on Tomcat configuration?
I tried to look at tomcat-users.xml but couldn't find a solution.
Do you have any suggestion for some test?
Thank you in advance,
Federica
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Hi, thank you for the answer.
I have tried to make the request to the address:
http://user:pass@anonymised.com/geoserver/wms
but I recieve an error about the malformed url with firefox but it seems to
work with chrome.
But I don't know why I have to use this syntax even if the layers are public
and I can navigate to them with the Layer preview in Geoserver... does it
maybe depends on some configuration?
And If I have to use this syntax, do you know how is it possible to make
Openlayers 2.12 build the correct request? ...without using plain
credential?
Thank you again,
Federica
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Avoid-GeoServer-Realm-authentication-on-WMS-requests-tp5028376p5028702.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Hi Federica
The syntax used in
http://user:pass@anonymised.com/geoserver/wms
is not an official one, some browsers support it, some not.
For public layers you do not have to use this syntax.
Concerning open layers, look at this thread
http://osgeo-org.1560.n6.nabble.com/Load-GeoServer-WMS-secured-layers-with-OpenLayers-td3919938.html
Christian
Zitat von "fdemartin@anonymised.com" <fdemartin@anonymised.com>:
Hi, thank you for the answer.
I have tried to make the request to the address:
http://user:pass@anonymised.com/geoserver/wms
but I recieve an error about the malformed url with firefox but it seems to
work with chrome.
But I don't know why I have to use this syntax even if the layers are public
and I can navigate to them with the Layer preview in Geoserver... does it
maybe depends on some configuration?
And If I have to use this syntax, do you know how is it possible to make
Openlayers 2.12 build the correct request? ...without using plain
credential?
Thank you again,
Federica
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Avoid-GeoServer-Realm-authentication-on-WMS-requests-tp5028376p5028702.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.