Subject: Re: [kitten] [saag] HTTP authentication: the next generation

From: Robert Sayre <[email-masked]>
Date: Wed, 5 Jan 2011 20:28:08 -0500

> Peter Saint-Andre <[email-masked]> wrote:
> 2. In 2007, Robert Sayre put together a few slides on the topic:
> http://people.mozilla.com/~sayrer/2007/auth.html

These are back on the Web, in case anyone missed them (probably not).

On Sun, Dec 12, 2010 at 5:39 PM, Roy T. Fielding <[email-masked]> wrote:
>
> Define them all and let's have a bake-off.  It has been 16 years since
> HTTP auth was taken out of our hands so that the security experts could
> define something perfect.  Zero progress so far.

Hard to disagree with this assessment.

It's pretty easy to define something better than the current HTTP
authentication mechanisms, but pretty hard to design something more
popular than forms+cookies.

I've looked at this problem a little bit, and I gather the strictly
technical security properties we're looking for are pretty well
understood. Deployment and presentation control are the tough parts.
Presentation control is actually a security trade-off--to get the
control web designers want, you have to present graphics before the
server has been authenticated. Also, I suspect it will be difficult to
deploy a new HTTP mechanism that can withstand replay and DoS attacks,
unless proxy conformance gets a lot better. So, I think those
advocating TLS-only solutions might turn out to win the day, but not
because the security properties on offer are particularly compelling.

I think the IETF might do better to focus on a smaller problem, at
first. People often use self-signed certificates with HTTP/TLS, even
though the first thing their websites ask the user to do is type a
username and password into a form. There are some well-understood ways
to make this process more secure. Why hasn't the IETF fixed this
problem? If this smaller problem has no ready solution, then the
larger issue of authentication on the entire Web seems like a tough
nut to crack.

It could be that the reasons for this lack of progress are
nontechnical. Just throwing that out there.

-- 

Robert Sayre

"I would have written a shorter letter, but I did not have the time."

---

From: Ben Laurie <[email-masked]>
Date: Thu, 6 Jan 2011 15:31:51 +0000

> larger issue of authentication on the entire Web seems like a tough

Two comments (one really being a response to Roy):

1. The IETF has fixed the problem, but no-one is using the fix - perhaps
because it is not clear that it is the fix. I speak of RFC 4279, TLS
pre-shared keys. These could be derived from a hash of the password and the
site name, for example, and thus provide secure mutual authentication
despite password reuse.

2. I have often heard (though I am not aware of hard evidence for this,
nevertheless I find it plausible) that one reason no-one has bothered to
improve HTTP auth is because no-one would use it since site owners want to
control the user experience around signin. It seems to me, therefore, that
HTTP is the wrong layer to fix the problem at - it needs to be pushed down
into HTML or Javascript so that the page can control the look, while
appropriate HTML elements or JS code can deal with the secure exchange of
data.

Of course, this still leaves the issue of trusted path: although we can
provide elements which are safe to use, even when being phished, how does
the user know those elements are actually being used, rather than simulated
so as to get hold of the underlying password?

The answer to this problem is hard, since it brings us back to taking the UI
out of the sites hands.

> nontechnical. Just throwing that out there.

If you think UI is nontechnical, then I agree.

Cheers,

Ben.

---

From: David Morris <[email-masked]>
Date: Thu, 6 Jan 2011 08:03:54 -0800 (PST)

> The answer to this problem is hard, since it brings us back to taking the UI

Which is only helpful if you can somehow gaurantee that the user agent 
software hasn't been compromised. Not something I'd bet on...

---

From: Tim <[email-masked]>
Date: Thu, 6 Jan 2011 08:25:59 -0800

> appropriate HTML elements or JS code can deal with the secure exchange of

Yes, the user experience piece is definitely the biggest adoption
problem for HTTP auth, IMO.  However, I disagree that HTTP is the
wrong layer.  It has already been shown (by myself and others) that
using HTTP authentication and controlling the user experience can
largely be achieved already.  A few tweaks to browser 401 response
behavior (which doesn't require standards changes) and the ability for
servers to force a log out are all that's left to provide to make
this reliable.

As for RFC 4279, I'm not really familiar with it, but I imagine the
mechansims which allow for user experience customization right now
with HTTP auth could easily be extended to any TLS authentication
mechansim.  The only requirement there would be to add some simple
language allowing for this behavior in [1].  That is, allow
XMLHttpRequest objects to hand the credentials they already accept off
to the TLS layer, either for RFC 4279 or for SRP/TLS.  

> The answer to this problem is hard, since it brings us back to taking the UI

Yes, so what I've outlined above and elsewhere is a relatively simple
transition path to allow adoption of better authentication standards
with customizable user interfaces.  But those are problematic by
design.  However, I'd assert that moving web applications off of
cookies to some lower-layer mechanism is going to be a required first
step in order to provide authentication prompts that are part of the
browser, for those who need that security.

tim

1. http://www.w3.org/TR/XMLHttpRequest/

---

From: Ben Laurie <[email-masked]>
Date: Thu, 6 Jan 2011 18:16:15 +0000

> software hasn't been compromised. Not something I'd bet on...

That's rather overstating it. It's perfectly helpful when the UA
software hasn't been compromised, which is a non-zero fraction of the
time.

When the UA s/w has been compromised I'm quite happy to fail to fix
the problem: the right answer to that is to improve the robustness of
the UA.

---

From: Ben Laurie <[email-masked]>
Date: Fri, 7 Jan 2011 12:14:32 +0000

On 7 January 2011 08:24, Yaron Sheffer <[email-masked]> wrote:
> [Culling down the mailing lists]
>
> Hi Ben,
>
> No, RFC 4279 should not be used with (a hash of) human-memorable passwords,
> because it would be vulnerable to dictionary attacks. See
> http://tools.ietf.org/html/rfc4279#section-7.2. SRP, EKE and similar schemes
> should be used instead.

Fair point, though there seem to be at least political barriers to
using SRP, and EKE and friends have other issues.

>
> Thanks,
>        Yaron
>
> On 01/06/2011 05:31 PM, Ben Laurie wrote:
> [...]
>
>>
>>
>> pre-shared keys. These could be derived from a hash of the password and
>> the site name, for example, and thus provide secure mutual
>> authentication despite password reuse.
>>
> [...]
>

---

From: Simon Josefsson <[email-masked]>
Date: Fri, 07 Jan 2011 15:29:40 +0100

The initial paper contains a security analysis with some reduction-style
arguments:

http://srp.stanford.edu/ndss.html#SECTION00040000000000000000

As with any crypto document from that time, it will lack in how the
assumptions are stated and the reductions are made.  That considered, is
there something in particular that you think is missing in there?

We can fix the problem with lack of review by implementing and deploying
the protocol, then certainly researchers are bound to focus on it. ;-)

/Simon

Yaron Sheffer <[email-masked]> writes:

> Another issue is that SRP (as opposed to other protocols in this
> space) is not provably secure, and in fact has had relatively little
> cryptographic review, AFAIK. I would be glad to be proven wrong on the
> second point.
>
> Thanks,
> 	Yaron
>
> On 01/07/2011 01:57 PM, Simon Josefsson wrote:
>> One way to mitigate the dictionary attack problem is to do PBKDF#2
>> processing of the password before it hits TLS-PSK.
>>
>> However I agree that TLS-SRP have superior properties, and it is widely
>> implemented.  There is no practical reason to prefer TLS-PSK over
>> TLS-PSK for password-based TLS authentication.  One issue is that RFC
>> 5054 is Informational rather than Standards Track (same issue as for
>> TLS-OpenPGP), which is due to political reasons.
>>
>> /Simon
>>
>> Yaron Sheffer<[email-masked]>  writes:
>>
>>> No, RFC 4279 should not be used with (a hash of) human-memorable
>>> passwords, because it would be vulnerable to dictionary attacks. See
>>> http://tools.ietf.org/html/rfc4279#section-7.2. SRP, EKE and similar
>>> schemes should be used instead.
>>>
>>> Thanks,
>>> 	Yaron
>>>

---

From: Simon Josefsson <[email-masked]>
Date: Fri, 07 Jan 2011 17:54:46 +0100

Yaron Sheffer <[email-masked]> writes:

> - I am not a cryptographer, so I am treading on extremely thin ice here.
>
> - SRP is certainly better than using PSK with passwords, which is
> *definitely* vulnerable to dictionary attacks.

One final addition here, the situation for PSK depends on the flavour
and whether you are talking about active or passive attackers.  The
statement is true for plain PSK, but less so for DHE_PSK and RSA_PSK.
Section 7.2 of 4279:

   For the PSK ciphersuites, an attacker can get the information
   required for an off-line attack by eavesdropping on a TLS handshake,
   or by getting a valid client to attempt connection with the attacker
   (by tricking the client to connect to the wrong address, or by
   intercepting a connection attempt to the correct address, for
   instance).

   For the DHE_PSK ciphersuites, an attacker can obtain the information
   by getting a valid client to attempt connection with the attacker.
   Passive eavesdropping alone is not sufficient.

   For the RSA_PSK ciphersuites, only the server (authenticated using
   RSA and certificates) can obtain sufficient information for an
   off-line attack.

/Simon

> - That said, I have done my little bit of due diligence (talked to the
> author of SRP and to several cryptographers who've played with some of
> these schemes). Personally, I would rather use a protocol that's been
> formally proven (PACE, AugPAKE, other descendants of EKE) or has had
> real solid cryptographic review (the original EKE). Again, I would be
> happy to be proven wrong on this.
>
> - Even if we start with a mathematically perfect protocol, we are
> bound to make design and engineering mistakes. And Marsh and his like
> will happily poke holes into these implementations :-) But I'd like to
> avoid compounding the risk with cryptographically unsound protocols.
>
> Thanks,
> 	Yaron
>
> On 01/07/2011 04:29 PM, Simon Josefsson wrote:
> _______________________________________________
> Kitten mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/kitten

---

From: Tim <[email-masked]>
Date: Fri, 7 Jan 2011 09:42:13 -0800

>    RSA and certificates) can obtain sufficient information for an

In the general case, I don't think it is useful to differentiate
between passive and active attackers.  Performing man-in-the-middle
attacks is no more difficult (in a big-O sense) than performing
passive attacks.  In almost every modern network, these attacks
require the same level of network access.

Just a pet peeve of mine.

cheers,
tim

---

From: Phillip Hallam-Baker <[email-masked]>
Date: Sat, 8 Jan 2011 11:07:38 -0500

I think that Ben is right that we are solving the wrong problem.

The problem is that users are asked to maintain accounts at literally
HUNDREDS of accounts.

And some cretins, some utter morons, some bog-brained berks think it is
reasonable to tell the user to have a different password for every one!

I can't remember the account names, the password is easy as I only had one
(for non financial) - until those cretins at Gawker screwed up. Now I have
to reset my password at all those places.

We have to solve the federated auth problem and it is really, really easy:

Account Name is the RFC 821/822 email address.

This is what the Web has started to adopt of its own accord as a user
account identifier. It is the only one that people can remember reliably.

Authentication service is resolved via DNS service lookup

i.e. SRV or similar. I can show people how to fix up the issues to do with
use of non-canonical names.

Client authenticates to authentication service using any protocol they both
support.

This is quite simple to implement, just stick a list of supported auth
services in the DNS.

We can re-use all those existing auth protocols that work (SAML would be a
good choice but we don't need to be overly restrictive here.)

HTTP carries a standardized, non-linkable auth token

I have some ideas on how we could modify DIGEST to do this. DIGEST would not
be problematic if the password had 128 bits of ergodicity and we upgraded
the digest function.

The reason for re-using DIGEST here would be to avoid patent encumbrances. I
considered the issue of linkability at great length when writing the
original DIGEST design.

At the moment I am focused on getting the foundation laid. But I will try to
come up with a full proposal before Prague.

I know that you can achieve some of the desired authentication properties
with public keys at the client. The problem is that our current use of
computers has gone way beyond the one-machine-per-person paradigm

On a recent trip to Europe with the family I counted that we had 10
computers with us capable of supporting IP (3 laptops, 3 iPhones, 2
Nintendos, 1 iPad and a kindle).

Cardspace has some really, really great properties but they are totally lost
when you try to make the service accessible from multiple machines by
putting it 'in the cloud'. In fact, other than a manager, I have never found
anyone who reven thinks they know what they mean by 'in the cloud' for
CardSpace. I certainly have never seen an explanation I can understand.

Devices get lost. Devices get stolen. We don't want to encourage that so
there needs to be something more than just a certificate based client auth
scheme.

I think we need some form of centralized (for given account) account
management in the mix so that the user can authorize/deauthorize devices for
use (c.f. Amazon's Kindle account management)

So there are basically two architectural options for using public key. One
is to use it strictly between the client and the auth service and use a
token like approach as discussed above. Another is for the auth service to
issue an assertion of the form 'you can tell its fred by this public key
(amongst others)'.

SAML already has support for both approaches BTW.

> pre-shared keys. These could be derived from a hash of the password and
the
> saag mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/saag
>
>

-- 
Website: http://hallambaker.com/

---

From: Phillip Hallam-Baker <[email-masked]>
Date: Sat, 8 Jan 2011 11:21:42 -0500

> the problem: the right answer to that is to improve the robustness of

+1

If the UA is stuffed then the user is totally and utterly stuffed anyway.

In particular if the UA is stuffed then a forms based experience is just as
stuffed. If we are going to hypothecate attack models people have to be
willing to apply them to their preferred solution too.

The sensible approach is to work out how to stop the user from being stuffed
e.g.

 * Comodo's free Anti-Virus with Default Deny Protection (TM)
 * Use code signing + trustworthy computing
 * Use a restricted browser

Now I have a lot of ideas on how we can tackle these, but they are not
relevant to this debate.

I do however have a different take on the UI issue.

HTML forms did have an advantage over the pathetic UI that browsers provided
for BASIC and DIGEST (most don't even tell the user which is in use).

But a federated auth scheme supported at the HTTP level could be simpler
still. Instead of the user having to register for each site, they register
once. Instead of the user having to log in to each site they log in once per
session. Instead of the site having to manage lost passwords and forgotten
accounts because the user has hundreds, this problem does not exist.

It is a user interface crisis that is driving this need in my view.

---

From: Blaine Cook <[email-masked]>
Date: Sat, 8 Jan 2011 09:37:00 -0800

Two points:

1. In this entire thread, no-one has mentioned OAuth. Maybe y'all
don't like it, but it's used to authenticate more HTTP requests by
volume and users than everything-except-cookies combined. You may want
to consider the design of OAuth when proceeding with these
discussions, rather than the laundry list of [completely] failed
protocols.

2. With respect to federated auth, especially using email address-like
identifiers, there has been a bevy of (deployed) work in this regard.
The effort is called webfinger, and is worth a look. Instead of DNS,
we use host-meta based HTTP lookups to dereference the identifiers.
Many diaspora and status.net installs are using it today, and there
are several proposals towards building a security & privacy
infrastructure on top of webfinger (webid is one such proposal whose
incorporation of client-side TLS certificates in a browser context
makes me very weary of its potential for success).

b.

On 8 January 2011 08:21, Phillip Hallam-Baker <[email-masked]> wrote:
> apps-discuss mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/apps-discuss
>
>

---

From: Phillip Hallam-Baker <[email-masked]>
Date: Sat, 8 Jan 2011 12:52:45 -0500

OAUTH and Webfinger are both pretty much as good as you can expect to
achieve if you decide at the start that you are not going to modify the
infrastructure.

But that decision limits what you can expect to achieve.

A particular problem with OAuth is that you can only use the identity
providers that are supported by the particular site. So I had to use my
Twitter account to play spymaster. And when Twitter got shirty and started
blocking other players accounts they lost their game account and their
twitter account at the same time.

There are people who think I should get a facebook account just so that I
can use their application. Not happening.

As for WebFinger, it works, but not nearly as well as a clean DNS scheme.
DNS is designed to address this problem, HTTP is not. And solving the
problem with HTTP requires us to have a scheme that involves DNS + HTTP +
SSL + PKIX which is rather a lot of moving parts and to make matters work
some those parts are not just moving, they are changing.

I think it is a very good idea to look at WebFinger and OAuth and see how to
realize these approaches direct in the infrastructure. But they should be
seen as starting points, not ends.

---

From: "Zed A. Shaw" <[email-masked]>
Date: Sat, 8 Jan 2011 11:49:52 -0800

> discussions, rather than the laundry list of [completely] failed

I don't normally respond, just being a lurker, but this statement is
competely wrong Blaine.  OAuth may be used for more requests, but not
more sites.  It's used on a tiny number of sites, with OpenID being used
on way many more, and even then, not nowhere near the number of websites
that form based authentication and browser authentication methods.

Don't equate twitter having a ton of traffic to OAuth being some kind of
raving success, and sure as hell don't evaluate the technical merits of
something by its popularity.

> makes me very weary of its potential for success).

While I agree that TLS client side isn't going to work, none of the
proposed authentication methods will work without a change to browsers
to support a way for two websites to establish a session in the browser.
If that feature existed you would cut down on a lot of the complexity of
things like OpenID and OAuth.

-- 
Zed A. Shaw
http://zedshaw.com/

---

From: Blaine Cook <[email-masked]>
Date: Sat, 8 Jan 2011 17:29:29 -0800

> something by its popularity.

Agreed - though, facebook is also using oauth-based (not 1.0, but
essentially the same approach) logins, and there are a number of other
sites that do provide oauth-based login infrastructure.

Moreover, the nudge towards oauth is intended with the movement
towards a new auth infrastructure in mind. We'd need some kind of
discovery / negotiation mechanism on top to make it not the
one-or-two-companies-own-the-web play that login-over-oauth is now.
(c.f. OpenID Connect).

b.

> things like OpenID and OAuth.

Again, agreed. ;-)

for the record, I don't think that OAuth itself is a suitable
replacement for HTTP authorisation, but wanted to stir the pot,
especially away from overwrought technical solutions that don't
actually solve anyone's needs.

b.

---

From: Ben Laurie <[email-masked]>
Date: Sun, 9 Jan 2011 13:44:12 +0000

> actually solve anyone's needs.

Towards ones that are ripe for phishing and have no privacy
protections? I don't believe that's a good direction.

---

From: John C Klensin <[email-masked]>
Date: Sun, 09 Jan 2011 13:22:04 -0500

--On Saturday, January 08, 2011 15:32 -0600 Marsh Ray
<[email-masked]> wrote:

> On 01/08/2011 10:07 AM, Phillip Hallam-Baker wrote:
> I think Ben is nearly always right. :-)
> 
> But let me toss out a different perspective. I'll try
> carefully and hope that this doesn't come across as trolling,
> but it is a bit contrarian (hopefully in a good way).
>...

Well, actually, I think this is constructive, useful, and rather
nicely describes the other side of the problem.  

I would add that one important variation on "Person = Identity =
Email address" has historically involved the use of
subaddresses.  Not only do they help considerably with mail
management (pretty much their original purpose) but they provide
an additional  (weak but convenient) measure against email fraud
and identify theft attempts (if I know that mail from my bank is
going to be addressed to "[email-masked]" because that
is the only address they have, then it is pretty clear where
mail that supposedly comes from them but is addressed to
"[email-masked]" should be routed.   Obviously,
if an address that is used for only one vendor or correspondent
gets into the hands of a spammer, it is lots easier to fix that
problem as well.  

Address-per-correspondent also makes password-per-correspondent
much easier too.

Lots of web sites and providers have been really resistant to
that approach.  I had assumed before this that the problem was
just stupidity, but parts of your comments could be expanded to
lead to the inference that having me use more than one address
is not in their interests.    Whatever becomes of that tradeoff,
the IETF should not, IMO, be doing things that encourage them in
directions that reduce our privacy and ability to control our
identities. 

>...
> Which is why everyone just has one email address? Come on,
> most people have several. And often they do so for a reason,
> it's not just that people get new ISPs or switch for new
> features all the time. I train my kids to lie about their
> names and ages when they do stuff online. They don't have
> emails.
> 
> You don't have a personal email and a work email at least?
>...

exactly.  with the emphasis on "at least"

>...
> Bad things happen when you force-fit the wrong model on to the
> design. Security and privacy are always the first to go.
> (Somewhere I saw the other day somebody seriously proposing
> using Facebook as a centralized identity authority.) More
> subtly, people find the system harder to use, and overall they
> just don't like it or trust it as much. People won't use it,
> or they'll use it and not like it, or they won't use it as
> much, or they'll figure out a way to defeat it.

Indeed.  In all of the really significant cases, probably the
latter.  If I had a nickel for every sticky note with a password
(sometimes slightly-disguised) stuck to a screen...  But those
notes are precisely a workaround for "you have to change your
password frequently, you can't share passwords between systems,
and we will insist by various means that you passwords are
strong and that a given password is not obviously derivable from
its predecessors" policies.

>...

   john

---

From: "Zed A. Shaw" <[email-masked]>
Date: Sun, 9 Jan 2011 10:32:37 -0800

> protections? I don't believe that's a good direction.

Ripe for phishing?  I must have missed a whole conversation in all this
cross posting, because last I checked none of the proposed solutions
prevent phishing.

If you can phish one site you can phish another.  It's not the sites or
the protocol that causes phishing, or whether you've got a billion
redirects or diffie-helman to the hilt.  OpenID or Oauth or
plain-old-form-auth don't prevent or cause phishing.

What causes phishing is users have no idea that two websites are
different.  As proof of this, I present to you the ReadWriteWeb/Facebook
Login fiasco:

http://www.readwriteweb.com/archives/facebook_wants_to_be_your_one_true_login.php

This article became the #1 search result for "facebook login" for a
short period of time on google.

Not only did the users not realize RWW was *not* the facebook login, but
they created accounts, logged in, and then complained that they didn't
like the new facebook in the article comments.  Yes, they thought RWW
was the new facebook.  They are totally different websites, with
different designs and purposes, yet people had no idea.

You may say that's a small sample, but this was done unintentionally.
RWW didn't even try to change their site.  A determined attacker can go
much much farther than just this with a purposeful design that mimics
the facebook login.

And, this was people *logging in* to facebook, effectively using their
direct login (which is also the connect login).  That shows right there
they have no idea where they're logging in to what, and that OpenID,
OAuth, or any auth system doesn't help them.

-- 
Zed A. Shaw
http://zedshaw.com/

---

From: Blaine Cook <[email-masked]>
Date: Sun, 9 Jan 2011 08:40:54 -0800

> protections? I don't believe that's a good direction.

*shrug* If the alternative is Facebook handling everyone's logins, it
can't get much worse, can it?

b.

---

From: Ben Laurie <[email-masked]>
Date: Sun, 9 Jan 2011 19:21:34 +0000

On 9 January 2011 18:32, Zed A. Shaw <[email-masked]> wrote:
> different.

Whilst I do not disagree with this claim, you are wrong. There are
protocols which effectively prevent phishing - so long as password
entry is done in an unspoofable UI.

I am sure that you will respond that UI can be spoofed as easily as a
website can be, and I'm almost ready to agree with that, given that we
still don't have a good answer to that, however, my one small ray of
hope in this regard is that there's only one UI we need to make
unspoofable as opposed to a million websites. And, what's more, we
don't really need to invoke it every time a user logs in to a website
- really what we want is for the user to authenticate to their device
and have the device handle the rest.

OpenID and OAuth are particularly nasty, even by today's standards,
because they provide a trivial route for the phisher to do a perfect
MitM attack on the IdP.

---

From: "Zed A. Shaw" <[email-masked]>
Date: Sun, 9 Jan 2011 12:16:27 -0800

> entry is done in an unspoofable UI.

Alright, to avoid any "violent agreement", can you point me at any
documentation you have on your proposed solution?

-- 
Zed A. Shaw
http://zedshaw.com/