Re[2]: [jetty-user] Basic server login

Chris Haynes <[email protected]>
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
First, let me make sure the requirement is clear:

You want a single password to be required. It must protect all static and dynamic content from the webApp. The password request does not have to look 'pretty' from the user's POV (i.e. it can appear as a pop-up).

My suggested approach  is entirely server-based and meets the above requirement. 

Now, the knowledge / skills you need:

1) Understand the architecture of a Servlet, and in particular how a Filter is written and configured,

2) Understand how HTTP BASIC security works,

3) Understand how to use HTTP to send to the client a request for a BASIC security login, and then how to extract the returned password,

4) How to write, compile and package the Java to implement the above Filter,

5) How to configure Jetty to add the Filter to the webApp's configuration.

If any of the above are problematic, write to me off-line, as none of the above is Jetty-specific, so is OT for this list.

HTH

Chris



On Sunday, October 17, 2010 at 8:20:26 PM, andrej rolih wrote:

> Can you give me a little more details?

> The main problem that I am facing is that I have multiple static
> HTML files and I want them protected too. If I only had a simple
> webapp login wouldn't be the problem. But I have some dynamic and
> some static content and because of that I need some server side solution.

>> Date: Sun, 17 Oct 2010 20:03:17 +0100
>> From: [email protected]
>> To: [email protected]
>> Subject: Re: [jetty-user] Basic server login

>> Assuming you don't mind writing some Java, the method I personally would use is to write a simple filter which ensures a login has been requested and checks the password.

>> There are other 'proper' ways of using the security features, but this is perhaps the quickest 'no files' method.



>> On Sunday, October 17, 2010 at 7:11:51 PM, andrej rolih wrote:

>> > Hi!
>> > I have a little trouble with jetty. I have embedded it into my
>> > application succcessfuly but I don't want to allow access to the
>> > site to anyone. So I want to password protect it. What is the
>> > easyest way to implement this? Since this is a embedded server I
>> > want to configure the whole system in Java rather than in xml files.
>> > I don't want anything complex. Just when the user connects to the
>> > server he must enter the password. And then he can do anything. I
>> > don't want multiple users or anything else. 
>> >                                           

                                     


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

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.