Hi, Thank you to everyone that’s chimed in here- it’s amazing to see the level of support that this program has!
I read through the comments and dug around a little bit. First, I can confirm that the workaround proposed by the open ticket (escaping all case sensitive text) still works. So as WMTS store urls, using Mapbox and MapTiler as an example: * https://api.mapbox.com/styles/v1/<username>/<Map >/wmts?access_token=<token> * Fails with a 401 Not Authorized * https://api.mapbox.com/styles/v1/<username>/<Map >/wmts?%61%63%63%65%73%73%5F%74%6F%6B%65%6E=<token> * Success! * https://api.maptiler.com/maps/topo/WMTSCapabilities.xml?key=<token> * Fails with timeout * https://api.maptiler.com/maps/topo/WMTSCapabilities.xml?%6B%65%79=<token> * Success! So it means that the issue is definitely with the capitalization. I’m not sure how important maintaining strict compliance with the official spec is for adding stores- spec deviations are always bad, but GeoServer is essentially acting as a client for the cascading capacity, which is a different role than the server aspects? If it’s worth forcing some values to remain the same as the input, the only two services I can easily find are Mapbox and MapTiler, so “access_token” and “key” would be the two terms. Alternatively, it might be worth updating the cascading documentation to alert users to this workaround? Thanks again for all the help, Alexander PhD. Candidate, Water Resources Engineering Department of Civil Engineering, Queen’s University Kingston ON, Canada K7L 3N6 Phone: 519-755-1728 Email: [email protected]<mailto:[email protected]> From: Jonathan Moules <[email protected]> Sent: Sunday, January 19, 2020 8:20 AM Cc: [email protected] Subject: Re: [Geoserver-users] Trying to connect to a remote WMS that insists on lower case parameter names I can confirm there are definitely a bunch of services out there where the REST keys are case sensitive. Unfortunately I can't check and see what the guilty software is right now. On 17/01/2020 08:40, Andrea Aime wrote: Hi Jody, thinking out loud, the OWS spec (that WMTS is based on) states that keys are case insensitive. So the Mapbox server is broken, but I see no need to uppercase the keys in the GeoTools code, just let them be whatever they are? Cheers Andrea On Fri, Jan 17, 2020 at 5:45 AM Jody Garnett <[email protected]><mailto:[email protected]> wrote: I am not aware of anyone working on this issue... Having a look myself (the geotools library is used for this interaction): AbstractRequest has the following <https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/data/ows/AbstractRequest.java#L155><https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeotools%2Fgeotools%2Fblob%2Fmaster%2Fmodules%2Flibrary%2Fmain%2Fsrc%2Fmain%2Fjava%2Forg%2Fgeotools%2Fdata%2Fows%2FAbstractRequest.java%23L155&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965586385&sdata=%2F%2B4sn9VX7DQ8jnE6LoVlPVhAtOW0trc02BWp1MbwPms%3D&reserved=0> : String value = (String) entry.getValue(); /* * Some servers do not follow the rule that parameter names * must be case insensitive. We will let each specification * implementation deal with it in their own way. */ String param = processKey((String) entry.getKey()); So some allowance has been made to be case insensitive or not... WMTSSpecification GetCapsRequest has this implemented <https://github.com/geotools/geotools/blob/master/modules/extension/wmts/src/main/java/org/geotools/ows/wmts/WMTSSpecification.java#L132><https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeotools%2Fgeotools%2Fblob%2Fmaster%2Fmodules%2Fextension%2Fwmts%2Fsrc%2Fmain%2Fjava%2Forg%2Fgeotools%2Fows%2Fwmts%2FWMTSSpecification.java%23L132&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965596380&sdata=%2Ftf9Zg2I%2B9eE%2BEz7BiWLC7G3dHybndJK53VRmq%2FutXE%3D&reserved=0> as: @Override protected String processKey(String key) { return WMTSSpecification.processKey(key); } WMTSSepcification forces everything uppercase <https://github.com/geotools/geotools/blob/master/modules/extension/wmts/src/main/java/org/geotools/ows/wmts/WMTSSpecification.java#L147><https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeotools%2Fgeotools%2Fblob%2Fmaster%2Fmodules%2Fextension%2Fwmts%2Fsrc%2Fmain%2Fjava%2Forg%2Fgeotools%2Fows%2Fwmts%2FWMTSSpecification.java%23L147&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965596380&sdata=jrkRTNQDzEJ8Qv5lV9yxjGnsqj9F8fH6%2F55wvf4or7c%3D&reserved=0> : public static String processKey(String key) { return key.trim().toUpperCase(); } So a minimal change would be to WMTS GetCapsRequest above: final Set<String> SPECIFICATION_PARAMETERS.containsKey; { Set<String> official = new HashSet<String>(); official.add("SERVICE"); official.add("VERSION"); official.add("REQUEST"); ... SPECIFICATION_PARAMETERS = Collections. unmodifiableSet(official); } protected String processKey(String key) { String key = key.trim(); if( SPECIFICATION_PARAMETERS.containsKey(key.toUpperCase()){ return WMTSSpecification.processKey(key); } else { return key; } } Do you want to collect the official list of parameters for above code snippet and we can try for a fix? On Thu, Jan 16, 2020 at 9:55 AM Alexander Rey <[email protected]><mailto:[email protected]> wrote: Hi, I was wondering if there’s been any movement on this issues since this was last raised. Mapbox is a really useful source of maps and provides a WMTS interface that could be cascaded, but since GeoServer forces the key name “access_key” to be uppercase, it fails the Mapbox api authentication. This doesn’t seem to be a very widespread issue, but has been raised elsewhere ( https://gis.stackexchange.com/questions/326612/auth-error-cascading-mapbox-wmts-with-geoserver<https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgis.stackexchange.com%2Fquestions%2F326612%2Fauth-error-cascading-mapbox-wmts-with-geoserver&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965606378&sdata=pFJRiYonZ%2BeslZUes3%2FDGyX24MVYfRQ0ygqSUvSmbWU%3D&reserved=0>). It also poses an issue when authenticating using the MapTiler service. I’m not sure how feasible a fix for this would be, but since the previous thread indicated it was possible, I thought I would follow up. Thanks, Alexander PhD. Candidate, Water Resources Engineering Department of Civil Engineering, Queen’s University Kingston ON, Canada K7L 3N6 Phone: 519-755-1728 Email: [email protected]<mailto:[email protected]> _______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ianturton.com%2Ftalks%2Ffoss4g.html%23%2F&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965606378&sdata=vKpg0T0h1JJrDBQhvH0R2PabmnS6W%2Fvg1%2BJhSLe3f94%3D&reserved=0> - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeoserver.org%2Fcomm%2Fuserlist-guidelines.html&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965616369&sdata=ZYmjf%2BpuR%2FceI13AJdFzP%2FfVgZCdfSNYaqJUMLIBnNs%3D&reserved=0> If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer<https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeoserver%2Fgeoserver%2Fwiki%2FSuccessfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965616369&sdata=O%2F10o9PmAFRX9pzE6Q2OIo4bSA8gsw%2Fk%2Bo4ik2onTjM%3D&reserved=0> [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/geoserver-users<https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fgeoserver-users&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965626359&sdata=ln1ArZdExptOisUGPybIugtDuxtuR1lSusvCKHED7sU%3D&reserved=0> _______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ianturton.com%2Ftalks%2Ffoss4g.html%23%2F&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965626359&sdata=XX7w7itcS4QFM46zoiNuxlLnVKaNzTDb0fA9cYu%2FRD0%3D&reserved=0> - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeoserver.org%2Fcomm%2Fuserlist-guidelines.html&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965636355&sdata=R2lC5W8T%2FfyKzt4URVFuAVjZbO9%2FRmw3Lbf6lZL03mg%3D&reserved=0> If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer<https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeoserver%2Fgeoserver%2Fwiki%2FSuccessfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965636355&sdata=2PYvlLFN8HPZR2jbBT2n7K3AfrYUfABwzz5B%2F1b4hWs%3D&reserved=0> [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/geoserver-users<https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fgeoserver-users&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965646348&sdata=r5zACr4IuP3qcZt8i12H%2B0ZXQBvpgHQYBJ%2BCmqlWWrg%3D&reserved=0> _______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ianturton.com%2Ftalks%2Ffoss4g.html%23%2F&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965646348&sdata=9x43nHhj%2B5W%2BIqxt%2BrfWDvTUekkiONmFG9LvftmfE2A%3D&reserved=0> - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeoserver.org%2Fcomm%2Fuserlist-guidelines.html&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965646348&sdata=pUYMEDFlHiJzjPVWa4FhZA5%2B9wDiL6P%2BA0XsqM6kP2A%3D&reserved=0> If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer<https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeoserver%2Fgeoserver%2Fwiki%2FSuccessfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965656343&sdata=0nWrKNvhvQpS%2FBzvDT1Fg9mh5Juhu7B0Sr2RDRf0TRA%3D&reserved=0> [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/geoserver-users<https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fgeoserver-users&data=02%7C01%7Calexander.rey%40queensu.ca%7C27235a5d7a124f1caafe08d79ce28161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C637150368965656343&sdata=G3xqIzQc%2FcNXybhewiplNLHzrBtdnnJqJLM8M0hO1zM%3D&reserved=0>
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
