Hi,

I have set up a http bc with  ws-security which in turn targets a
jsr181-based service, see below

<http:endpoint xmlns:soap="http://servicemix.apache.org/soap/1.0";
service="vmt:reservationsSOAPBinding" endpoint="soapBinding"
                      targetService="vmt:reservationsSOAPService"
role="consumer"
                      locationURI="http://0.0.0.0/soap";
                      defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
soap="true"
                      soapVersion="1.2">
            <http:policies>
                      <soap:ws-addressing />
                      <soap:ws-security receiveAction="UsernameToken
Signature" crypto="#standAloneCrypto" username="myAlias" />
            </http:policies>
</http:endpoint>


On the client side I have a simple java app which uses CXF to sent the
request to the server. Using TCPMON I can see the following xml being sent
to the server. So it seem CXF is sending the request correctly.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
    <soap:Header>
        <wsse:Security
            xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"
            soap:mustUnderstand="true">
            <wsse:UsernameToken
                xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
"
                wsu:Id="UsernameToken-27737392"
                xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
                <wsse:Username
                    xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
                    myAlias
                </wsse:Username>
                <wsse:Password
                    Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText
"
                    xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
                    myAliasPassword
                </wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soap:Header>
    <soap:Body>
        <ns2:findHistoryBookings xmlns:ns2="http://dev.vmt.com/flights/";
            xmlns="http://model.flightreservation.vmt.com";>
            <ns2:in0 />
        </ns2:findHistoryBookings>
    </soap:Body>
</soap:Envelope>


But I just keep on getting the the following message back from the server
 ...... java.lang.SecurityException: Unable to locate a login configuration

I have set up a secured broker, authenticationservice and keystoremanager.
see below

    <sm:broker>
       <sm:securedBroker>
             <sm:authorizationMap>
                 <sm:authorizationMap>
                     <sm:authorizationEntries>
                         <sm:authorizationEntry service="*:*" roles="*" />
                     </sm:authorizationEntries>
                 </sm:authorizationMap>
             </sm:authorizationMap>
         </sm:securedBroker>
     </sm:broker>

     <sm:authenticationService id="authenticationService" />

     <sm:keystoreManager id="keystoreManager">
         <sm:keystores>
             <sm:keystore name="default" path="classpath:privatestore.jks"
                 keystorePassword="keyStorePassword"
keyPasswords="myAliasPassword=myAliasPassword" />
         </sm:keystores>
     </sm:keystoreManager>

BUT to no avail, I have no clue what I am doing wrong, I suspect this has to
do with JAAS but I dont know how to set up the JAAS module correctly

PS!. I am running servicemix embedded in a web application....
Please can someone  point me in the right direction

Thank you in advance

Reply via email to