Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-429

Spring WS authentication doesn't work when using a PropertyPlaceHolderConfigurer object

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.5.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      windows 32 bits, JDK 1.6

      Description

      Hi.

      My web service begins to fail when I change the SimplePasswordValidationCallbackHandler to get the password from a PropertyPlaceHolderConfigurer like this:

      <bean id="simpleTokenValidationHandler"
      class="org.springframework.ws.soap.security.xwss.callback.SimplePasswordValidationCallbackHandler">
      <property name="users">
      <props>
      <prop key="user"><b>$

      {ws.password}

      </b></prop>
      </props>
      </property>
      </bean>

      I know that it is resolving its value at start-up but the authentication fails and it shouldn't.

        Issue Links

          Activity

          Hide
          pakin Angel added a comment -

          Sorry, this is the bean definition that is failing

          <bean id="simpleTokenValidationHandler"
          class="org.springframework.ws.soap.security.xwss.callback.SimplePasswordValidationCallbackHandler">
          <property name="users">
          <props>
          <prop key="DATA_HARVEST">$

          {ws.password}

          </prop>
          </props>
          </property>
          </bean>

          Show
          pakin Angel added a comment - Sorry, this is the bean definition that is failing <bean id="simpleTokenValidationHandler" class="org.springframework.ws.soap.security.xwss.callback.SimplePasswordValidationCallbackHandler"> <property name="users"> <props> <prop key="DATA_HARVEST">$ {ws.password} </prop> </props> </property> </bean>
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          I can't think of a reason why this wouldn't work. Are you sure the properties are replaced at all?

          You could try wiring up a simple pojo, wire it up with a property, and print out the property value as soon as injected. Just to be sure.

          Show
          arjen.poutsma Arjen Poutsma added a comment - I can't think of a reason why this wouldn't work. Are you sure the properties are replaced at all? You could try wiring up a simple pojo, wire it up with a property, and print out the property value as soon as injected. Just to be sure.
          Hide
          pakin Angel added a comment -

          Yes, I am completely sure. I think it is comparing against the literal "$

          {ws.password}

          " instead of using the resolved value. I think the issue SWS-430 could be related to this and the way property binding is managed.

          Show
          pakin Angel added a comment - Yes, I am completely sure. I think it is comparing against the literal "$ {ws.password} " instead of using the resolved value. I think the issue SWS-430 could be related to this and the way property binding is managed.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          I cannot reproduce this. See SWS-430 for a suggested fix.

          Show
          arjen.poutsma Arjen Poutsma added a comment - I cannot reproduce this. See SWS-430 for a suggested fix.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing old issues

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing old issues

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              pakin Angel
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: