Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-8792

System property wildfly.config.url does not work with Windows path to local file without protocol

    Details

      Description

      In case system property wildfly.config.url (which is used by Elytron client to find out configuration file) includes path to local file without URL protocol (file://) then linux path is automatically converted to URL started with file://. However Windows path is not converted to URL, mentioned below exception is thrown. It is caused by part of code which handles just a linux type of path, see [1].

      Using URL (i.e. protocol is explicitly used) in wildfly.config.url works correctly. It means this is user experience issue - path to local file without protocol file can be used in linux but cannot be used in Windows.

      Thrown exception for Windows:

       
      org.wildfly.client.config.ConfigXMLParseException: CONF0014: Invalid configuration file URL
      	at W:/workspace/eap-7x-security-elytron-testsuite-windows-olukas/f43f9016/tests-security/elytron/target/wildfly-config.xml
      	at org.wildfly.client.config.ClientConfiguration.readConfiguration(ClientConfiguration.java:132)
      	at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientConfiguration(ElytronXmlParser.java:139)
      	at com.redhat.eap.qe.elytron.authnctx.WildflyConfigXmlServlet.parseAndCreateAuthenticationClientConfiguration(WildflyConfigXmlServlet.java:116)
      	... 41 more
      Caused by: java.net.MalformedURLException: unknown protocol: w
      	at java.net.URL.<init>(URL.java:600)
      	at java.net.URL.<init>(URL.java:490)
      	at java.net.URL.<init>(URL.java:439)
      	at java.net.URI.toURL(URI.java:1089)
      	at org.wildfly.client.config.ClientConfiguration.streamOpener(ClientConfiguration.java:67)
      	at org.wildfly.client.config.ClientConfiguration.readConfiguration(ClientConfiguration.java:130)
      	... 43 more
      

      [1] https://github.com/wildfly/wildfly-client-config/blob/7c12683cd29f88261e70146aac8c1de93ea02c35/src/main/java/org/wildfly/client/config/ClientConfiguration.java#L217

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rstancel Radovan Stancel
                  Reporter:
                  olukas Ondrej Lukas
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: