title: Spring SOAP WS: WssSoapFaultException implementing SimplePasswordValidationCallbackHandler
body: <p>I'm following a course to review some Spring concepts and I'm trying to implement a SOAP WS with simple password validation security.</p>
  <p>My bean configuration is like the following</p>
  <pre><code>@EnableWs
  @Configuration
  public class WsdlConfigService extends WsConfigurerAdapter {
  
      // Other beans...
      
      @Bean
      public XwsSecurityInterceptor requestInterceptor() {
          XwsSecurityInterceptor interceptor = new XwsSecurityInterceptor();
          interceptor.setCallbackHandler(callbackHandler());
          interceptor.setPolicyConfiguration(new ClassPathResource(&quot;securityPolicy.xml&quot;));
          return interceptor;
      }
  
      @Bean
      public SimplePasswordValidationCallbackHandler callbackHandler() { 
          SimplePasswordValidationCallbackHandler handler = new SimplePasswordValidationCallbackHandler();
          handler.setUsersMap(Collections.singletonMap(&quot;admin&quot;, &quot;password&quot;));
          return handler;
      }
  
      @Override
      public void addInterceptors(List&lt;EndpointInterceptor&gt; interceptors) {
          interceptors.add(requestInterceptor());
      }
  }
  </code></pre>
  <p>and the <code>securityPolicy.xml</code> configuration is the following:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;xwss:SecurityConfiguration xmlns:xwss=&quot;http://java.sun.com/xml/ns/xwss/config&quot;&gt;
      &lt;xwss:RequireUsernameToken passwordDigestRequired=&quot;false&quot; nonceRequired=&quot;false&quot; /&gt;
  &lt;/xwss:SecurityConfiguration&gt;
  </code></pre>
  <p>When I try to test the endpoint security (I'm using Wizdler Chrome extension) I'm getting an unexpected error:</p>
  <pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
      &lt;SOAP-ENV:Header/&gt;
      &lt;SOAP-ENV:Body&gt;
          &lt;SOAP-ENV:Fault&gt;
              &lt;faultcode&gt;SOAP-ENV:Client&lt;/faultcode&gt;
              &lt;faultstring xml:lang=&quot;en&quot;&gt;com.sun.xml.wss.impl.WssSoapFaultException: javax.security.auth.callback.UnsupportedCallbackException; nested exception is com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.impl.WssSoapFaultException: javax.security.auth.callback.UnsupportedCallbackException&lt;/faultstring&gt;
          &lt;/SOAP-ENV:Fault&gt;
      &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  <p>In the Wizdler interface I'm using WSSE PasswordText Authentication because of the <code>SimplePassWrodValidationCallbackHandler</code> bean.</p>
  <p>What am I doing wrong here? I tried with Spring Boot versions 2.5.1 (latest at the time of this writing) and 2.4.5 (the one used in the course)</p>
  <p>If you need more details on this issue please let me know. Thanks in advance for your answers/comments.</p>