geosolutions-it / nexus-geonode

Nexus Platform
BSD 2-Clause "Simplified" License
0 stars 4 forks source link

For Basic Auth geoserver host should be replaced with the geonode host #574

Closed giohappy closed 2 years ago

giohappy commented 2 years ago

@ricardogsilva I see that you're replacing /geoserver wtih /gs but keeping the same host. It's ok if Geoserver is served by the same host but there are cases where this cannot be assumed. It would be better to replace the geoserver host with the geonode's one.

ricardogsilva commented 2 years ago

@giohappy I agree that the current implementation is not very robust, but IMO a proper solution to this would be if the GeoNode API would return its service URLs already with the GeoNode proxy and without needing any modification.

That said, I can implement the change you mention here too, since it makes the current status of the plugin more robust

afabiani commented 2 years ago

@ricardogsilva if you query the OWS endpoint https://master.demo.geonode.org/api/ows_endpoints/ it should return the proxified OWS endpoints already... not sure this answer your question...

{
  "success": true,
  "data": [
    {
      "url": "https://master.demo.geonode.org/gs/ows?service=WMS&request=GetCapabilities&version=1.3.0&access_token=*********",
      "type": "OGC:WMS"
    },
    {
      "url": "https://master.demo.geonode.org/gs/ows?service=WCS&request=GetCapabilities&version=2.0.1&access_token=*********",
      "type": "OGC:WCS"
    },
    {
      "url": "https://master.demo.geonode.org/gs/ows?service=WFS&request=GetCapabilities&version=1.1.0&access_token=*********",
      "type": "OGC:WFS"
    },
    {
      "url": "https://master.demo.geonode.org/catalogue/csw?access_token=*********",
      "type": "OGC:CSW"
    },
    {
      "url": "https://master.demo.geonode.org/",
      "type": "WWW:LINK"
    }
  ]
}
giohappy commented 2 years ago

@ricardogsilva @afabiani for the moment I would hard code the reokacement. We can implement a "reflection" endpoint for api/v2 afterward. I wouldn't use the /api/ows_endpoints because:

ricardogsilva commented 2 years ago

OK, I will leave it hardcoded for the time being then

ricardogsilva commented 2 years ago

This is now implemented and has been included in version 0.9.5 of the plugin. I think we can close this issue