Professional Documents
Culture Documents
Adding Third-Party Authentication To Open Edx: A Case Study: Acm Classification Keywords
Adding Third-Party Authentication To Open Edx: A Case Study: Acm Classification Keywords
Adding Third-Party Authentication To Open Edx: A Case Study: Acm Classification Keywords
Author Keywords
API design; authentication; authorization; education;
identity; privacy; security; testing.
Permission to make digital or hard copies of part or all of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that
copies bear this notice and the full citation on the first page. Copyrights
for third-party components of this work must be honored. For all other
uses, contact the Owner/Author.
Copyright is held by the owner/author(s).
L@S 2015, Mar 14-18, 2015, Vancouver, BC, Canada
ACM 978-1-4503-3411-2/15/03.
http://dx.doi.org/10.1145/2724660.2728675
277
L@S 2015 Work-in-Progress March 1418, 2015, Vancouver, BC, Canada
278
L@S 2015 Work-in-Progress March 1418, 2015, Vancouver, BC, Canada
Users of a first-party authentication system will have a First, by using an abstraction called the authentication
user account with that system. That account will store pipeline, which comes from python-social-auth, future
an identifier for that user, their credentials (such as a implementers can hook into the authentication flow at
nonreversible hash of their password), and other user any point and insert custom code. This is done by
data. exposing the behavior of the authentication code as a
re-entrant stack of function calls via a Python API, each
This is distinct from third-party authentication, where representing a conceptual step in the authentication
the system that requires user authentication (hereafter process. This set of steps can be extended and re-
the authentication consumer) are different from the ordered, and the pipeline as a whole can be paused and
system that users authenticate with (hereafter the resumed on an ad-hoc basis by custom authentication
authentication provider). The steps the user goes code in the containing system.
through under third-party authentication are the same
as in Figure 2 above, except they undergo Second, python-social-auth provides abstractions for
challenge/response with the authentication provider. additional authentication protocols or providers, also
Consequently, the authentication consumer does not via Python APIs. These are vital because many
need to store or validate user credentials. organizations in the educational space have vast pre-
existing computing infrastructure, including custom
This has two advantages. First, it is more convenient single-sign on (SSO) systems for user authentication.
for the user because they do not have an additional set These systems may speak a host of different protocols,
of credentials to manage. Second, the authentication of which Central Authentication Service (CAS) [6] and
implementation of the provider system is often more Shibboleth [7] are the most common. Switching away
secure than authentication systems written by the from their legacy authentication systems is both
authors of the consumer system, since authentication is impractical and undesirable for these organizations.
the provider system authors' core competency.
We wrapped python-social-auth in a thin layer that
Implementation details manages configuration details for a given deployment.
At the core of our implementation [2] is python-social- This is where, for example, any deployment of Open
auth [3], an open-source library that supports third- edX selects the set of providers it will use from the full
party authentication, written in the Python set of available providers. We then refactored the Open
programming language. We picked python-social-auth edX codebase to optionally use python-social-auth for
because it supports three open authentication protocols authentication actions alongside the existing first-party
(OpenID, OAuth 1, and OAuth 2 [4]) and over 60 authentication implementation. We adapted the Open
authentication providers [5], is also written in Python, edX user interface to account for a small number of
and provides good abstractions for the two biggest new user actions, like managing associations between
extension points we identified when gathering an existing Open edX account and any number existing
requirements. provider accounts. Once these associations are
279
L@S 2015 Work-in-Progress March 1418, 2015, Vancouver, BC, Canada
280