You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Soren Dayton <da...@overx.com> on 2000/01/31 18:39:44 UTC
questions about security, the Servlet API and tomcat/Apache
Hi,
I am beginning to investigate various security models to use in an
application (err. demo. I'm not a "web" guy, and ours isn't a "web
product". But...). I see some functionality in HttpServletRequest
(the getAuthType() and getPrincipal() methods) and the SC_UNAUTHORIZED
field in HttpServletResponse, but I don't really understand what it
thinks its doing.
Do these correspond to stuff that would get triggered through Apache's
htaccess and, more generally, SSL kinds of things?
And the servlet 2.2 spec seems to suggest that the container should do
the authentication. But people seem to implement their security in
their applications.
What's the deal here? Is there a consensus about what to do? Am I
misunderstanding the Servlet spec?
Thanks,
Soren
Re: questions about security, the Servlet API and tomcat/Apache
Posted by "Craig R. McClanahan" <cm...@mytownnet.com>.
Soren Dayton wrote:
> Hi,
>
> I am beginning to investigate various security models to use in an
> application (err. demo. I'm not a "web" guy, and ours isn't a "web
> product". But...). I see some functionality in HttpServletRequest
> (the getAuthType() and getPrincipal() methods) and the SC_UNAUTHORIZED
> field in HttpServletResponse, but I don't really understand what it
> thinks its doing.
>
> Do these correspond to stuff that would get triggered through Apache's
> htaccess and, more generally, SSL kinds of things?
>
To understand this stuff, I would suggest starting with a review of the
HTTP protocol specifications, including the protocol itself and also the
authentication implementations. One place to start would be
<http://www.w3c.org>, although both HTTP/1.1 and the authentication
schemes are also now Internet standards documented in RFCs.
Much of the servlet API is simply a Java object-oriented interface to
HTTP.
>
> And the servlet 2.2 spec seems to suggest that the container should do
> the authentication. But people seem to implement their security in
> their applications.
>
> What's the deal here? Is there a consensus about what to do? Am I
> misunderstanding the Servlet spec?
>
The 2.2 spec is relatively new, and not very many implementations exist
yet. The container-managed security feature is one of the major additions
in 2.2 -- in the past you were totally on your own, so this is why you see
all the "roll your own" implementations.
I believe that, over time, people will migrate towards container-managed
security. I would certainly design new apps with that approach in mind.
>
> Thanks,
> Soren
>
Craig McClanahan