[Geoserver-users] Constant 403 when trying to update feature types using REST

Hello,

How do you update the title and abstract of a feature type using REST?

I thought it used to work but I am now getting 403 whenever I use a PUT request. Do I have to include the full xml definition or just the elements I want to update?

new titlenew abstracttrue

Best Regards,

Paul

Judging by the documentation if you get a 403 it thinks you are changing the name or type of the featuretype, so I would assume you have to send everything.

Ian

···

On 11 August 2016 at 12:15, Paul Wittle <P.Wittle@anonymised.com> wrote:

Hello,

How do you update the title and abstract of a feature type using REST?

I thought it used to work but I am now getting 403 whenever I use a PUT request. Do I have to include the full xml definition or just the elements I want to update?

new titlenew abstracttrue

Best Regards,

Paul

“This e-mail is intended for the named addressee(s) only and may contain information about individuals or other sensitive information 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 email in error, kindly disregard the content of the message and notify the sender immediately. Please be aware that all email may be subject to recording and/or monitoring in accordance with relevant legislation.”


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev


Geoserver-users mailing list
Geoserver-users@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Ian Turton

Hi Paul,

Good to know it's working on 2.8.4.

2.9.1 is out, do you think you could upgrade and test your use case
there? Lots of goodies in the newest version!
See http://blog.geoserver.org/2016/05/30/geoserver-2-9-0-released/

Best,
Daniel

--
Daniel Araújo Miranda
Forensics Expert
Inteligeo - Geographic Intelligence
National Institute of Criminalistics
Brazilian Federal Police

Em 11/08/2016 11:00, Paul Wittle escreveu:

Hi Daniel,

Thank you for your message.

At present I think it is most likely related to the permissions. I have two versions running, 2.6.5 and 2.8.4; and interestingly it seems to be working on 2.8.4.

I wonder if it was a bug which has since been fixed?

Thanks,
Paul

-----Original Message-----
From: Daniel Araujo Miranda [mailto:miranda.dam@anonymised.com]
Sent: 11 August 2016 14:42
To: Paul Wittle
Subject: Re: Constant 403 when trying to update feature types using REST

Hi, Paul,
Please try putting all the new parameters in the PUT request.
Do a GET first, change what you need, then send all the parameters back using PUT.
I read sometime ago about this in this list. I searched for it but could not find the message.

I have not tried the above myself so I am replying straight to you.
If it works, please reply this e-mail to the list so everyone can see the solution.
If it does not work and you still get a 403 (are you sure your credentials are OK?), please tell me and I will test this.
I am planning on configuring the coverages for a massive image database using REST in the near future.

Best,
Daniel

Em 11/08/2016 08:15, Paul Wittle escreveu:

Hello,

How do you update the title and abstract of a feature type using REST?

I thought it used to work but I am now getting 403 whenever I use a
PUT request. Do I have to include the full xml definition or just the
elements I want to update?

<featureType><title>new title</title><abstract>new
abstract</abstract><enabled>true</enabled></featureType>

Best Regards,

Paul

"This e-mail is intended for the named addressee(s) only and may contain information about individuals or other sensitive information 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 email in error, kindly disregard the content of the message and notify the sender immediately. Please be aware that all email may be subject to recording and/or monitoring in accordance with relevant legislation."

Thanks Ian,

I think the issue may actually be that the Tomcat server had not been permitted to accept PUT requests whilst the others had.

I have updated the configuration files but now the GeoServer will not start.

I’m think this issue is unrelated as I think this is an issue with the configuration of the GeoWebCache now (probably unrelated). That said, I’m having trouble tracking down the offending setting. I’ve removed the gwc_layers folder temporarily and also the lock files and tmp folders in the gwc but still no luck.

Does anyone know which bit of the load up sequence could cause this message:

WARN [support.DisposableBeanAdapter] - Invocation of destroy method failed on bean with name ‘geoServerLoader’: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name ‘geoWebCacheExtensions’: Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

Thanks,

Paul

···

Judging by the documentation if you get a 403 it thinks you are changing the name or type of the featuretype, so I would assume you have to send everything.

Ian

On 11 August 2016 at 12:15, Paul Wittle <P.Wittle@…7193…> wrote:

Hello,

How do you update the title and abstract of a feature type using REST?

I thought it used to work but I am now getting 403 whenever I use a PUT request. Do I have to include the full xml definition or just the elements I want to update?

new titlenew abstracttrue

Best Regards,

Paul

“This e-mail is intended for the named addressee(s) only and may contain information about individuals or other sensitive information 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 email in error, kindly disregard the content of the message and notify the sender immediately. Please be aware that all email may be subject to recording and/or monitoring in accordance with relevant legislation.”


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Ian Turton