<div dir="ltr"><div><div><div><div><div><div><div><div>Hi,<br><br></div>I have a GeoNode instance installed from packages in a Ubuntu 14.04 [1].<br><br></div>Authentication between GeoNode and GeoServer seems to be working; if I log into GeoNode and go to <a href="http://mygeonode/geoserver">http://mygeonode/geoserver</a> I am successfully logged in as the GeoNode user.<br><br></div>The problem comes when I try to download a map as an anonymous user: <a href="http://mygeonode/maps/976/download">http://mygeonode/maps/976/download</a>. <br><br>After clicking the download button and waiting a bit, I get a Basic HTTP auth dialog because of a 401 response from <a href="http://mygeonode/geoserver/rest/process/batchDownload/download/3">http://mygeonode/geoserver/rest/process/batchDownload/download/3</a><br><br></div><div>The map is configured for viewing and downloading by anyone and it works as expected if I'm logged into GeoNode.<br></div><br></div>I've seen that the rest filter chain in GeoServer uses the geonodeCookieFilter chain filter, which I think expects a valid "sessionid" cookie. That cookie is being sent in my anonymous requests together with csrftoken, both unexpired with path=/.<br><br></div>I tried to compare the behavior and requests with <a href="http://demo.geonode.org">demo.geonode.org</a> but <a href="http://demo.geonode.org/geoserver">http://demo.geonode.org/geoserver</a> is unresponsive right now.<br><br></div><div>Find here a section of geoserver.log in case it sheds some light:<br><br>2016-11-18 15:28:01,628 DEBUG [geoserver.security] - AuthenticationCache found an entry for basic, admin:bfa584f5598433a3c1fe16b00acc9c43<br>2016-11-18 15:28:01,628 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Converted URL to lowercase, from: '/rest/process/batchdownload/status/3'; to: '/rest/process/batchdownload/status/3'  and httpMethod= GET<br>2016-11-18 15:28:01,628 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [GET]<br>2016-11-18 15:28:01,628 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/process/batchdownload/status/3'; antPath is /**; matchedPath=true; matchedMethods=true<br>2016-11-18 15:28:01,628 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - returning ROLE_ADMINISTRATOR<br>2016-11-18 15:28:01,629 DEBUG [ows.OWSHandlerMapping] - No handler mapping found for [/rest/process/batchDownload/status/3]<br>2016-11-18 15:28:01,629 DEBUG [ows.OWSHandlerMapping] - No handler mapping found for [/rest/process/batchDownload/status/3]<br>2016-11-18 15:28:01,629 DEBUG [ows.OWSHandlerMapping] - No handler mapping found for [/rest/process/batchDownload/status/3]<br>2016-11-18 15:28:01,630 DEBUG [geoserver.filters] - Compressing output for mimetype: application/json;charset=ISO-8859-1<br>2016-11-18 15:28:01,630 DEBUG [filter.GeoServerSecurityContextPersistenceFilter$1] - SecurityContextHolder now cleared, as request processing completed<br>2016-11-18 15:28:01,775 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Converted URL to lowercase, from: '/rest/process/batchdownload/download/3'; to: '/rest/process/batchdownload/download/3'  and httpMethod= GET<br>2016-11-18 15:28:01,775 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [GET]<br>2016-11-18 15:28:01,775 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/process/batchdownload/download/3'; antPath is /**; matchedPath=true; matchedMethods=true<br>2016-11-18 15:28:01,775 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - returning ROLE_ADMINISTRATOR<br>2016-11-18 15:28:01,776 DEBUG [filter.GeoServerSecurityContextPersistenceFilter$1] - SecurityContextHolder now cleared, as request processing completed<br></div><div><br></div>Is this a bug? Misconfiguration in my instance? The expected behavior? <br><br></div>Thanks in advance.<br><div><div><div><div><div><div><div><div><div><br>[1] <a href="http://docs.geonode.org/en/master/tutorials/install_and_admin/quick_install.html#ubuntu">http://docs.geonode.org/en/master/tutorials/install_and_admin/quick_install.html#ubuntu</a><br><br><div><div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Víctor González<br></div><a href="http://geomati.co" target="_blank">http://geomati.co</a><br></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div>