Problem solved. I missed an action-node and had to add a timestamp as well,
since Rampart expects a timestamp to be sent by default. So for those who
are in a similar situation:

<!-- Engage the security module -->
        <module ref="rampart" />
        
        <parameter name="OutflowSecurity">
                <action>
                        <items>UsernameToken Timestamp</items>
                        <user>Bob</user>
                        <passwordCallbackClass>
                        
diplom.salihovic.florian.architecture.core.rating.service.RateableServicePasswordCallbackHandler
                        </passwordCallbackClass>
                </action>
        </parameter>

        <parameter name="InflowSecurity">
                <action>
                        <items>UsernameToken Timestamp</items>
                        <passwordCallbackClass>
                        
diplom.salihovic.florian.architecture.core.rating.service.RateableServicePasswordCallbackHandler
                        </passwordCallbackClass>
                </action>
        </parameter>


omega-psi wrote:
> 
> I'm currently stuck securing a service. I use Apache Axis 1.3 along with
> Apache Rampart 1.3. When i send a timestamp everything works fine. But
> when i try to send a UsernameToken i get a configuration error from my
> service. This is part of my servces.xml. I use an autogenerated
> services.xml and i only added the enabling for rampart and the parameter
> nodes for "InflowSecurity" and "OutflowSecurity".
> 
>               <module ref="rampart" />
> 
>               <operation name="PermissionRequest"
>                       mep="http://www.w3.org/ns/wsdl/in-out";>
>                       
>                       <parameter name="InflowSecurity">
>                               <action>
>                                       <items>UsernameToken</items>
>                                       <passwordCallbackClass>
>                                       
> diplom.salihovic.florian.architecture.core.rating.service.RateableServicePasswordCallbackHandler
>                                       </passwordCallbackClass>
>                               </action>
>                       </parameter>
> 
>                       <parameter name="OutflowSecurity">
>                               <items>UsernameToken</items>
>                               <user>Bob</user>
>                               <passwordCallbackClass>
>                               
> diplom.salihovic.florian.architecture.core.rating.service.RateableServicePasswordCallbackHandler
>                               </passwordCallbackClass>
>                       </parameter>
>                       
>                       <actionMapping>
>                       
> http://florian.salihovic.diplom/architecture/core/rating/service/PermissionRequest
>                       </actionMapping>
>                       <outputActionMapping>
>                       
> http://florian.salihovic.diplom/architecture/core/rating/service/RatingInterface/PermissionRequestResponse
>                       </outputActionMapping>
>               </operation>
> 
> Here are the SOAP messages copied from TCPMon:
> POST /axis2/services/RateableService HTTP/1.1
> Content-Type: text/xml; charset=UTF-8
> SOAPAction:
> "http://florian.salihovic.diplom/architecture/core/rating/service/PermissionRequest";
> User-Agent: Axis2
> Host: 127.0.0.1
> Transfer-Encoding: chunked
> 
> 545
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>       <soapenv:Header>
>          <wsse:Security
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
> soapenv:mustUnderstand="1">
>             <wsse:UsernameToken
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> wsu:Id="UsernameToken-15159273">
>                <wsse:Username>Bob</wsse:Username>
>                <wsse:Password
> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest";>3cGRBLKKIcjcdVOEysoaTxpj65E=</wsse:Password>
>                <wsse:Nonce>b2coIBsSOKh3/rPL3vBjJg==</wsse:Nonce>
>                <wsu:Created>2007-09-16T10:13:49.509Z</wsu:Created>
>             </wsse:UsernameToken>
>          </wsse:Security>
>         
> <wsa:To>http://localhost:5555/axis2/services/RateableService</wsa:To>
>         
> <wsa:MessageID>urn:uuid:9ACBD229DF2224DB291189937629363</wsa:MessageID>
>         
> <wsa:Action>http://florian.salihovic.diplom/architecture/core/rating/service/PermissionRequest</wsa:Action>
>       </soapenv:Header>
>       <soapenv:Body>
>          <PermissionRequest
> xmlns="http://florian.salihovic.diplom/architecture/core/rating/types/";>
>             <customerServiceRequest>
>                <userId>Bob</userId>
>                <customerId>customer</customerId>
>                <password>pass</password>
>             </customerServiceRequest>
>          </PermissionRequest>
>       </soapenv:Body>
>    </soapenv:Envelope>0
> 
> HTTP/1.1 500 Internal Server Error
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Sun, 16 Sep 2007 10:14:05 GMT
> Connection: close
> 
> 200
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>       <soapenv:Header>
>         
> <wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>
>         
> <wsa:RelatesTo>urn:uuid:9ACBD229DF2224DB291189937629363</wsa:RelatesTo>
>       </soapenv:Header>
>       <soapenv:Body>
>          <soapenv:Fault>
>             <faultcode>soapenv:Server</faultcode>
>             <faultstring>Configureation error</faultstring>
>             <detail />
>          </soapenv:Fault>
>       </soapenv:Body>
>    </soapenv:Envelope>
> 0
> 
> I would be really thankfull, if anybody could help me out.
> 

-- 
View this message in context: 
http://www.nabble.com/-Rampart-1.3--Configuration-Error-tf4450848.html#a12698675
Sent from the WSS4J mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to