Web Authentication Models

Status
Not open for further replies.
I have a general curiosity about how login sessions work. I.E., If I log into a website, what's typically happening that shows I have access rights to whichever pages, my specific user profile, etc?

This thought is headed in the direction of what would it take to use a non-local server for authentication? I.e. seperating the content server from the authentication server, keeping all the SSL capability on the authentication server.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
Pysgard":7ejyp1h8 said:
I have a general curiosity about how login sessions work. I.E., If I log into a website, what's typically happening that shows I have access rights to whichever pages, my specific user profile, etc?
This is way too general a question to be answered effectively. In the most general sense: databases are asked about you and what you're allowed to do.

This thought is headed in the direction of what would it take to use a non-local server for authentication? I.e. seperating the content server from the authentication server, keeping all the SSL capability on the authentication server.
This is done regularly and is nothing special. Store a cookie on the user's system, encrypt it with a suitably hairy encryption algorithm, decrypt it when it's handed back to your web server.
 
Blacken00100":2iregio0 said:
Pysgard":2iregio0 said:
I have a general curiosity about how login sessions work. I.E., If I log into a website, what's typically happening that shows I have access rights to whichever pages, my specific user profile, etc?
This is way too general a question to be answered effectively. In the most general sense: databases are asked about you and what you're allowed to do.

This thought is headed in the direction of what would it take to use a non-local server for authentication? I.e. seperating the content server from the authentication server, keeping all the SSL capability on the authentication server.
This is done regularly and is nothing special. Store a cookie on the user's system, encrypt it with a suitably hairy encryption algorithm, decrypt it when it's handed back to your web server.
Y'know, I am getting ahead of myself.

I am working on a social groups website. I want to install a phpBB instance.

I am having anxiety about having forum login pages being unencrypted. Is there any security risk there, or are these considered non-important, or what exactly protects user credentials in these instances?

Am I just being crazy? Looking now, even ars doesn't appear to be using ssl for session login...
 

Pont

Ars Legatus Legionis
26,160
Subscriptor
I am having anxiety about having forum login pages being unencrypted. Is there any security risk there, or are these considered non-important, or what exactly protects user credentials in these instances? Am I just being crazy? Looking now, even ars doesn't appear to be using ssl for session login...

It's nice to encrypt logins so people who reuse the same username and password on your site and their bank's website don't get it stolen from your site. IMO, they are more likely to reuse an important password if you require very strong passwords, because most users can only be bothered to remember one strong password. Ars, for instance, has a very weak password strength requirement.

Whether that's worth the hassle and expense of setting up SSL for the login page is up to you. However, if you're storing any valuable data about the person (CC num, SS digits), then you'd be irresponsible not to have encrypted logins and strong password requirements.
 

BlackHex

Ars Tribunus Angusticlavius
9,638
Subscriptor++
This entirely depends on how secure you want to be.

Are you worried about people intercepting passwords?
Are you worried about people hijacking logins?
Are you worried about people seeing user data?


If you are truely concerned then you need to keep the entire site over SSL and mandate the use of encrypted Secure Cookies. Not all users will be comfortable with that but at this point I'm unaware of any other method that is secure.

Even then you will probably want to layer some trend based security protocols on top of that and implement timeouts.

Security of the web is certainly non trivial. First though you have to decide how much it matters for your use case.
 

DavlinLotze

Ars Scholae Palatinae
830
Pysgard":3mo4dgtm said:
This thought is headed in the direction of what would it take to use a non-local server for authentication? I.e. seperating the content server from the authentication server, keeping all the SSL capability on the authentication server.
Mind if I take the thread in a little different direction? What would it take to separate the client computer doing authentication from the client computer being used? The goal would be a centralized machine/"server" that can log people in automatically to various sites so that they don't have to worry about logging in, nor are the passwords even made available to them.
(An employer liked that I made a page, served from one of the local machines, that serves auto logon scripts for various sites, since it makes logging in easier, and especially because it keeps employees from being able to access the websites from some place other than the business, or after a person has been fired, etc. My system works okay for many sites, but it's a beast to maintain (due to ever-changing websites), and the password is technically available to someone who knows what he's doing and can hack my system.)
 
Typically what happens is that after you provide user id and password, a cookie is created on your machine that contains a session id mapped to a unique long-lived session on the server. Each time you send a request to the server, the session id cookie is sent along with it, and the server knows who you are and what you already did in the session previously. Logging out deletes the session on the server, rendering the session id cookie invalid. Trying to use a session cookie with a session that no longer exists on the server gets you the dreaded "session expired" message.

Generally this scheme is pretty secure, with one exception. The cookie can only be set by the server you're logging into, so it cannot be faked. The session id is long and random, so it cannot be guessed. A well-designed site does not store your password in the session cookie, since there's no real reason to do that. But here's the exception: if someone can listen in on your traffic (e.g. wifi) they can snoop the session id and hijack the session. The only complete defense against that is running everything across SSL, not just the login. Simply put, wrapping only the login in SSL protects your password, but not your session. Luckily SSL is so cheap these days that using it for everything is a no-brainer for most sites.

That's something entirely different from how to do authentication in the first place. It's possible to completely decouple the service you are logging into and the service that provides authentication, to the point where the two services only communicate across the user's browser. SAML does this by leveraging public key cryptography. For example (with handy diagram):
http://www.novell.com/communities/node/ ... %20process

In the end though, no matter how fancy the authentication model, it always comes down to having session cookies in the browser.
 

Faramir

Ars Legatus Legionis
36,356
Subscriptor
DavlinLotze":2oahu7wo said:
Pysgard":2oahu7wo said:
This thought is headed in the direction of what would it take to use a non-local server for authentication? I.e. seperating the content server from the authentication server, keeping all the SSL capability on the authentication server.
Mind if I take the thread in a little different direction? What would it take to separate the client computer doing authentication from the client computer being used? The goal would be a centralized machine/"server" that can log people in automatically to various sites so that they don't have to worry about logging in, nor are the passwords even made available to them.
(An employer liked that I made a page, served from one of the local machines, that serves auto logon scripts for various sites, since it makes logging in easier, and especially because it keeps employees from being able to access the websites from some place other than the business, or after a person has been fired, etc. My system works okay for many sites, but it's a beast to maintain (due to ever-changing websites), and the password is technically available to someone who knows what he's doing and can hack my system.)

This is called single sign on. In the old days kerberos and RADIUS were well neigh ubiquitous, but for various reasons they never caught on for websites. Nonetheless, you can look at the designs thorough understanding of the different pieces that must be present for a robust system (hint: OAuth (1&2) doesn't (Edit: not) have all the pieces!).

Edit:
vv
Unintentional.
 

DavlinLotze

Ars Scholae Palatinae
830
I'm not sure how OpenID would help me. There might be 50,000 sites that support it, but that leaves most that don't, and we have no control over the development of those sites. I don't think OAuth is what I'm looking for either - still requires support from both ends. As mentioned, Kerberos and RADIUS aren't really used for websites either.

Joeri":1auarxdq said:
no matter how fancy the authentication model, it always comes down to having session cookies in the browser.
I think there are some cookie-free authenticating sites, but yeah, 99% of them are going to use session cookies. What I'm wondering is how possible is it to move those sessions from one computer to another. Could a browser plug-in (or quasi-browser) on one computer feasibly log in, collect the relevant info, and then pass the authenticated session to a browser plug-in on another computer which establishes that session inside the browser? Is there something already made which does this?

Pysgard":1auarxdq said:
Am I just being crazy? Looking now, even ars doesn't appear to be using ssl for session login...
Yeah, lots of sites don't use SSL or encryption for their logons. You MUST have something secure for stuff like shopping, banking, tax-paying, medical data, and stuff like that, but a lot of sites are both less critical and less targeted by attackers. I've seen some sites use a system where the password isn't sent over the internet, but only a time-related hash of it, made via javascript in the client's browser. You could use something like that if you don't want to mess with SSL.
 

technophile

Ars Legatus Legionis
23,768
DavlinLotze":1wgbi5jm said:
I'm not sure how OpenID would help me. There might be 50,000 sites that support it, but that leaves most that don't, and we have no control over the development of those sites. I don't think OAuth is what I'm looking for either - still requires support from both ends. As mentioned, Kerberos and RADIUS aren't really used for websites either.
If you're looking to authenticate with arbitrary sites you don't control from one computer, and then pass that authentication to another computer for them to use, then yes, you're looking at session hijacking. You could do it via any of the current methods; if you control both client PCs and they are on the same network, you could set up a relatively simple proxy relationship where both PCs attach to the same proxy instance, the first PC logs in, and the proxy just makes sure any auth/session cookies are added to all outgoing requests. This would be transparent from the second client PC's view, requiring no changes at all.

Regardless, anything you do is going to be a hack and highly vulnerable to either SSL implementations or changes in the sites' authentication methods.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
Ardax":3dvaff81 said:
What I'm wondering is how possible is it to move those sessions from one computer to another.
That's exactly what session hijacking is, whether you do it intentionally for yourself or someone else does it for you.
And it's also fantastically insecure and a really fucking bad way to do things on many different levels.

If you need to constrain access to a set of sites, there's a tool for that. It's called a VPN.
 
Status
Not open for further replies.