Hi,

There seems to be a problem with the headerName / headerValue fields of a 
WMTStoreInfo object within Geoserver. I've looked through the Geotools side, 
and it doesn't look like the problem is on that side.

Looking at the code underneath ResourcePool.clone(WMTSStoreInfo) I see some 
weaknesses:
https://github.com/geoserver/geoserver/blob/4d664c27a1d8617e1cab7e9560bb855a2eb742c9/src/main/src/main/java/org/geoserver/catalog/ResourcePool.java#L2802
 
<https://github.com/geoserver/geoserver/blob/4d664c27a1d8617e1cab7e9560bb855a2eb742c9/src/main/src/main/java/org/geoserver/catalog/ResourcePool.java#L2802>

In the javadocs for SerializationUtils.clone it says: 
This is many times slower than writing clone methods by hand
on all objects in your object graph. However, for complex object
graphs, or for those that don't support deep cloning this can
be a simple alternative implementation.

Within the catch clause it seems like we're doing exactly that. Cloning the 
object by code, so why using SerializationUtils? What's missing is the 
headerName / headerValue, both within the catch block and the code thereafter. 
It would also be great to have a log-message saying that the SerializationUtils 
failed, and of what grounds.

I'm not totally sure this is the cause of the bug in Paul Wittle's original 
question, but it seems like a potential stumbling block.

Best regards,

Roar Brænden

> 5. feb. 2021 kl. 18:30 skrev Paul Wittle <[email protected]>:
> 
> Hi,
>  
> Thanks for getting back to me but yes it was the “HTTP header name”/ “HTTP 
> header value” options.
>  
> Thanks,
> Paul
>  
> From: Roar Brænden <[email protected]> 
> Sent: 04 February 2021 22:21
> To: Paul Wittle <[email protected]>
> Cc: [email protected]
> Subject: Re: [Geoserver-users] WMTS Cascade
>  
> Hi,
>  
> What version are you on? It could certainly be a bug you spotted there.
>  
> By "I use the HTTP header options" do you mean the Username / password 
> fields, or the "HTTP header name" / "HTTP header value"?
>  
> Regards,
>  
> Roar Brænden
> 
> 
> 4. feb. 2021 kl. 17:09 skrev Paul Wittle <[email protected] 
> <mailto:[email protected]>>:
>  
> Hi,
>  
> When trying to connect to a WMTS service using the cascade option I can 
> access the remote service if I put the authentication token into the URL but 
> it doesn’t work if I use the HTTP header options. However if you put it into 
> the URL it then doesn’t seem to be in the request URL’s when you try to 
> actually access the layer via GeoServer.
>  
> I set my logging to GEOTOOLS and found the request URL’s but the 
> authentication token is missing.  Is that a bug or am I doing something wrong?
>  
> Cheers,
> Paul
> This e-mail and any files transmitted with it are intended solely for the use 
> of the individual or entity to whom they are addressed. It may contain 
> unclassified but sensitive or protectively marked material and should be 
> handled accordingly. Unless you are the named addressee (or authorised to 
> receive it for the addressee) you may not copy or use it, or disclose it to 
> anyone else. If you have received this transmission in error please notify 
> the sender immediately. All traffic may be subject to recording and/or 
> monitoring in accordance with relevant legislation. Any views expressed in 
> this message are those of the individual sender, except where the sender 
> specifies and with authority, states them to be the views of Dorset Council. 
> Dorset Council does not accept service of documents by fax or other 
> electronic means. Virus checking: Whilst all reasonable steps have been taken 
> to ensure that this electronic communication and its attachments whether 
> encoded, encrypted or otherwise supplied are free from computer viruses, 
> Dorset Council accepts no liability in respect of any loss, cost, damage or 
> expense suffered as a result of accessing this message or any of its 
> attachments. For information on how Dorset Council processes your 
> information, please see www.dorsetcouncil.gov.uk/416433 
> <http://www.dorsetcouncil.gov.uk/416433> 
> _______________________________________________
> 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#/ 
> <http://www.ianturton.com/talks/foss4g.html#/>
> - The GeoServer user list posting guidelines: 
> http://geoserver.org/comm/userlist-guidelines.html 
> <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
>  
> <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 
> <https://lists.sourceforge.net/lists/listinfo/geoserver-users>
>  
> This e-mail and any files transmitted with it are intended solely for the use 
> of the individual or entity to whom they are addressed. It may contain 
> unclassified but sensitive or protectively marked material and should be 
> handled accordingly. Unless you are the named addressee (or authorised to 
> receive it for the addressee) you may not copy or use it, or disclose it to 
> anyone else. If you have received this transmission in error please notify 
> the sender immediately. All traffic may be subject to recording and/or 
> monitoring in accordance with relevant legislation. Any views expressed in 
> this message are those of the individual sender, except where the sender 
> specifies and with authority, states them to be the views of Dorset Council. 
> Dorset Council does not accept service of documents by fax or other 
> electronic means. Virus checking: Whilst all reasonable steps have been taken 
> to ensure that this electronic communication and its attachments whether 
> encoded, encrypted or otherwise supplied are free from computer viruses, 
> Dorset Council accepts no liability in respect of any loss, cost, damage or 
> expense suffered as a result of accessing this message or any of its 
> attachments. For information on how Dorset Council processes your 
> information, please see www.dorsetcouncil.gov.uk/416433 
> <http://www.dorsetcouncil.gov.uk/416433>
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to