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

          jaminh jaminh created issue -
          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().
          arjen.poutsma Arjen Poutsma made changes -
          Field Original Value New Value
          Link This issue relates to SWS-796 [ SWS-796 ]
          arjen.poutsma Arjen Poutsma made changes -
          Fix Version/s 2.1.3 [ 13897 ]
          arjen.poutsma Arjen Poutsma made changes -
          Assignee Arjen Poutsma [ arjen.poutsma ]
          arjen.poutsma Arjen Poutsma made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          arjen.poutsma Arjen Poutsma logged work - 05/Dec/12 1:29 AM
          • Time Spent:
            5m
             
            <No comment>
          arjen.poutsma Arjen Poutsma made changes -
          Time Spent 5m [ 300 ]
          Worklog Id 29815 [ 29815 ]
          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
          arjen.poutsma Arjen Poutsma made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          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.
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          12h 44m 1 Arjen Poutsma 05/Dec/12 1:28 AM
          In Progress In Progress Resolved Resolved
          10m 34s 1 Arjen Poutsma 05/Dec/12 1:39 AM

            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