Preview: OAuth 2.0 - Getting Started in Web-API Security
Preview: OAuth 2.0 - Getting Started in Web-API Security
0
Getting Started in Web-API Security
by Matthias Biehl
Table of Contents
SUM M ARY
1 INTRODUCTION
10
10
12
2 OAUTH ACTORS
13
2.1
2.2
2.3
2.4
2.5
14
15
15
16
17
OA UTH P ROVIDER
R ESOURCE P ROVIDER
R ESOURCE O WNER
C LIENT
A CTORS IN A C OMPLETE OA UTH S OLUTION
3 OAUTH ENDPOINTS
19
19
19
20
4 OAUTH TOKENS
21
21
22
22
23
23
24
5 OAUTH FLOW S
25
27
27
28
29
29
30
39
42
42
42
43
43
47
47
48
48
49
52
52
52
53
53
6 EXTENSIONS OF OAUTH
57
57
57
58
64
64
64
68
68
68
69
69
69
70
70
70
71
72
8 BACKM ATTER
73
F EEDBACK
A BOUT THE A UTHOR
O THER P RODUCTS BY THE A UTHOR
API ARCHITECTURE AND DESIGN BOOK
R EFERENCES
I MAGE S OURCES
73
73
74
74
75
75
Summary
This book offers an introduction to API Security with OAuth
2.0. In less than 80 pages you will gain an overview of the
capabilities of OAuth. You will learn the core concepts of
OAuth. You will get to know all 4 OAuth Flows that are used
in cloud solutions and mobile apps.
If you have tried to read the official OAuth specification, you
may get the impression that OAuth is complex. This book
explains OAuth in simple terms. The different OAuth Flows
are visualized graphically using sequence diagrams. The
diagrams allow you to see the big picture of the various
OAuth interactions. This high-level overview is
complemented with rich set of example requests and
responses and an explanation of the technical details.
In the book the challenges and benefits of OAuth are
presented, followed by an explanation of the technical
concepts of OAuth. The technical concepts include the actors,
endpoints, tokens and the four OAuth flows. Each flow is
described in detail, including the use cases for each flow.
Extensions of OAuth are presented, such as OpenID Connect
and the SAML2 Bearer Profile.
1 Introduction
People have gotten a bit sensitive about internet security and
privacy. "Mobile apps, web-APIs and Cloud Services - yes, I
like and use them, but ... is my data really secure there? Can I
control what happens to my data and who can access is?"
These and many related questions are top-of-mind for many
cloud and mobile users. And, who can blame them? With the
recent incidents of compromised accounts and stolen
passwords, these types of question are more than justified.
Organizations that offer mobile apps and cloud services have
to address these questions of their users. These organizations
are not any longer only web-startups, Google and Facebook.
Today, the business of almost every industry is transforming
into a digital business. Businesses across the different
industries thus need to think about information security. To
differentiate, more and more traditional businesses
increasingly create digital services for their customers.
That is why all types of businesses need to face the security
questions of their users. Users demand the responsible
processing, storing and transmission of their data and
companies have to react now. To win the trust of their
customers and users, organizations need to take the concerns
of their users seriously. They can do this by building on
established standards instead of building proprietary
solutions.
In the context of web-APIs, mobile apps and cloud services,
there are two established standards for authentication and
authorization: OAuth 2 and OpenID Connect. But which
standard should be used in a given scenario? How does the
technology work? Which experiences have been gathered
from practical use of these technologies?
10
11
1.3 Terms
Two similar terms -- authentication and authorization -- are
used in the context of OAuth and API Security. To understand
the details of OAuth, it is essential to know the distinction
between the two:
Authentication is a concept for answering the question: Who
are you? Authentication provides a method for providing
proof for the claimed identity.
Authorization is a concept that answers the question: What
are you allowed to do? Authorization provides the rights
assigned to the confirmed identity, for example access rights.
For OAuth, authentication is a precondition for proper
authorization.
OAuth relies on authentication and authorization but does
neither. This can be confusing, since the name "OAuth"
suggests that it might be related to one of them.
OAuth 2 is a framework for delegation of HTTP-based access.
Authentication is performed by another component, for
example by the mechanisms of a login page. Authorization
needs to be performed by the API, which uses the token and
information related to the token for authorizing access to the
protected resource.
12
Summary
You do not have the time to read long books? This book
provides an overview, the core concepts, without getting
lost in the small-small details. This book provides all the
necessary information to get started with OAuth in less
than 80 pages.
You believe OAuth is complicated? OAuth may seem
complex with flows and redirects going back and forth.
This book will give you clarity by introducing the seemingly
complicated material by many illustrations. These
illustrations clearly show all the involved interaction parties
and the messages they exchange.
You want to learn the OAuth concepts efficiently? This
book uses many illustrations and sequence diagrams. A
good diagram says more than 1000 words.
You want to learn the difference between OAuth and
OpenID Connect? You wonder when the two concepts are
used, what they have in common and what is different
between them. This book will help you answer this
question.
You want to use OAuth in your mobile app? If you want to
access resources that are protected by OAuth, you need to
get a token first, before you can access the resource. For
this, you need to understand the OAuth flows and the
dependencies between the steps of the flows.
You want to use OAuth to protect your APIs? OAuth is
perfectly suited to protect your APIs. You can learn which
OAuth endpoints need to be provided and which checks
need to be made within the protected APIs.
Purchasing Options
About
Title: OAuth 2.0 Getting Started
in Web-API Security
Author: Matthias Biehl
Release
Date: 2014-11-15
Length: About 76 pages
Categories:
COMPUTERS > Web > Web
Programming
COMPUTERS > Web > Web Services &
APIs