Thursday, February 9, 2012

Basic Authentication with WebLogic 9.2 and above

I have had very few encounters with WebLogic. Today was one of such days. I created a simple application that uses Basic authentication. The application was deployed on WebLogic. So here I am sharing it.

To all my surprises the application didn't work as expected. It was giving 401 error repeatedly. After some further debugging I found that the request was not even calling application code for authentication. Now this was really annoying and strange. On debugging I found nothing wrong in the application, I decided to search for it in case someone else faced a similar issue.

Interestingly, it turned out to be an issue with WebLogic. There is a behavior change WebLogic 9.2 onward and any request to application with "Authorization" header the is intercepted by WebLogic itself and is not passed to the application. WebLogic tries to make authentication itself.

To Solve this issue one can add the following configuration in config.xml

Happy Debugging,


1 comment:

You can subscribe to the comments by licking on "Subscribe by email".