Over a million developers have joined DZone.

Modern Authentication and Authorization: A Brief Introduction

Developers are plagued by more and more problems, and two of the most prominent are authorization and authentication. Here's a brief intro to authentication and authorization: what they are, biggest challenges, and current standards.

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

One of the problems developers face today is authentication and authorization (hereafter referred to as AuthN and AuthZ, respectively, so we can be cool like that). Engineers are always called on to authenticate or authorize access to applications, systems, or apps. And if they’re not, they should be. Constantly.

We tend to think of AuthN|Z (another neat abbreviation you’ll see now that you’re in the know acronymically) as things only people do. Really, how presumptuous! How dare we deny the inconvenience of having to authenticate and authorize from computer systems or software components! Very lame of us.

The fact is that AuthN|Z should be something we do when people access our systems as well as when other systems access our systems. Sometimes we should authenticate internal system components too. And when we do, like anything else, it’s always best to use standards first before resigning yourself to writing your own AuthN|Z schemes. It’s really easy to mess these kinds of systems up. They’re complicated, they use tons of crypto, and they’re really, really, hard to get right the first time.

There're three major standards in play today in this area. These are OAuth, SAML, and Open ID. Google, Amazon, Facebook, and just about any other major internet application provider supports at least one of these standards and most support all of them. There’s a final authentication technology out there today, CAS (for Central Authentication Service), and we’ll discuss that too.

These are usually used to authenticate people to use various cloud application offerings rather than authenticating or authorizing software components or subsystems. We’ll review these three standards, and look closely at how they work to authenticate users and how they could be used to authenticate subsystems. We’ll go over the threats to these standards too. Before we get started with all that detail, let’s look at what these standards are, what they were designed for, and where they started.

SAML. OASIS started work on SAML in 2001. In 2002, they released the first specification as an OASIS standard. Currently on version 2.0, SAML addresses web browser single sign-on (SSO). The common implementations use XML data passed between various subsystems to authenticate users. OpenID addresses the same problem, and experience has shown it to be a bit more scalable.

OAuth. Blaine Cook started working on OAuth in 2006 while working on OpenID at Twitter. At the time, they were looking for a way to integrate Ma.gnolia widgets, and after a search for alternatives decided to pursue their own solution as nothing else seemed to fit their needs. Fast forward to today, where OAuth and the newer OAuth 2.0 are common protocols used to authenticate and authorize users into third-party web-based applications. Designed for HTTP, OAuth uses access tokens as the basis for user authentication, a common pattern.

OpenID. Brad Fitzpatrick started work on OpenID in 2005 while at Six Apart. By 2008, it had been supported by Sun Microsystems and Yahoo! for authentication and authorization. Today, the latest version of OpenID, OpenID Connect, builds on OAuth 2.0 as an authentication protocol. It supports signing and strong encryption.

CAS. CAS is another SSO protocol for web applications. It was initially designed and developed by Shawn Bayern at Yale. By 2004, it was a project in the Java in Administration Special Interest Group, which today manages its maintenance and ongoing development. Frequently called Jasig CAS, it’s in its third version.

With a strong understanding of these four standards and associated implementations, you’ll never need to develop your own authentication or authorization protocol, and you’ll have the information to stop anybody else who might be thinking about it, doing them a favor.

As you can tell, this is the start of what promises to be an interminably long series on authentication and authorization standards and technology. This rabbit hole’s deep, but at the end you’ll have a strong understanding of why, when, and how to use these technologies to secure your systems. Stay tuned!

Learn tips and best practices for optimizing your capacity management strategy with the Market Guide for Capacity Management, brought to you in partnership with BMC.

Topics:
authentication ,authorization

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}