Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.1.3
    • Component/s: Security
    • Labels:
      None

      Description

      Wss4j is unable to load the properties file when it is given an absolute path. Wss4j is using the ClassLoader to load the properties file. See http://grepcode.com/file/repository.springsource.com/org.apache.ws/com.springsource.org.apache.ws.security/1.6.5/org/apache/ws/security/saml/SAMLIssuerFactory.java#SAMLIssuerFactory.getProperties%28java.lang.String%29 for how the saml properties file gets loaded by Wss4j.

        Issue Links

          Activity

          Hide
          jaminh jaminh added a comment -
          Show
          jaminh jaminh added a comment - Related to https://jira.springsource.org/browse/SWS-796
          Hide
          jaminh jaminh added a comment -

          It is probably worth mentioning that I used a ClassPathResource for specifying the saml properties location. Perhaps if I used a different kind of Resource getAbsolutePath() would just return the string I pass into it when I construct it? Ultimately I think using Resource for the parameter on the setSamlProperties() method in the Wss4jSecurityInterceptor is inappropriate since the properties file has to be on the Classpath. Perhaps it would make sense to require a ClassPathResource that way we can ensure that the file is on the classpath and that it exists, but instead of calling getFile().getAbsolutePath() we can just call getPath().

          Show
          jaminh jaminh added a comment - It is probably worth mentioning that I used a ClassPathResource for specifying the saml properties location. Perhaps if I used a different kind of Resource getAbsolutePath() would just return the string I pass into it when I construct it? Ultimately I think using Resource for the parameter on the setSamlProperties() method in the Wss4jSecurityInterceptor is inappropriate since the properties file has to be on the Classpath. Perhaps it would make sense to require a ClassPathResource that way we can ensure that the file is on the classpath and that it exists, but instead of calling getFile().getAbsolutePath() we can just call getPath().
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          I'm sorry for this. I thought that using a Resource would allow for more flexibility, but it turns out WSS4J is a bit picky (as always).

          I have changed the Resource parameter into a String in SVN. I've also triggered a snapshot build of 2.1.3 that contains this change. Could you please try a snapshot and see if it works? See http://static.springsource.org/spring-ws/site/downloads/snapshots.html

          Show
          arjen.poutsma Arjen Poutsma added a comment - I'm sorry for this. I thought that using a Resource would allow for more flexibility, but it turns out WSS4J is a bit picky (as always). I have changed the Resource parameter into a String in SVN. I've also triggered a snapshot build of 2.1.3 that contains this change. Could you please try a snapshot and see if it works? See http://static.springsource.org/spring-ws/site/downloads/snapshots.html
          Hide
          jaminh jaminh added a comment -

          Tried it with the snapshot and it worked. Thanks.

          Show
          jaminh jaminh added a comment - Tried it with the snapshot and it worked. Thanks.

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              jaminh jaminh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 5m
                5m