[mule-user] [CXF] HTTP Basic Authenticatoin not working anymore in Mule 3

144 views
Skip to first unread message

Dirk Alexander Schaefer

unread,
Feb 11, 2011, 5:40:35 AM2/11/11
to us...@mule.codehaus.org
hi there,

we're facing a problem with CXF and http basic authentication. on our plattform were we're running mule 2.2. we've got a lot of cxf based webservices. each of these webservices is secured by the HttpBasicAuthenticationFilter (<mule-ss:http-security-filter />). this work's quite well. if a request is made against one of this services and the Authentication HTTP header is missing, an 401 error code is returned thus the requestor's http client sends the request again containing the basic auth information. everthing works as it is expected to work. attached you'll find an example configuration which works for us in mule 2.2.

as we're upgrading to mule 3.1 currently we are now facing the problem that the UnauthorizedException or UnauthenticatedException - i don't now exactly right now - is getting wrapped in an ordinary SoapFault which gets send back to the requestor with the "normal" 500 http status code. therefor the client isn't prompt to resend the request including the basic auth data. attached you'll find an example configuration with which we're facing this problem.

so far i have only been able to get things working as they should by using the new FLOW configuration construct. again you'll find an example configuration on how this looks right now.

so, my question is: am i missing something or is it possible that what we're trying to achieve is only possible with the flow configuration construct in mule 3(.1)?

any help would be highly appreciated.

dialsc

ps: do not wonder about the usage of e.g. a global http connector configuration. in our system we do further configuration with it which i removed from the examples. i also omitted the ExampleServiceMemoryDaoSecurityProvider configuration. i think you know how to configure one... ;)

02-mule-3.1-working.xml
01-mule-3.1-not-working.xml
00-mule-2.2.xml

Robert Voliva

unread,
Dec 23, 2011, 11:53:44 AM12/23/11
to us...@mule.codehaus.org
I ran into this problem also. I found that it only works if the cxf:jaxws-service is outside the inbound-endpoint in the flow. For clarity, this does not allow basic auth to work correctly:

<flow name="test_service">
<http:inbound-endpoint address="http://localhost:8091/services/TestService"
exchange-pattern="request-response">
<mule-ss:http-security-filter realm="mule-realm" />
<cxf:jaxws-service serviceClass="some.test.service.ServicePortImpl">
</cxf:jaxws-service>
</http:inbound-endpoint>
<log-component />
</flow>

but this works:

<flow name="test_service">
<http:inbound-endpoint address="http://localhost:8091/services/TestService"
exchange-pattern="request-response">
<mule-ss:http-security-filter realm="mule-realm" />
</http:inbound-endpoint>
<cxf:jaxws-service serviceClass="some.test.service.ServicePortImpl">
</cxf:jaxws-service>
<log-component />
</flow>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


rvo...@gmail.com

unread,
Dec 23, 2011, 11:59:37 AM12/23/11
to us...@mule.codehaus.org
This seems like something that should be addressed through the documentation, if not registering it as a bug.

Any input from some MuleSoft people as to what I could do to document this in a JIRA?  Is it just a documentation issue?  Or should the jaxws-service element not be allowed to exist inside an http inbound endpoint?

For reference, this is the documentation that shows putting it inside the http inbound endpoint (which doesn't work):


If you reply to this email, your message will be added to the discussion below:
http://mule.1045714.n5.nabble.com/CXF-HTTP-Basic-Authenticatoin-not-working-anymore-in-Mule-3-tp3380956p5097615.html
To start a new topic under Mule - User, email [hidden email]
To unsubscribe from Mule - User, click here.
NAML



View this message in context: Re: [CXF] HTTP Basic Authentication not working anymore in Mule 3
Sent from the Mule - User mailing list archive at Nabble.com.

Evangelina Martinez

unread,
Jan 18, 2012, 9:25:10 AM1/18/12
to us...@mule.codehaus.org
Hi,

Can you open a JIRA at http://www.mulesoft.org/jira/ with the problem you are facing?

We are making improvements in CXF for the next release and this seems a problem around consistency and also documentation.

Thanks,
Eva

rvo...@gmail.com

unread,
Jan 18, 2012, 11:30:02 AM1/18/12
to us...@mule.codehaus.org
Thanks, the new JIRA can be found here:


Please let me know if there's anything else I should add to the JIRA.

On Wed, Jan 18, 2012 at 8:25 AM, Evangelina Martinez [via Mule] <[hidden email]> wrote:
Hi,

Can you open a JIRA at http://www.mulesoft.org/jira/ with the problem you are facing?

We are making improvements in CXF for the next release and this seems a problem around consistency and also documentation.

Thanks,
Eva

To start a new topic under Mule - User, email [hidden email]
To unsubscribe from Mule - User, click here.
NAML
Reply all
Reply to author
Forward
0 new messages