Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-1159

Windows delimiter '\' cannot be used in any path in Elytron client configuration file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 1.1.0.CR1
    • 1.1.0.Beta42
    • None
    • None

    Description

      When Elytron client configuration file includes some path (e.g. for keystore) with Windows delimiter '\' then this path cannot be parsed. When Windows delimiter '\' is replaced by linux delimiter '/' then resource on given path can be loaded correctly. That means it is user experience issue since common Windows path cannot be used in Elytron client configuration file, but wokraround (using '/') is simple.

      None of following types of path work:

      C:\some\path\to\client.truststore
      C:\\some\\path\\to\\client.truststore
      

      Following type of path works on Windows correctly:

      C:/some/path/to/client.truststore
      

      Following exception is thrown when '\' is used in Elytron client configuration file (the same exception is thrown when '\' is escaped in path):

      org.wildfly.client.config.ConfigXMLParseException: CONF0020: Failed to parse expression value of attribute "name"
      	at vfs:/W:/workspace/eap-7x-security-elytron-testsuite-windows/f43f9016/tests-security/elytron/content/wildfly-config-xml-dep.war/META-INF/wildfly-config.xml:18:1
      	at org.wildfly.client.config.ConfigurationXMLStreamReader.getExpressionAttributeValue(ConfigurationXMLStreamReader.java:685)
      	at org.wildfly.client.config.ConfigurationXMLStreamReader.getAttributeValueResolved(ConfigurationXMLStreamReader.java:330)
      	at org.wildfly.security.auth.client.ElytronXmlParser.parseNameType(ElytronXmlParser.java:1697)
      	at org.wildfly.security.auth.client.ElytronXmlParser.parseNameType(ElytronXmlParser.java:1680)
      	at org.wildfly.security.auth.client.ElytronXmlParser.parseKeyStoreType(ElytronXmlParser.java:1225)
      	at org.wildfly.security.auth.client.ElytronXmlParser.parseKeyStoresType(ElytronXmlParser.java:1113)
      	at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientType(ElytronXmlParser.java:279)
      	at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientConfiguration(ElytronXmlParser.java:180)
      	at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientConfiguration(ElytronXmlParser.java:141)
      	at com.redhat.eap.qe.elytron.authnctx.WildflyConfigXmlServlet.parseAndCreateAuthenticationClientConfiguration(WildflyConfigXmlServlet.java:116)
      	... 41 more
      Caused by: java.lang.IllegalArgumentException: COM00009: Invalid expression syntax at position 2
      	W:\workspace\eap-7x-security-elytron-testsuite-windows\f43f9016\tests-security\elytron\target\client.keystore
      	  ^
      	at org.wildfly.common.expression.Expression.invalidExpressionSyntax(Expression.java:654)
      	at org.wildfly.common.expression.Expression.parseString(Expression.java:610)
      	at org.wildfly.common.expression.Expression.compile(Expression.java:203)
      	at org.wildfly.common.expression.Expression.compile(Expression.java:183)
      	at org.wildfly.client.config.ConfigurationXMLStreamReader.getExpressionAttributeValue(ConfigurationXMLStreamReader.java:683)
      	... 50 more
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              olukas Ondrej Lukas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: