Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-5236

Need DigestPasswordLoginModule so PasswordDigest can work with Karaf JAAS realm

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • jboss-fuse-6.3
    • jboss-fuse-6.2.1
    • CXF, Karaf
    • None
    • % %
    • 0
    • 0% 0%

    Description

      I have a test case using camel-cxf endpoint and WSS4JInInterceptor with "UsernameToken" action. I also configured JAASLoginInterceptor so I can authenticate against JBoss Fuse default "karaf" realm.

      When the "passwordType" was "PasswordText", it worked perfectly. However, when I changed it to "PasswordDigest", it did not work.

      Here is my camel-cxf endpoint configuration along with JAASLoginInterceptor config:

       <camelcxf:cxfEndpoint id="reportIncident"
                              address="/incident"
                              wsdlURL="META-INF/wsdl/report_incident.wsdl"
                             serviceClass="org.apache.camel.example.reportincident.ReportIncidentEndpoint"
                              endpointName="s:ReportIncidentService"
                              serviceName="s:ReportIncidentEndpointService"
                              xmlns:s="http://reportincident.example.camel.apache.org">
              <camelcxf:properties>
                  <entry key="dataFormat" value="PAYLOAD" />
                  <entry key="ws-security.validate.token" value="false" />
                  <entry key="ws-security.is-bsp-compliant" value="false" />
              </camelcxf:properties>
              <camelcxf:inInterceptors>
                  <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
                  <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
                      <property name="properties">
                          <map>
                              <entry key="action" value="UsernameToken" />
                              <entry key="passwordType" value="PasswordDigest" />
                          </map>
                      </property>
                  </bean>
                  <ref component-id="authenticationInterceptor" />
              </camelcxf:inInterceptors>
          </camelcxf:cxfEndpoint>
      
          <bean id="authenticationInterceptor" class="org.apache.cxf.interceptor.security.JAASLoginInterceptor">
              <property name="contextName" value="karaf" />
          </bean>
      

      Here was the logs:

      16:44:12,500 | WARN  | qtp32823817-70   | PhaseInterceptorChain            | 74 - org.apache.cxf.cxf-core - 3.0.4.redhat-621084 | Interceptor for {http://reportincident.example.camel.apache.org}ReportIncidentEndpointService#{http://reportincident.example.camel.apache.org}ReportIncident has thrown exception, unwinding now
      org.apache.cxf.interceptor.security.AuthenticationException: Authentication failed (details can be found in server log)
      	at org.apache.cxf.interceptor.security.JAASLoginInterceptor.handleMessage(JAASLoginInterceptor.java:159)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]
      

      Attachments

        1. cxf-core-3.0.4.redhat-621084.jar
          1.28 MB
        2. log.txt
          9 kB
        3. org.apache.karaf.jaas.modules-2.4.0.redhat-621084.jar
          1.25 MB
        4. PropertiesLoginModule.java
          7 kB
        5. testcase.zip
          17 kB

        Issue Links

          Activity

            People

              yfang@redhat.com Freeman(Yue) Fang
              rhn-support-qluo Joe Luo
              Viliam Kasala Viliam Kasala
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: