Minimal settings in web.xml to allow Authorization header to be manually processed?
posted 6 years ago
(This is reposted from the engineering-security forum, but I realized later that forum isn't as active as this one.)
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 to 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: