Google Authentication at Scale
Google Authentication at Scale
Authentication at Scale
Google is investing in authentication using two-step verification via one-time passwords and public-key-
based technology to achieve stronger user and device identification.
1540-7993/13/$31.00 © 2013 IEEE Copublished by the IEEE Computer and Reliability Societies January/February 2013 15
Authorized licensed use limited to: KTH Royal Institute of Technology. Downloaded on September 20,2022 at 04:38:05 UTC from IEEE Xplore. Restrictions apply.
View from the C-Suite
accounts justify stronger protections than are cov- a sophisticated password manager. This failure mode
ered in this article. remains among the most common preventable prob-
lems and was a prime motivation for the two-step verifi-
We focus on protecting access to what we call spokes- cation system we describe later.
person and sensitive accounts. Note that accounts might A closely related failure mode is offline brute-forcing.
move from one category to another over time. For Many advise choosing a high-entropy password (http://
example, a store account might be downgraded when xkcd.com/936) to harden password hashes, which may
its payment credentials expire. Upgrade is more com- be stolen by SQL injection attacks and other means.5
mon and less noticeable—for instance, when a Twitter Users sometimes type their password in the wrong
account accumulates more followers or a user registers text field or type a commonly used password rather
an email account as a bank- than the intended one
ing account recov- owing to muscle
ery backup. Security and usability problems memory. We haven’t
seen evidence that
are intractable: it’s time to give up
Common such lost passwords
Threats on elaborate password rules and are actively abused,
We contend that look for something better. but internal data on
security and usabil- Google employees
ity problems are indicates that such
intractable: it’s time to give up on elaborate password mistakes are common and can leak high-value pass-
rules and look for something better. Prominent exam- words. Internally, we mitigate this threat by forcing pass-
ples of today’s password authentication system failures word change when such a mistake occurs, but a better
include the “mugged in Madrid” scam directed against solution would be to use a password manager that under-
journalist James Fallows’ wife;1 the compromise of stands context and thus can prevent this confusion.
Sarah Palin’s email account during the 2008 presiden- Another authentication failure mode is the use of
2
tial election season; and most recently, the multiple easily guessed security question and answers, or as
account takeover of journalist Mat Honan. 3 wags say, “something you know” paired with “some-
People are reactive about security; it’s rational to thing everyone knows.” Even if nobody knows the
invest only as much effort as necessary to reduce risk name of your crush in the third grade, there are a finite
to an acceptable level. Even with an easier alternative to number of names to guess. A strong use of security
passwords, justifying transition costs would be difficult. Q&A is to make up random answers, write them down
So, we owe it to the reader to not only cite anecdotes in a safe place, and use them only for account recovery.
but also systematically list the common attacks used in Such security answers can be thought of as long-term,
the wild. stable passwords and resist capture by being stored
Phishing is a widely reported password failure offline and rarely used. Because few users will know to
mode: attackers lure users to a login page that looks operate in this mode and many would misplace their
like one they’re used to, perhaps by proxying to the real answers, it’s probably better to abandon the security
authentication server or by harvesting their passwords Q&A approach.
and even supplemental two-factor codes or security Malware infection is another class of failure mode.
questions and answers. By reading about the problem For example, Zeus logs keystrokes and steals authen-
or, even better, hearing about a security breach from tication tokens.6 Although it’s important for users to
friends and family and observing the pain it causes, run up-to-date software from trusted sources and some
users improve their chances of recognizing an attack. kind of antivirus scanning, these aren’t sufficient on
Password managers can help if they’re well integrated their own due to the constantly evolving threat of 0-day
with the device and browser, so passwords are used only attacks that exploit new and unknown bugs in today’s
with the correct sites. However, users would still need to complex software systems. Building more hardened
guard against clever attacks.4 platforms is still the best defense, but in this article
Reuse is another common password failure mode. we also discuss some approaches for channel binding
A password from a throw-away account at a weakly authentication tokens to the client device for which
defended site might be lost through intrusion, then used they were issued.
by attackers to access other, more valuable accounts. Perhaps most important, password loss can be
Common security advice is to pick a different password undetected, only to resurface later on other devices.
for each site. Although this advice is wise, using mul- Therefore, we aim to create consumer-ready tools
tiple passwords is burdensome unless combined with using hardware-protected public-key cryptography for
www.computer.org/security 17
Authorized licensed use limited to: KTH Royal Institute of Technology. Downloaded on September 20,2022 at 04:38:05 UTC from IEEE Xplore. Restrictions apply.
View from the C-Suite
harm. After studying hijacking campaigns directed at In Android OS versions Ice Cream Sandwich
high government officials, we found that among the and higher, 2sv users can set up their phones via a
hundreds whose password had been stolen, presumably browser-based sign-in flow that the system offers
by phishing, two officials had enabled 2sv and were suc- when a second factor is necessary. The browser flow
cessfully protected from compromise.7 enables a flexible HTML-based UI that incorporates
However, not nearly enough of our users are pro- a 2sv challenge, avoiding the need for ASP. Further-
tected, and we recognize that awkward corner cases more, Android’s centralized account management
and inadequate documen- model makes it unneces-
tation contribute sary for multiple
to this.8 We will In the future, we envision users will apps to ask the user
continue to polish for the same pass-
own enough authorized devices
the rough spots. To word and 2sv code;
minimize setup time, that they can always use an old instead, these apps
we encourage SMS device to authorize a new one. request the sys-
or voice delivery of tem account man-
2sv codes. Approxi- ager for short-lived
mately 10 percent of our users subsequently install and scoped tokens for the data they need to access. There-
provision the offline smartphone application for code fore, users in the Android ecosystem have an easier
generation, which doesn’t require working cellular ser- time setting up 2sv.
vice or even a registered phone number. Initially, we thought of 2sv as part of user authentica-
When deployed at scale, some users will experience tion, much like the one-time password (OTP) tokens
account lockout owing to lack of coverage while travel- that enterprises commonly require for remote authen-
ing, temporarily slow text message delivery, loss of the tication. To make 2sv practical for consumers, we
device, changing of mobile phones without requesting reduced the default verification requirement to once per
phone number portability, and so forth. We find that month. But, we found that 30 days is either too short
customer support for account recovery is crucial in or too long; it’s annoyingly frequent and disconcerting
wide 2sv deployment. when applied independently to every browser in every
Fortunately, many users set up backup modes for device and yet too large a window of vulnerability for a
code generation, such as home or work landlines, a fam- lost, unlocked device.
ily member or friend’s phone, and paper-based codes. We changed our mental model to treat 2sv primarily
These users tend to self-recover from issues related to as a means of permanently authorizing a client device.
loss of their primary 2sv code generator. We’ve also (Users can still achieve the old behavior if desired; the
found that the smartphone app users rarely need addi- 2sv validation page includes a checkbox that, if not
tional help because, among other reasons, they’re unaf- checked, indicates the 2sv cookie should expire at the
fected by message delivery issues. end of the browser session rather than last forever.)
Users with many client-side applications that allow Requiring verification once per month had a training
for only traditional username/password-based sign-in advantage; verification was frequent enough to remind
tend to have the hardest time setting up 2sv. Typical users to bring their phone when traveling or update
examples include IMAP-based mail clients on desk- their registered phone number after a change. Now if
tops and certain smartphones. To allow backward users go a long time without typing a 2sv validation
compatibility on those apps and devices, we provide code, we might remind them about their 2sv enrollment
a transition feature called application-specific pass- and phone number information and perhaps even ask
word (ASP). An ASP is intended to be a high-entropy for a practice code. But we won’t lock them out of their
machine-generated password that’s hard to remember account if the browser already has a valid 2sv cookie.
and consequently hard to phish. Unfortunately, the We’re reasonably satisfied with this balance.
same properties that increase such passwords’ secu- A final interesting observation about 2sv is that it’s
rity also cause friction for users. To fix this problem abused by account hijackers. After stealing the account
across the industry, we prefer that client platforms password and breaking in to the account, hijackers add
employ a centralized account management model 2sv (with their own phone number) just to slow down
with a browser sign-in option, as the Android OS does. account recovery by the true owner! Anecdotally,
Another weakness of ASP is the misimpression that it we’ve heard that the online game World of Warcraft—
provides application-limited rather than full-scope one of the few other consumer services that has very
account access. (OAuth, which we discuss later, is the widely deployed two-factor authorization—has seen
right tool for that job.) the same phenomenon.
www.computer.org/security 19
Authorized licensed use limited to: KTH Royal Institute of Technology. Downloaded on September 20,2022 at 04:38:05 UTC from IEEE Xplore. Restrictions apply.
View from the C-Suite
www.computer.org/security 21
Authorized licensed use limited to: KTH Royal Institute of Technology. Downloaded on September 20,2022 at 04:38:05 UTC from IEEE Xplore. Restrictions apply.
View from the C-Suite
and likely lead to gratuitously different systems. Web 2. “Tennessee Man Convicted of Illegally Accessing Sarah
service providers searched for a substitute to the bad Palin’s E-mail Account and Obstruction of Justice,” Dept.
practice of users giving away their passwords to third Justice, 30 Apr. 2010; www.justice.gov/opa/pr/2010/
parties for scraping information like contacts, and came April/10-crm-509.html.
up with multiple independent protocols like Google’s 3. M. Honan, “How Apple and Amazon Security Flaws Led to
AuthSub, Yahoo’s BBAuth, and Facebook’s Login. The My Epic Hacking,” Wired, 6 Aug. 2012; www.wired.com/
industry has recently made great progress toward a uni- gadgetlab/2012/08/apple-amazon-mat-honan-hacking.
fied standard under the OAuth 2.0 umbrella. 4. K. Bhargavan and A. Delignat-Lavaud, “Web-Based
OAuth provides a way to grant scoped access to Attacks on Host-Proof Encrypted Storage,” Workshop
an account using a bearer token inside SSL, which the Offensive Technologies (WOOT 12), Usenix, 2012; http://
account owner can revoke on a per-delegation basis.11 moscova.inria.fr/~karthik/pubs/host_proof_woot12.
As a potential improvement, we envision that OAuth pdf.
bearer tokens could be channel-bound to an SSL ses- 5. F. Pesce, “Lessons Learned from Cracking 2 Million
sion that uses client authentication. LinkedIn Passwords,” Qualys Security Labs, 8 June
An aside on terminology: there is another authen- 2012; https://community.qualys.com/blogs/security
tication standard called OATH that has nothing to labs/2012/06/08/lessons-learned-from-cracking
do with OAuth. The Google Authenticator App for -2-million-linkedin-passwords.
Android, Blackberry, and iOS implements the HMAC- 6. K. Stevens and D. Jackson, “Zeus Banking Trojan Report,”
based OTP (HOTP) algorithm (RFC 4226) and the Dell SecureWorks, 11 Mar. 2010; www.secureworks.
Time-based OTP (TOTP) algorithm (RFC 6238), com/research/threats/zeus.
which are central to OATH. It’s easy to get confused by 7. “Ensuring Your Information Is Safe Online,” Google
the proliferation of labels. Official Blog, 1 June 2011; http://googleblog.blogspot.
The Google Cloud Print architecture provides a nice com/2011/06/ensuring-your-information-is-safe.html.
example of both service accounts and delegation. When 8. J. Fallows, “Gmail’s 2-Step Verifications: Some
printing a document, users share limited-time read FAQs,” The Atlantic, 9 Aug. 2012; www.theatlantic.
access to that one document with the service account com/technology/archive/2012/08/gmails-2-step
embedded in the cloud-ready printer. The service -verification-some-faqs/260934.
account identifies itself with an OAuth2 refresh token 9. M. Dietz et al., “Origin-Bound Certificates: A Fresh
obtained using a version of the OAuth2 device flow. Approach to Strong Client Authentication for the Web,”
Users don’t need to grant the printer any more access Usenix Security Symp., Usenix, 2012; https://www.usenix.
to their personal information than the contents of the org/conference/usenixsecurity12/origin-bound
document. Conversely, the printer (which might be in -certificates-fresh-approach-strong-client-authentication.
a public location) doesn’t give users direct connectivity 10. B. Laurie, A. Langley, and E. Kasper, “Certificate Trans-
or authority. parency,” Internet Engineering Task Force, 29 Nov. 2012;
http://tools.ietf.org/html/draft-laurie-pki-sunlight.
11. D. Hardt, “The OAuth 2.0 Authorization Framework,”
client-side technologies and authentication methods Eric Grosse is vice president of security engineering
using one-time passwords and public-key-based technol- at Google. His research interests include all areas of
ogy to strengthen user and device authentication. practical computer and network security and privacy.
Grosse received a PhD in computer science from
Acknowledgments Stanford. He’s a member of ACM, IEEE, and SIAM.
We thank Ben Lauri, Brian Eaton, Diana Smetters, Dirk Bal- Contact him at [email protected].
fanz, Eric Sachs, Frank Cusack, Marc Donner, Marius Schilder,
Naveen Agarwal, Nishit Shah, Roberto Ortizr, Sam Srinivas, Mayank Upadhyay is principal engineer at Google. His
Úlfar Erlingsson, the rest of the 2sv team, and the anonymous research interests include many aspects of Web secu-
referees for helpful comments and material. rity, wireless network security, and usability. Upad-
hyay has an MS in computer science from Stanford.
References Contact him at [email protected].
1. J. Fallows, “Hacked!,” The Atlantic, Nov. 2011; www.
theatlantic.com/magazine/archive/2011/11/hacked/ Selected CS articles and columns are also available for free
308673. at http://ComputingNow.computer.org.