views:

250

answers:

3

I wrote a small internal web app using (a subset of) pylons. As it turns out, I now need to allow a user to access it from the web. This is not an application that was written to be web facing, and it has a bunch of gaping security holes.

What is the simplest way I can make sure this site is securely available to that user, but no one else?

I'm thinking something like apache's simple HTTP authentication, but more secure. (Is OpenID a good match?)

There is only one user. No need for any user management, not even to change password. Also, I trust the user not to damage the server (it's actually his).

If it was for me, I would just keep it behind the firewall and use ssh port forwarding, but I would like to have something simpler for this user.

EDIT: Hmm... judging by the answers, this should have been on serverfault. If a moderator is reading this, consider migrating it.

+8  A: 

if there's only a single user, using a certificate would probably be easiest.

Dave Webb
certificates are more reliable than ip address, go with this one.
Malfist
That looks good. Got a similar page for Ubuntu, by any chance?
itsadok
Google found that one for me. I'm sure it can work the same magic for you. :-)
Dave Webb
I'm looking, I'm looking... :(
itsadok
Apparently I needed to look no further than /etc/apache2/sites-available/default-ssl under ubuntu 9.04...
itsadok
+2  A: 

Basic HTTP authentication can be bruteforced easily by tools like brutus. If his ip is static you can allow his ip and deny all others with htaccess.

Malfist
Use HTTP Digest, it's considerably more secure.
S.Lott
HTTP Digest is only better than Basic HTTP Auth because the password isn't transmitted plaintext but both can easily be bruteforced.
Malfist
The wikipedia article also states that it's encrypted data transfer is exploitable by rainbow tables, which means there's not a whole lot of difference between Basic Auth and Digest. Digest is just harder to break initially. Both forms offer a false sense of security.
Malfist
Only you have the patience, rainbow tables, and the server doesn't handle the nonces well. Watching the IP addresses requesting nonces makes it very difficult to brute force; the server can count requesting addresses over a short period of time and refuse to cooperate with any address over some limit.
S.Lott
Sniff the network, steal the transmission. Rainbow tables can crack it in a few minutes if it's not a complex password, hours if it is. Then you have the password without ever once attempting to log into the server.
Malfist
+4  A: 

How about VPN? There should be plenty of user-friendly VPN clients. He might already be familiar with the technology since many corporations use them to grant workers access to internal network while on the road.

freespace