Log into New Relic Using Twitter, Google Apps, and Others via Auth0

This guest post comes from Martin Gontovnikas, developer evangelist at Auth0, which provides authorization and authentication as a service.

One thing all developers want is to log in with our GitHub, Google Apps, or Active Directory (or whatever you use) account once, and get access everywhere. But implementing single sign-on (SSO) has historically been really difficult for us, the developers. Protocols, tokens, cookies, security issues, and tons of other things always seemed to get in the way.

That’s what we are trying to solve at Auth0, a service that helps implementing SSO for the apps you develop as well for the apps you typically use, like New Relic. In fact, Auth0 is pre-configured to work with New Relic.

In this post, I will explain how easy it is to use any enterprise identity provider (LDAP, Active Directory, SAML, etc.) or social provider (Google Apps, Github, etc.) to log in to New Relic.

Note: The SSO via SAML feature is available only in New Relic’s Pro and Enterprise versions: Upgrade today!

Setup

Creating the New Relic application on Auth0

The first thing you need to do is sign up for an Auth0 account. There’s a free plan, but you also get a month-long trial of the Pro plan after registering. Just go to the signup page to create a new account.

Once you’re at the dashboard, click on Applications on the sidebar and then click on New.

You’ll then see all the different types of applications with which Auth0 can integrate. Auth0 can integrate with existing cloud apps like New Relic, Salesforce.com, AWS, and many more. It also works with your own apps, on any platform.
Let’s take a look at the New Relic integration:

New Relic uses SAML (Security Assertion Markup Language) as the protocol for SSO. As you might have experienced, SAML can be somewhat difficult to deal with, but Auth0 eases the process with tailored instructions for some of the most common cloud apps.

Configuring New Relic to work with Auth0

For each application you select, you’ll get tailored instructions on how to complete configuration. For New Relic, there are just two simple steps:

Step 1. Enter New Relic’s account id

Step 2. Upload Auth0’s certificate and set the specified Remote Login URL in New Relic

You are done!

Setting up the Login options

Now, we can configure which identity providers your users will be able to choose to log into New Relic. We can use social providers or enterprise providers. Adding a new one is as simple as turning on a single switch:

Extending the Login: Adding multi-factor authentication

Once you have the Login configured, you can set up Rules. A Rule is a simple JavaScript function that gets called every time a user signs in or signs up. You can add custom login validations like checking the location of a user. You can call a logging API or activate multi-factor authentication (MFA) when certain conditions are met. In this case, we’re going to create a rule that will trigger MFA if the user’s IP address has changed (which is what would happen if a user switches to another computer).

Summary

That’s it! A few simple steps are all it takes to configure New Relic to work with Auth0. Now you can have single sign-on with New Relic using your Active Directory, LDAP, Google Apps, or Twitter account.

gonto@auth0.com'

Martin Gontovnikas (aka mgonto) is the lead Developer Evangelist at Auth0. He's passionate about technology and he always keeps up to date with everything regarding IT. Martin also contributes to open source with Restangular (famous REST client for AngularJS), AngularWizard, Angularytics, and FactoryPal. He tweets from @mgonto and he blogs at http://gon.to/blog/ View posts by .

Interested in writing for New Relic Blog? Send us a pitch!