Interface URLChecker

  • public interface URLChecker
    Checks URIs/URLs/locations to confirm if they are allowed for use. Used to restrict access to remote servers, e.g. to prevent access to untrusted servers or local resources, as many OGC services either allow users to provide links to remote resources, or provide links that are not restricted to their original host.
    Implementations should be registered using SPI in META-INF/services/ .ows.URLChecker.
    • Method Detail

      • getName

        String getName()
        URLChecker name that best describes its purpose (e.g. GML Schema evaluator etc)
      • isEnabled

        boolean isEnabled()
        Boolean flag indicating if this URLChecker should be used
      • confirm

        boolean confirm​(String location)
        Used to confirm location is allowed for use.

        URLChecker is used to confirm if a location is allowed for use, returning when they recognize a location as permitted. Several URLChecker instances are expected to be available, the location will be allowed if at least one URLChecker can confirm it is permitted for use.

        Location is normalized to remove all redundant . and .. path names, and provide absolute file references using empty host name file:///path approach.

        location - Location expressed as normalized URL, URI or path.
        true indicates the URLChecker can confirm the location is allowed for use, false indicates the URLChecker is unable to confirm.