Re: [Geoserver-users] Authenticate WFS-T

2019-04-15 Thread Humphries, Graham (StateGrowth)
Hi Vera,

To allow CORS in Tomcat add the following to the bottom of the web.xml file in 
the $TOMCAT_HOME/conf directory
 
 CorsFilter
 org.apache.catalina.filters.CorsFilter
 
 cors.allowed.origins
 *
 
 
 
 CorsFilter
 /*
 

Hope this helps.

Graham

From: Vera Green [mailto:vera.green...@gmail.com]
Sent: Tuesday, 16 April 2019 7:25 AM
To: Eric Plassot 
Cc: GeoServer Mailing List List 
Subject: Re: [Geoserver-users] Authenticate WFS-T

I managed to get the authentication to work as well.  Perhaps you could share 
how you did it for future reference.
From leaflet I used ajax as per one of the links I provided:

//this option uses the leaflet.wms.js plugin: 
https://github.com/heigeo/leaflet.wms

var options_l = {'transparent': true,'tiled': true,'format': 
'image/png'};
var source_l = 
L.WMS.source("https://your_server:8080/geoserver/wms?;, options_l);

var  myLayer  = source_l.getLayer(' myLayer  ');// Get the layer
// myLayer  .addTo(map);  //Optionally add the layer to the map
layerControl.addOverlay( myLayer, " My Layer "); //Optionally 
add the layer to the layer control - object must exist.

// Assuming myLayer **WITHOUT** user:pass in the url
// The result is that when the request is first made a login window is 
initiated allowing the user to authenticate into GeoServer.
/*
$.ajax({
url:  myLayer.url,
data:  myLayer.params,
method: 'GET',
error: function(jqXHR, textStatus, errorThrown){
// Handle not authorised here
alert("Could not authorise!");
},
success: function(){
alert("Authorised!");
// Yuppiee!
//map.addLayer(myLayer);// The browser will set up 
the
  // authentication in the 
request for you
}

});  */

I am not certain exactly how this functions because after the initial login the 
credentials seam to be saved somewhere even when the page is reloaded and even 
when the browser is re-started.  I would like to understand where the 
credentials are stored.

Now I am trying to enable CORES on tomcat as the next issue is a "No 
'Access-Control-Allow-Origin' header is present on the requested resource." 
error.
https://server.boundlessgeo.com/docs/latest/sysadmin/cors/index.html

Cheers,
Vera

On Mon, Apr 15, 2019 at 2:56 PM Eric Plassot 
mailto:e.plas...@laposte.net>> wrote:

hello
I finally managed to authenticate myself
now it's the content of the query that does not pass :
org.geoserver.wfs.WFSException: Error performing insert: Error inserting 
features
Yet I try to replicate the examples
Le 15/04/2019 à 00:05, Vera Green a écrit :
I have the same problem with leaflet and WMS. Same setup with data in 
postgreSQL, basic authentication and the Catalog Mode set to Challenge which I 
have read is required.
This related post suggest the authentication should be "handled automatically" 
but this does not occur:
https://gis.stackexchange.com/questions/227553/geoserver-rest-authentication-form
 

this post suggests using the fetch API although personally I was not able to 
implement this:
https://gis.stackexchange.com/questions/284954/how-to-authenticate-wfs-requests-being-made-to-geoserver-through-openlayers-appl/285069
This post is also related:
https://stackoverflow.com/questions/51758817/how-to-authorize-accessing-the-geoserver-layers
And then there is also this post:
https://gis.stackexchange.com/questions/86790/authentication-in-geoserver-2-4-x-from-a-web-application/97448#97448
Despite of this I am still unable to establish the link between GeoServer and 
Leaflet receiving the 401 error.  Note that if I am already logged into 
GeoSever then the WMS layer works fine, therefore I am confident that 
establishing JavaScript or ajax based method to authenticate the user into 
GeoServer at the beginning of the session is the solution.  However I am still 
unsure about how to do this.
Vera
On Sun, Apr 14, 2019, 1:36 PM Eric Plassot via Geoserver-users 
mailto:geoserver-users@lists.sourceforge.net>>
 wrote:

Hello
I have a layer cite: administration that is linked to a POSTGRESQL database and 
I can not configure a wfs-t authentication. My query in openlayers always gives 
error 401 and in geoserver log 'Failed login'
The request is
http://www.opengis.net/wfs; xmlns: cite = 
"http://www.opengeospatial.net/cite; xmlns: 
gml = "http://www.opengis.net/gml; xmlns: xsi = 

Re: [Geoserver-users] Authenticate WFS-T

2019-04-15 Thread Vera Green
I managed to get the authentication to work as well.  Perhaps you could
share how you did it for future reference.
>From leaflet I used ajax as per one of the links I provided:

//this option uses the leaflet.wms.js plugin:
https://github.com/heigeo/leaflet.wms


var options_l = {'transparent': true,'tiled':
true,'format': 'image/png'};

var source_l = L.WMS.source("
https://your_server:8080/geoserver/wms?;, options_l);



var  myLayer  = source_l.getLayer(' myLayer  ');// Get the
layer

// myLayer  .addTo(map);  //Optionally add the layer to the
map

layerControl.addOverlay( myLayer, " My Layer ");
//Optionally add the layer to the layer control - object must exist.


// Assuming myLayer **WITHOUT** user:pass in the url

// The result is that when the request is first made a login window is
initiated allowing the user to authenticate into GeoServer.

/*

$.ajax({

url:  myLayer.url,

data:  myLayer.params,

method: 'GET',

error: function(jqXHR, textStatus, errorThrown){

// Handle not authorised here

alert("Could not authorise!");

},

success: function(){

alert("Authorised!");

// Yuppiee!

//map.addLayer(myLayer);// The browser will set
up the

  // authentication in the
request for you

}


});  */

I am not certain exactly how this functions because after the initial login
the credentials seam to be saved somewhere even when the page is reloaded
and even when the browser is re-started.  I would like to understand where
the credentials are stored.

Now I am trying to enable CORES on tomcat as the next issue is a "No
'Access-Control-Allow-Origin' header is present on the requested resource."
error.
https://server.boundlessgeo.com/docs/latest/sysadmin/cors/index.html

Cheers,
Vera

On Mon, Apr 15, 2019 at 2:56 PM Eric Plassot  wrote:

> hello
> I finally managed to authenticate myself
> now it's the content of the query that does not pass :
> org.geoserver.wfs.WFSException: Error performing insert: Error inserting
> features
> Yet I try to replicate the examples
> Le 15/04/2019 à 00:05, Vera Green a écrit :
>
> I have the same problem with leaflet and WMS. Same setup with data in
> postgreSQL, basic authentication and the Catalog Mode set to Challenge
> which I have read is required.
> This related post suggest the authentication should be "handled
> automatically" but this does not occur:
>
> https://gis.stackexchange.com/questions/227553/geoserver-rest-authentication-form
> 
> this post suggests using the fetch API although personally I was not able
> to implement this:
>
> https://gis.stackexchange.com/questions/284954/how-to-authenticate-wfs-requests-being-made-to-geoserver-through-openlayers-appl/285069
> This post is also related:
>
> https://stackoverflow.com/questions/51758817/how-to-authorize-accessing-the-geoserver-layers
> And then there is also this post:
>
> https://gis.stackexchange.com/questions/86790/authentication-in-geoserver-2-4-x-from-a-web-application/97448#97448
> Despite of this I am still unable to establish the link between GeoServer
> and Leaflet receiving the 401 error.  Note that if I am already logged into
> GeoSever then the WMS layer works fine, therefore I am confident that
> establishing JavaScript or ajax based method to authenticate the user into
> GeoServer at the beginning of the session is the solution.  However I am
> still unsure about how to do this.
> Vera
>
> On Sun, Apr 14, 2019, 1:36 PM Eric Plassot via Geoserver-users <
> geoserver-users@lists.sourceforge.net> wrote:
>
>> Hello
>> I have a layer cite: administration that is linked to a POSTGRESQL
>> database and I can not configure a wfs-t authentication. My query in
>> openlayers always gives error 401 and in geoserver log 'Failed login'
>> The request is
>> > "http://www.opengis.net/wfs;  xmlns: cite =
>> "http://www.opengeospatial.net/cite; 
>> xmlns: gml = "http://www.opengis.net/gml; 
>> xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance;
>>  xsi: schemaLocation = "http:
>> //www.opengis .net / wfs
>> http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd
>> http://www.opengeospatial.net/cite http://ip_adress:8080/geoserver/wfs/
>> DescribeFeatureType? Typename = cite: administration ">  <
>> cite: administration>  http://www.opengis.net/gml "srsName =" EPSG: 2154 " 
>>   > srsName = "EPSG: 2154">  793236.2285561005
>> 5401066.196149358 

[Geoserver-users] Hazelcast clustering

2019-04-15 Thread Jason Cradit
Hello - I've been looking into clustering and would like to follow the
Hazelcast approach instead of the JMS.  However, I'm striking out finding
the installation.  I don't see it in the community modules.

Any guidance on finding the download for it?

Thanks,
Jason
___
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


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


Re: [Geoserver-users] GeoServer should allow WMS to use dimension without units

2019-04-15 Thread Seib Jürgen
Dear Rayman,

OGC developed a "Best Practice for using Web Map Services (WMS) with 
Time-Dependent or Elevation-Dependent Data" 
(https://portal.opengeospatial.org/files/?artifact_id=56394) . This document 
requires that "Conformant WMS servers SHALL declare in each elevation dimension 
of the Capabilities document the attribute UNITS and assign it a CRS identifier 
specifying the vertical CRS. Elevation metric values SHALL be expressed in 
units of the CRS." (see page 26 of the best practice document)

Unfortunately, your external WMS server is not conformant to this OGC best 
practice. It is debatable whether GeoServer should allow the empty string for 
the 'units' attribute of an elevation dimension.

Kind regards,
Jürgen

---
Dr. Jürgen Seib
Deutscher Wetterdienst
TI1/K - IT-Koordination
Frankfurter Strasse 135
63067 Offenbach
Tel.: +496980622609
EMail: juergen.s...@dwd.de



-Ursprüngliche Nachricht-
Von: Rayman [mailto:touhouray...@gmail.com] 
Gesendet: Samstag, 13. April 2019 15:05
An: geoserver-users@lists.sourceforge.net
Betreff: [Geoserver-users] GeoServer should allow WMS to use dimension without 
units

Hi
I am using GeoServer to add a external WMS server, but it failed because
GeoServer throw below error 

13 Apr 18:37:49 ERROR [data.ows] - Failed to execute request
https://nomads.ncdc.noaa.gov/thredds/wms/gfs-004-anl/201809/20180916/gfsanl_4_20180916__000.grb2?REQUEST=GetCapabilities=1.3.0=WMS
13 Apr 18:38:24 ERROR [geotools.xml] - Dimension element contains no 'units'
attribute

The capabilities xml in above URL contains below dimension 



0.995


It has a empty units, but according to the Web Map Service Implementation
Specification Section
C.2(http://portal.opengeospatial.org/files/?artifact_id=14416),

/If the dimensional quantity has no units (e.g. band number in a
multi-wavelength sensor), use the null string:units=""./

so I think GeoServer should follow the Specification and allow using
dimension that has no units.




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


___
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


Geoserver-users@lists.sourceforge.net
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


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


Re: [Geoserver-users] GeoServer should allow WMS to use dimension without units

2019-04-15 Thread Andrea Aime
You should open a ticket with references on how to reproduce (an caps link
to an open server with the input would be useful).
Past that, check
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-fixes,-improvements-and-new-features-in-GeoServer

Cheers
Andrea

On Mon, Apr 15, 2019 at 4:08 PM Rayman  wrote:

> Hi
> I am using GeoServer to add a external WMS server, but it failed because
> GeoServer throw below error
>
> 13 Apr 18:37:49 ERROR [data.ows] - Failed to execute request
>
> https://nomads.ncdc.noaa.gov/thredds/wms/gfs-004-anl/201809/20180916/gfsanl_4_20180916__000.grb2?REQUEST=GetCapabilities=1.3.0=WMS
> 13 Apr 18:38:24 ERROR [geotools.xml] - Dimension element contains no
> 'units'
> attribute
>
> The capabilities xml in above URL contains below dimension
>
> 
>
> 0.995
> 
>
> It has a empty units, but according to the Web Map Service Implementation
> Specification Section
> C.2(http://portal.opengeospatial.org/files/?artifact_id=14416),
>
> /If the dimensional quantity has no units (e.g. band number in a
> multi-wavelength sensor), use the null string:units=""./
>
> so I think GeoServer should follow the Specification and allow using
> dimension that has no units.
>
>
>
>
> --
> Sent from:
> http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html
>
>
> ___
> 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
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 

Regards, Andrea Aime == GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime
@geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054
Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339
8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it
--- *Con riferimento
alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
circostanza inerente alla presente email (il suo contenuto, gli eventuali
allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
sarei comunque grato se potesse darmene notizia. This email is intended
only for the person or entity to which it is addressed and may contain
information that is privileged, confidential or otherwise protected from
disclosure. We remind that - as provided by European Regulation 2016/679
“GDPR” - copying, dissemination or use of this e-mail or the information
herein by anyone other than the intended recipient is prohibited. If you
have received this email by mistake, please notify us immediately by
telephone or e-mail.*
___
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


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


[Geoserver-users] GeoServer should allow WMS to use dimension without units

2019-04-15 Thread Rayman
Hi
I am using GeoServer to add a external WMS server, but it failed because
GeoServer throw below error 

13 Apr 18:37:49 ERROR [data.ows] - Failed to execute request
https://nomads.ncdc.noaa.gov/thredds/wms/gfs-004-anl/201809/20180916/gfsanl_4_20180916__000.grb2?REQUEST=GetCapabilities=1.3.0=WMS
13 Apr 18:38:24 ERROR [geotools.xml] - Dimension element contains no 'units'
attribute

The capabilities xml in above URL contains below dimension 



0.995


It has a empty units, but according to the Web Map Service Implementation
Specification Section
C.2(http://portal.opengeospatial.org/files/?artifact_id=14416),

/If the dimensional quantity has no units (e.g. band number in a
multi-wavelength sensor), use the null string:units=""./

so I think GeoServer should follow the Specification and allow using
dimension that has no units.




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


___
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


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