c2cgeoportal icon indicating copy to clipboard operation
c2cgeoportal copied to clipboard

external http wms with https application

Open geoATbsPUNKTch opened this issue 6 years ago • 2 comments

Project:

  • GitHub URL: https://github.com/camptocamp/baselstadt_mapbs
  • Host: https://map.geo.bs.ch
  • GeoMapFish version: 2.2.2

Running command: `

  • Adding an external wms service (http://geowms.bl.ch/? in this case)

Result: The data is no displayed, an error is reported in the project_error.log

2018-05-15 15:02:15,242 ERROR [c2cgeoportal.views.proxy][Dummy-8] Error 'Unauthorized' in response of URL:
http://geowms.bl.ch/?CRS=EPSG%3A2056&SERVICE=WMS&FORMAT=image%2Fpng&SERVERTYPE=mapserver&STYLES=&WIDTH=2325&s_columns_bk=doc_profile+as+mapbs_bk_doc_profile%2C+doc_situation+as+mapbs_bk_doc_situation%2C+doc_picture+as+mapbs_bk_doc_picture&LAYERS=grundkarte_sw_group&user_id=3018&cache_version=d544c7d0156e4ce0ae0c15cd63f2d113&role_id=3018&s_ga=GA_GeologischerAtlas&TRANSPARENT=true&username=Intranet&s_sb=SB_Satellitenbilder&REQUEST=GetMap&s_sk=SK_LandeskartenSwisstopo&s_si=SI_Swissimage&HEIGHT=1349&s_lo=LO_KatasterLandkreisLoerrach&VERSION=1.3.0&BBOX=2618924.75%2C1262911.75%2C2620087.25%2C1263586.25&s_columns_dm=adresse+as+dm_adresse%2C+hausnummerindex+as+dm_hausnummerindex&s_columns_intranet=0%2C1&ogcserver=source+for+http%3A%2F%2Fgeowms.bl.ch%2F%3F+image%2Fpng&s_bl=http%3A%2F%2Fgeowms.bl.ch%2F%3F.
2018-05-15 15:02:15,243 ERROR [c2cgeoportal.views.proxy][Dummy-8] Status: 401
2018-05-15 15:02:15,243 ERROR [c2cgeoportal.views.proxy][Dummy-8] Method: GET
2018-05-15 15:02:15,243 ERROR [c2cgeoportal.views.proxy][Dummy-8] --- With headers ---
X-Forwarded-Server: map.geo.test.adminbs.ch
X-Forwarded-Host: map.geo.test.bs.ch
X-Https: on
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36
Connection: close
Referer: https://map.geo.test.bs.ch/ngeodesktop?lang=de&baselayer_ref=OF_BaselStadt2017Maerz&map_x=2619506&map_y=1263249&map_zoom=8&tree_groups=Kanton%20Basel-Landschaft%2CDeutschland%2CFrankreich&tree_group_layers_Kanton%20Basel-Landschaft=BL_WMS_AmtlicheVermessung&tree_group_layers_Deutschland=&tree_group_layers_Frankreich=
X-Forwarded-Proto: https
Cache-Control: no-cache
Accept: image/webp,image/apng,image/*,*/*;q=0.8
X-Forwarded-For: 10.84.105.147, 10.80.254.11
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4,lb;q=0.2
Front-End-Https: On
2018-05-15 15:02:15,243 ERROR [c2cgeoportal.views.proxy][Dummy-8] --- Return content ---
2018-05-15 15:02:15,243 ERROR [c2cgeoportal.views.proxy][Dummy-8] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>

If no direct error, result and expected result:

if the Application is called with http://map.geo.bs.ch the external wms is working as expected

The external wms in the admin tool: wmsbl

the mapserver map file: https://github.com/camptocamp/baselstadt_mapbs/blob/master/mapserver/include/BL_WMS.map.mako

geoATbsPUNKTch avatar May 15 '18 13:05 geoATbsPUNKTch

The first two line state that the WMS source used returns a "401 unauthorized".

2018-05-15 15:02:15,242 ERROR [c2cgeoportal.views.proxy][Dummy-8] Error 'Unauthorized' in response of URL:
http://geowms.bl.ch/?CRS=EPSG%3A2056&SERVICE=WMS&FORMAT=image%2Fpng&SERVERTYPE=mapserver&STYLES=&WIDTH=2325&s_columns_bk=doc_profile+as+mapbs_bk_doc_profile%2C+doc_situation+as+mapbs_bk_doc_situation%2C+doc_picture+as+mapbs_bk_doc_picture&LAYERS=grundkarte_sw_group&user_id=3018&cache_version=d544c7d0156e4ce0ae0c15cd63f2d113&role_id=3018&s_ga=GA_GeologischerAtlas&TRANSPARENT=true&username=Intranet&s_sb=SB_Satellitenbilder&REQUEST=GetMap&s_sk=SK_LandeskartenSwisstopo&s_si=SI_Swissimage&HEIGHT=1349&s_lo=LO_KatasterLandkreisLoerrach&VERSION=1.3.0&BBOX=2618924.75%2C1262911.75%2C2620087.25%2C1263586.25&s_columns_dm=adresse+as+dm_adresse%2C+hausnummerindex+as+dm_hausnummerindex&s_columns_intranet=0%2C1&ogcserver=source+for+http%3A%2F%2Fgeowms.bl.ch%2F%3F+image%2Fpng&s_bl=http%3A%2F%2Fgeowms.bl.ch%2F%3F.

You might want to verify that you transmit the (right) credentials or requests on this external wms are passing from the server.

eleu avatar May 15 '18 14:05 eleu

No credentials neede, it works when accessing the gmf with http:// and it works with https:// if the x-https and Front-End-Https Header are removed from the request

geoATbsPUNKTch avatar May 16 '18 08:05 geoATbsPUNKTch