Chapter 10. Common OAuth token vulnerabilities

 

This chapter covers

  • What a bearer token is and how to safely generate it
  • Managing the risk of using bearer tokens
  • Safely protecting bearer tokens
  • What an authorization code is and how to safely handle it

In the previous chapters, we’ve analyzed implementation vulnerabilities that affected all the actors of an OAuth deployment: clients, protected resources, and authorization servers. Most of the attacks we’ve seen had a single purpose: to steal an access token (or an authorization code used to get an access token). In this chapter, we go deeper into what it takes to create good access tokens and authorization codes, and what we can do to minimize the risks while handling them. We’re going to look at what happens when the token is stolen, and we’ll see how this can cause relatively minor damage compared with a hijacked password. In summary, the motivations behind OAuth are to offer a more safe and flexible model compared with the password-driven world.

10.1. What is a bearer token?

10.2. Risks and considerations of using bearer tokens

10.3. How to protect bearer tokens

10.4. Authorization code

10.5. Summary

sitemap