views:

90

answers:

2

I apologize before hand if this is an obvious question: can Apache 2.0 + SSL + basic authentication be trusted in order to secure a website? The way I see it, SSL creates a secure connection between the client and the server and thus any HTTP requests containing the clear-text password should not be a security issue.

thanks, S.

+2  A: 

You are correct, basic auth is secure as long as you can guarantee the connection is end-to-end encrypted. This means that you must configure the server to force SSL usage by redirecting HTTP requests to HTTPS, or not accept unencrypted connections at all for that URL.

Jim Garrison
Thanks Jim, turns out I unfortunately will have to use a session-based authentication since I have to be able to logout users as well.
S.D
You should still force SSL. The same caveats apply to form-based auth since a password has to be transmitted.
Jim Garrison
You can logout users with Basic Auth, kind of. It's not terribly pretty and Apache doesn't have any method built in to do it. What you would have to do is POST to a `/logout` script that returns 401 when the user passes *correct* auth. You then ask the user to submit wrong details to the auth dialogue (typically, empty username/password). Your script responds 200 or 303, at which point the browser dumps the correct auth in favour of the non-auth.
bobince
A: 

"The only fully secure computer is one that is unplugged and turned off"

That said, Jim's answer is Good Enough if you accept SSL level of security :)

DVK