Bug report #15597

In QGIS > =2.16.* loading of WFS layers with (Geoserver) authentication fails

Added by Giovanni Manghi about 8 years ago. Updated almost 8 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Alessandro Pasotti
Category:Web Services clients/WFS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:23520

Description

New description:

Start a Geoserver endpoint (tested with 2.7.4 and 2.9), load a couple of layers, one behind authentication and the other not.

Enable WFS.

Create the connection in QGIS >= 2.16 and enter the credentials.

Connect to the endpoint, as expected both layers are listed.

Try load the layer not protected > ok
Try load the layer protected > "
Layer geonode:XXX: Download of features for layer geonode:XXX failed or partially failed: Server generated an exception in GetFeature response: Feature type geonode:XXX unknown. You may attempt reloading the layer with F5"

This does not happen on LTR.

Old description:

Scenario: a Geonode/Geoserver instance with a few vector layers behind authentication via Geonode (I guess that could be basic http authentication).

In QGIS 2.16.* loading such layers results in:

Layer geonode:XXX: Download of features for layer geonode:XXX failed or partially failed: Server generated an exception in GetFeature response: Feature type geonode:XXX unknown. You may attempt reloading the layer with F5

on QGIS 2.14 and previous no issues.

Associated revisions

Revision 502a8da4
Added by Alessandro Pasotti almost 8 years ago

[bugfix] WFS-T Fixes #15597 #16043

Tested on GeoServer and QGIS Server

Needs forward port to master

Revision 93770b1c
Added by Alessandro Pasotti almost 8 years ago

Merge pull request #3989 from elpaso/wfst-200-fix-15597

[bugfix] WFS-T fixes #15597 #16043 geoserver compatibility

Revision 9324bdac
Added by Alessandro Pasotti almost 8 years ago

[bugfix] WFS-T Fixes #15597 #16043

This commit fixes a few bugs on WFS-T with
servers that support WFS-T > 1.0.0 when user
configure version != 1.0.0 ("auto" is the default).

It also fixes WFS-T multiple operations on GeoServer
when an insert operation is among them and the feature
store does not return generated feature ids for the
inserted features (i.e. shapefiles).

Tested on GeoServer and QGIS Server

(cherry-picked from 502a8da40380)

Revision 39a5f6a4
Added by Alessandro Pasotti almost 8 years ago

Merge pull request #3999 from elpaso/wfst-fixes-15597-16043

[bugfix] WFS-T Fixes #15597 #16043

History

#1 Updated by Even Rouault about 8 years ago

  • Status changed from Open to Feedback

Isn't that a duplicate of #15360, now fixed ?

#2 Updated by Giovanni Manghi about 8 years ago

Even Rouault wrote:

Isn't that a duplicate of #15360, now fixed ?

In what revision was this fixed? I just updated qgis master on osgeo4w (ee87dc3) and still the issue.

#3 Updated by Larry Shaffer about 8 years ago

Hi,

I have a PR for (maybe) fixing this:
https://github.com/qgis/QGIS/pull/3576

More specifically:
https://github.com/qgis/QGIS/pull/3576/commits/cd23455

It is also ready for master and release-2_16, which both required carefully addressing merge conflicts.
https://github.com/qgis/QGIS/pull/3577
https://github.com/dakcarto/QGIS/tree/release-2_16-ows-fixes

This is a follow up to Alessandro's work.

#4 Updated by Larry Shaffer about 8 years ago

Giovanni, do you mind compiling the fix and testing for your scenario (either master_2 or release-2_16-ows-fixes branches)?

#5 Updated by Giovanni Manghi about 8 years ago

Larry Shaffer wrote:

Giovanni, do you mind compiling the fix and testing for your scenario (either master_2 or release-2_16-ows-fixes branches)?

Hi Larry, I compiled your branch QGIS-release-2_16-ows-fixes.

It seems that the issue where the WFS client "forgets" the username is fixed.

I still see the problem in loading layers behind authentication, the use case is Geonode/Geoserver. On the same endpoint wfs layers that are not protected load fine.

#6 Updated by Larry Shaffer about 8 years ago

  • Subject changed from In QGIS > =2.16.* lading of WFS layers with authentication fails to In QGIS > =2.16.* loading of WFS layers with authentication fails

#7 Updated by Giovanni Manghi almost 8 years ago

  • Crashes QGIS or corrupts data changed from Yes to No
  • Affected QGIS version changed from master_2 to 2.16.3
  • Status changed from Feedback to Open

#8 Updated by Alessandro Pasotti almost 8 years ago

  • Assignee set to Alessandro Pasotti

OP reported that credentials has been entered directly and not using password manager

#9 Updated by Alessandro Pasotti almost 8 years ago

  • Status changed from Open to In Progress

Cannot reproduce with QGIS Desktop current master <-> QGIS Server current master + HTTP Basic auth plugin
Cannot reproduce with QGIS Desktop current master <-> GeoServer in suite 4.9 configured with HTTP Basic authentication

#10 Updated by Giovanni Manghi almost 8 years ago

  • Subject changed from In QGIS > =2.16.* loading of WFS layers with authentication fails to In QGIS > =2.16.* loading of WFS layers with (Geonode) authentication fails

Alessandro Pasotti wrote:

Cannot reproduce with QGIS Desktop current master <-> QGIS Server current master + HTTP Basic auth plugin
Cannot reproduce with QGIS Desktop current master <-> GeoServer in suite 4.9 configured with HTTP Basic authentication

it seems to be a Geonode thing only.

#11 Updated by Anonymous almost 8 years ago

  • Status changed from In Progress to Closed

#12 Updated by Giovanni Manghi almost 8 years ago

  • Status changed from Closed to Reopened

#13 Updated by Giovanni Manghi almost 8 years ago

  • Subject changed from In QGIS > =2.16.* loading of WFS layers with (Geonode) authentication fails to In QGIS > =2.16.* loading of WFS layers with (Geoserver) authentication fails
  • Affected QGIS version changed from 2.16.3 to master

Sorry for the confusion, it a problem that is visible using Geoserver authentication (that is used also by Geonode). Tested with Geoserver 2.7.4 and 2.9.

#14 Updated by Giovanni Manghi almost 8 years ago

  • Resolution set to fixed/implemented
  • Status changed from Reopened to Closed

fixed by #c80e5d131d676f7ee73b3a943d30c034aa33db5e

Also available in: Atom PDF