INSPIRE-MIF / helpdesk-validator

Community discussion forum for INSPIRE validation issues
42 stars 23 forks source link

Validator doesn't accept Redirects (HTTP status code 302, 303) in data theme tests #559

Closed hogredan closed 1 year ago

hogredan commented 3 years ago

In the German SDI, we use the national registry for referencing objects. A reference to the registry is made in the metadata, which then redirects to a GetFeatureById request. We use this concept to ensure persistence of IDs.

Example AdministrativeUnit (see attached file):

The object is accessible through the redirect and the registry correctly returns status code 302 in this case, but this is not accepted by the INSPIRE Validator (in this example Conformance Class Information accessibility, Administrative Units). See test report, test au.ia.b.4.

According to https://github.com/inspire-eu-validation/data-au#http-status-codes, redirects (status codes 301, 302 and 303) are not allowed because they are not supported by the OGC Web Services.

From our point of view, the statement "Redirects (status codes 301, 302, and 303) are in general not allowed as they are not supported by the OGC Web Service standards" is not correct.

For example, OGC API features allow HTTP status codes other than 200, see https://docs.ogc.org/is/17-069r3/17-069r3.html#_complete_definition.

Chapter 11.7.2 in the OGC Web Services Common Standard (https://portal.opengeospatial.org/files/?artifact_id=38867) specifies the following for handling HTTP status codes: "Clients should recognize and handle other HTTP status codes as well, e.g., HTTP redirect codes (301, 302, 307)."

The problem, in our view, is that data is being tested here, but the test implicitly assumes that the data is provided via a WFS.

In principle we would support that OGC WFS services should not respond with HTTP redirect, but in this case the registry responds with the redirect and not the WFS.

We kindly ask for an adjustment of all data theme tests so that redirects (HTTP status code 301, 302, 303) are accepted.

ghost commented 3 years ago

@carlospzurita Has this problem been solved in v2021.2 (15.06.2021)?

ghost commented 3 years ago

@carlospzurita Has this problem been solved in v2021.3 (16.09.2021)?

JohannaOtt commented 2 years ago

@carlospzurita Are there any plans to handle re-directs in the future? I have a similar issue validating datasets that use codelist entries from the German codelist register:

The validator is reporting

The property 'LandCoverClassValue' has a value 'https://registry.gdi-de.org/codelist/de.adv-online.inspire/LandCoverClassValue/1' that cannot be retrieved using HTTP. Every code list value must be made available in an online registry.

But http://registry.gdi-de.org/codelist/de.adv-online.inspire/LandCoverClassValue/1 is re-directing to the https entry.

JohannaOtt commented 2 years ago

@fabiovinci What is the current state here?

fabiovinci commented 2 years ago

Dear @hogredan,

we are working on how to relax the test, at least for the Conformance Class Information accessibility, so that it accepts the redirection status codes for the first response and verifies that for the final response the code is 200.

We also need to verify how to implement the test since the change has an impact on all the data themes.

We will update you on the progress.

fabiovinci commented 2 years ago

Dear @JohannaOtt, regarding the codelist, which codelist value are you using in your dataset? Is it in http or https?

JohannaOtt commented 2 years ago

@fabiovinci It contains https values - example can be retrieved using this GetFeature request. When executing the 2022.3 release with it, the Land Cover conformance class is not executed though grafik

dperezBM commented 1 year ago

Dear @hogredan,

The solution is available in staging instance . Could you check if it is correct?

@fabiovinci Could you also check it?

Regards.

fabiovinci commented 1 year ago

Dear @JohannaOtt, the error reported in your last comment is out of the scope of this issue. I validated the xml downloaded from your WFS and the error reported is not present (see report: https://inspire.ec.europa.eu/validator/test-run/details.html?id=EID85aef4a7-b439-46eb-9c9c-b739beecddcd). Could you please check and open a new issue if the error persists?

JohannaOtt commented 1 year ago

@fabiovinci Is still happening for me. I opened https://github.com/INSPIRE-MIF/helpdesk-validator/issues/905 for it now.

hogredan commented 1 year ago

Dear @hogredan,

The solution is available in staging instance . Could you check if it is correct?

@fabiovinci Could you also check it?

Regards.

Dear @dperezBM ,

many thanks for the fix. I checked it and can confirm that the test works properly now.

fabiovinci commented 1 year ago

Dear @hogredan,

thank you for confirmation.

During the fix of the error you reported, we detected that the same error was present in all Annex I data themes, so the same fix was applied also to the other themes.

We will include the fix in the next release.