Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFS sources fail to become available when one of their FeatureTypes' schemas imports a schema that imports another schema #4810

Open
jrnorth opened this issue May 8, 2019 · 18 comments

Comments

@jrnorth
Copy link
Contributor

jrnorth commented May 8, 2019

Description

When any WFS source (1.0.0, 1.1.0, or 2.0.0) encounters a FeatureType whose schema (returned by the DescribeFeatureType operation and parsed when the source is initializing) imports a schema that imports a schema, an AccessControlException is thrown due to a lack of file read permissions. When Apache XmlSchema's DefaultURIResolver tries to resolve an import inside an imported schema, it tries to access it as a File first. Because the resolver does not have a file read permission, an AccessControlException is thrown and the source does not become available.

Steps to Reproduce

Note: I could not find a publicly available WFS source that has the necessary conditions to trigger this issue so I created a mock WFS source that does.

  1. Download the standalone Wiremock JAR: http://wiremock.org/docs/download-and-installation/
  2. Run the JAR.
  3. In the directory containing the Wiremock JAR there should now be a __files directory. Drop https://github.com/jrnorth/ddf/blob/4e243c5ceb30d563e485802ccc49367add040f88/catalog/spatial/wfs/spatial-wfs-common/src/test/resources/WFS_Capabilities.xml and https://github.com/jrnorth/ddf/blob/4e243c5ceb30d563e485802ccc49367add040f88/catalog/spatial/wfs/spatial-wfs-common/src/test/resources/AZWellLogs.xsd in that directory.
  4. There should also be a mappings directory. Drop https://github.com/jrnorth/ddf/blob/4e243c5ceb30d563e485802ccc49367add040f88/catalog/spatial/wfs/spatial-wfs-common/src/test/resources/mappings.json in that directory.
  5. Stop Wiremock and start it again.
  6. Run log:tail in the Karaf console.
  7. Create a WFS 1.1.0 source using the url http://localhost:8080.
  8. Enable the source.
  9. Verify you see Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "http:/schemas.opengis.net/waterml/2.0/waterml2.xsd" "read") in the console logs.
  10. Verify the source does not become available.

Expected behavior :

The source successfully parses all its FeatureTypes' schemas and becomes available.

Actual behavior:

An AccessControlException is thrown from Apache XmlSchema's DefaultUriResolver due to a lack of file read permissions.

Reproduces how often:

100%

Platform and environment:

All platforms and Java versions

Affects versions

All versions that include the security manager (>= 2.12.0?)

@stale
Copy link

stale bot commented Mar 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 19, 2020
@stale stale bot closed this as completed Mar 26, 2020
@jrnorth jrnorth reopened this Mar 27, 2020
@stale stale bot removed the wontfix label Mar 27, 2020
@stale
Copy link

stale bot commented May 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label May 26, 2020
@jrnorth jrnorth removed the wontfix label May 26, 2020
@stale
Copy link

stale bot commented Jul 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 25, 2020
@jrnorth jrnorth removed the wontfix label Jul 27, 2020
@stale
Copy link

stale bot commented Sep 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 25, 2020
@jrnorth jrnorth removed the wontfix label Sep 25, 2020
@stale
Copy link

stale bot commented Nov 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 24, 2020
@jrnorth jrnorth removed the wontfix label Nov 24, 2020
@stale
Copy link

stale bot commented Jan 24, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 24, 2021
@jrnorth jrnorth removed the wontfix label Jan 25, 2021
@stale
Copy link

stale bot commented Mar 28, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 28, 2021
@jrnorth jrnorth removed the wontfix label Mar 29, 2021
@stale
Copy link

stale bot commented May 30, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label May 30, 2021
@jrnorth jrnorth removed the wontfix label Jun 1, 2021
@stale
Copy link

stale bot commented Jul 31, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 31, 2021
@stale stale bot closed this as completed Aug 8, 2021
@jrnorth jrnorth reopened this Sep 1, 2021
@stale stale bot removed the wontfix label Sep 1, 2021
@stale
Copy link

stale bot commented Nov 1, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 1, 2021
@jrnorth jrnorth removed the wontfix label Nov 1, 2021
@stale
Copy link

stale bot commented Jan 5, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 5, 2022
@jrnorth jrnorth removed the wontfix label Jan 5, 2022
@stale
Copy link

stale bot commented Mar 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 16, 2022
@jrnorth jrnorth removed the wontfix label Mar 31, 2022
@stale
Copy link

stale bot commented Jun 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 12, 2022
@stale stale bot closed this as completed Jun 19, 2022
@jrnorth jrnorth removed the wontfix label Jun 20, 2022
@jrnorth jrnorth reopened this Jun 20, 2022
@stale
Copy link

stale bot commented Sep 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 20, 2022
@jrnorth jrnorth removed the wontfix label Sep 21, 2022
@stale
Copy link

stale bot commented Nov 23, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 23, 2022
@jrnorth jrnorth removed the wontfix label Nov 30, 2022
@stale
Copy link

stale bot commented Mar 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 18, 2023
@jrnorth jrnorth removed the wontfix label Mar 21, 2023
@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label May 21, 2023
@jrnorth jrnorth removed the wontfix label May 30, 2023
@stale
Copy link

stale bot commented Sep 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 17, 2023
@jrnorth jrnorth removed the wontfix label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant