Hi Ben,
You need to have at least GeoTools commit 18c64327f9c30e7b92bb7125bd4df573c4627ffb which is on the master branch (version 24-SNAPSHOT) And since this was not backported yet you need to build/test geoserver 2.18-SNAPSHOT (master branch)

HTH, Mark


On 10-08-2020 02:12, Ben Kleywegt wrote:
Thanks Ian,

I tested it out today on the following build:

Unfortunately it did not work for me.  When creating a new WMTS source based on a MapBox WMTS URL I got the following error:

The URL I entered for the WMTS source name is below, with the real access token removed.

https://api.mapbox.com/styles/v1/mapbox/streets-v11/wmts?access_token=NOTTHEREALTOKENABCDEFG

Cheers,

Ben Kleywegt

Insight GIS

[email protected]

03 62345833

*From:*Ian Turton <[email protected]>
*Sent:* Saturday, 8 August 2020 1:25 AM
*To:* Rahkonen Jukka (MML) <[email protected]>
*Cc:* Ben Kleywegt <[email protected]>; Brad Hards <[email protected]>; geoserver-users <[email protected]> *Subject:* Re: [Geoserver-users] Automatic Uppercase of WMTS Query Parameters

OK I've applied a fix to master today - please test out tomorrow's nightly build and let me know if it works or not at https://osgeo-org.atlassian.net/browse/GEOT-6677

Ian

On Thu, 6 Aug 2020 at 13:36, Ian Turton <[email protected] <mailto:[email protected]>> wrote:

    Open an issue and assign it to me and I'll take a look when I get a
    chance.

    Ian

    On Thu, 6 Aug 2020 at 13:32, Rahkonen Jukka (MML)
    <[email protected]
    <mailto:[email protected]>> wrote:

        Hi,

        On the other hand, OGC specifications stating that keywords are
        case insensitive could be considered to mean only the keywords
        which belong to the specifications. In the http standard the
        keywords apparently are case sensitive
        
https://stackoverflow.com/questions/24699643/are-query-string-keys-case-sensitive.
        Therefore I feel that this issue might be a bug in GeoServer
        (and not only because we at the National Land Survey use
        “api-key” in a case sensitive manner).

        -Jukka Rahkonen-

        *Lähettäjä:*Ben Kleywegt <[email protected]
        <mailto:[email protected]>>
        *Lähetetty:* torstai 30. heinäkuuta 2020 2.34
        *Vastaanottaja:* Ian Turton <[email protected]
        <mailto:[email protected]>>; Brad Hards <[email protected]
        <mailto:[email protected]>>
        *Kopio:* geoserver-users <[email protected]
        <mailto:[email protected]>>
        *Aihe:* Re: [Geoserver-users] Automatic Uppercase of WMTS Query
        Parameters

        Thanks Ian,

        I suspected something like this might be the case.  Thanks, I
        believe you have answered my question and the behaviour is not a
        bug with Geoserver.

        Cheers,

        Ben Kleywegt

        *From:*Ian Turton <[email protected] <mailto:[email protected]>>
        *Sent:* Wednesday, 29 July 2020 5:37 PM
        *To:* Brad Hards <[email protected] <mailto:[email protected]>>
        *Cc:* Ben Kleywegt <[email protected]
        <mailto:[email protected]>>; geoserver-users
        <[email protected]
        <mailto:[email protected]>>
        *Subject:* Re: [Geoserver-users] Automatic Uppercase of WMTS
        Query Parameters

        I don't think that bug does relate to this - but the WMTS
        standard (like other OGC standards) mandates case insensitivity
        for keys in KVP requests, so to make life easy we uppercase them
        all when storing them (this makes finding duplicates and later
        lookups more efficient). So I would raise a bug with MapBox.

        You could add a patch to the GeoTools code to only uppercase
        "well known" parameter keys but I suspect that would break
        things down the chain with cascading too.

        Ian

        On Wed, 29 Jul 2020 at 05:55, Brad Hards <[email protected]
        <mailto:[email protected]>> wrote:

            I’m not 100% clear on what you are trying to do, but it
            looks like you are possibly trying WMTS cascading. That is,
            you are trying to use GeoServer as a WMTS client.

            If that is the case, you are probably hitting
            https://osgeo-org.atlassian.net/browse/GEOT-5999

            That was fixed more than two years ago in
            https://github.com/geotools/geotools/pull/1873

            It is probably a good idea to upgrade in any case – 2.12.0
            is well out of support.

            Brad

            *From:*Ben Kleywegt <[email protected]
            <mailto:[email protected]>>
            *Sent:* Wednesday, 29 July 2020 10:13 AM
            *To:* [email protected]
            <mailto:[email protected]>
            *Subject:* [Geoserver-users] Automatic Uppercase of WMTS
            Query Parameters

            Hello,

            I have encountered an issue relating to the automatic
            uppercasing of WMTS query parameters in WMTS stores.

            I am using Geoserver 2.12.0 in docker on Linux.

            The problem is that some WMTS services are case sensitive to
            the query parameters, the case in point being MapBox WMTS
            (https://docs.mapbox.com/help/tutorials/mapbox-arcgis-qgis/).

            If I go to the following URL with a valid access token I can
            see a GetCapabilities XML page:
https://api.mapbox.com/styles/v1/mapbox/streets-v11/wmts?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. However, if I go to the same page with an uppercase
            ACCESS_TOKEN query parameter it returns a 401 unauthorised
            error.

            When I enter the valid URL in a Geoserver WMTS store
            Capabilities URL field and save the store I get an error saying:

            Server returned HTTP error code 401 for URL
            
https://api.mapbox.com/styles/v1/mapbox/streets-v11/wmts?REQUEST=GetCapabilities&ACCESS_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&VERSION=1.0.0&SERVICE=WMTS

            Notice that the URL has a few extra query parameters and the
            access_token parameter is now uppercase.

            Is there a reason the existing query parameters in the WMTS
            GetCapabillities URL are converted to uppercase?  Given that
            it appears that this behaviour is disallowing users to
            create stores from MapBox WMTS URLs, should this be
            classified as a bug?

            Cheers,

            Ben Kleywegt

            _______________________________________________
            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]
            <mailto:[email protected]>
            https://lists.sourceforge.net/lists/listinfo/geoserver-users


--
        Ian Turton


--
    Ian Turton


--

Ian Turton



_______________________________________________
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




_______________________________________________
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

Reply via email to