Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Minimal settings in web.xml to allow Authorization header to be manually processed?  RSS feed

Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm building an app using Apache CXF (JAX-RS), running in WebLogic 10.3.2.

I have a nice set of resource methods that work fine. I now need to implement some sort of authentication/authorization, but it will have to be managed by the application, not the container. I implemented a request handler in CXF that should allow me to look at the principal and credentials that were sent in the Authorization header. However, when I configured my test client to send a manually-constructed Authorization header (which I obtained from a tutorial on basic auth), my request got a 401 back without even getting into my application code on the server.

That tells me that I probably have to implement some of the "security"-related elements in my application's web.xml, although I just need to tell it to let everyone in, but give me the principal/credentials that were sent. I started the construct the "security-constraint" and "login-config" elements, but I'm not sure what minimal settings I need to get me past this obstacle.

I've started with the following, but I'm not sure what I need:


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!