OpenID Connect and Single Sign-On for Beginners

30
OpenID Connect & Single Sign-On for Beginners Abhishek Sivasubramanian Senior Developer Evangelist Suyati Technologies, India @abhisheksubbu Vikas Jain Director, Product Management, Salesforce Identity salesforce.com @VikasJainTweet

description

Websites and applications are implementing social single sign-on to allow users to login using trusted authentication providers such as Google, Facebook, and even Salesforce. Join us to learn how to configure the OpenID Connect authentication provider to allow users to authenticate at Google to access a Salesforce environment. We'll also look at how you can relieve yourself of the burden of password management by having your web app login users via Salesforce.

Transcript of OpenID Connect and Single Sign-On for Beginners

Page 1: OpenID Connect and Single Sign-On for Beginners

OpenID Connect & Single Sign-On for BeginnersAbhishek Sivasubramanian

Senior Developer Evangelist

Suyati Technologies, India

@abhisheksubbu

Vikas Jain

Director, Product Management, Salesforce Identity

salesforce.com

@VikasJainTweet

Page 2: OpenID Connect and Single Sign-On for Beginners

Safe Harbor

Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

 

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.

 

Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: OpenID Connect and Single Sign-On for Beginners

Abhishek SivasubramanianSenior Developer Evangelist

Page 4: OpenID Connect and Single Sign-On for Beginners

Vikas JainDirector, Product Management

Salesforce Identity

Page 5: OpenID Connect and Single Sign-On for Beginners

Agenda

• Problem

• OpenID Connect protocol

• Solution and demo

• Q&A

Page 6: OpenID Connect and Single Sign-On for Beginners

Example Scenario

All employees

Some employees Some employeesEmployees+

External Users

Page 7: OpenID Connect and Single Sign-On for Beginners

Problems IdentifiedUniversal Containers

1. Administrative overload for user management.a) Lots of Reset Password & Change Password requests from users

b) Headache in maintaining same users in different orgs

2. Community users do not effectively use the product community.a) Standard Sign up, Waiting for activation email, activating the account, login is not bringing in

more users.

b) Easiness for users to socialize is missing

3. Employee productivity is reduced.a) Different username/password for same user across different org

b) Tend of forget username/password combinations

c) Takes more time for employees to recollect, access and login to an org

Page 8: OpenID Connect and Single Sign-On for Beginners

Business ExpectationUniversal Containers

1. Solution for : Administrative overload for user management.a) Manage user identity checks from enterprise org

b) Admin should be able to do reset/change password for a user from one org

2. Solution for : Community users do not effectively use the product community.

a) Enable Salesforce Single Sign On

b) Take advantage of the Salesforce Community phenomenon

3. Solution for : Employee productivity is reduced.a) Enable Single Sign-On in the Enterprise

b) Employee should only have one username-password to access all orgs

Page 9: OpenID Connect and Single Sign-On for Beginners

One thing is for sure

We have to get Universal Containers on

SINGLE SIGN-ON

Page 10: OpenID Connect and Single Sign-On for Beginners

OpenID ConnectWhat is that ?

Page 11: OpenID Connect and Single Sign-On for Beginners

OpenID Connect Protocol

OAUTH

Page 12: OpenID Connect and Single Sign-On for Beginners

OpenID Connect – Basic Client Profile

End-UserClient Auth Server

Authorization Request

https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id=3MVG9lKcPoNINVBLWJnB_Y...Lsn&redirect_uri=https%3A%2F%2Fwww.example.com%2Foauth%2Fcallback&state=BLAH_BLAH_BLAH

Redirect with Authz Request

Page 13: OpenID Connect and Single Sign-On for Beginners

OpenID Connect – Basic Client Profile

End-UserClient Auth Server

Authenticate End-User

Credentials/Constent

Redirect to Client

Authorization Response

Redirect with Authz Request Authorization Request

https://www.example.com/oauth/callback/?state=BLAH_BLAH_BLAH&code=aPrxsmIEeqM9PiSOCErbySxQvb...5sdWyjE.DG_TNeow==

Page 14: OpenID Connect and Single Sign-On for Beginners

OpenID Connect – Basic Client Profile

End-UserClient Auth Server

Authenticate End-User

Credentials/Constent

Redirect to Client

Authorization Response

Token Request

Redirect with Authz Request

POST /services/oauth2/token HTTP/1.1Host: login.salesforce.comContent-Type: application/x-www-form-urlencoded

grant_type=authorization_code&code=aPrxsmIEeqM9PiSOCErbySxQvb...5sdWyjE.DG_TNeow==&client_id=3MVG9lKcPoNINVBLWJnB_Y...Lsn&client_secret={client_secret}&redirect_uri=https%3A%2F%2Fwww.example.com%2Foauth%2Fcallback

Page 15: OpenID Connect and Single Sign-On for Beginners

OpenID Connect – Basic Client Profile

End-UserClient Auth Server

Authenticate End-User

Credentials/Constent

Redirect to Client

Authorization Response

Token Request

Token Response

Redirect with Authz Request Authorization Request

{ "id": "https://login.salesforce.com/id/00Dx0000000A9y0EAC/005x0000000UnYmAAK", "issued_at": "1396919485288", "scope": "id full api openid refresh_token chatter_api", "instance_url": "https://na1.salesforce.com", "token_type": "Bearer", "access_token": "00D...u7Bpj72Q.SVBtEBjMK9kLPJWQibME_5M”, "refresh_token": "5Aep8614iLM.D...1UAD1OoIkStoE7T", "id_token": "eyJ...fDXFOfHr0h02sn32pkyN6UPkQr.n_3YkyGEarGSlP5ptcTaroqMxZJvodKc1Y693SJPL2u...CeS8x.1F_zeFx8cEA6HEK", "signature": "z9F5OBkazrIOy/i7mQ7kZwBkEVHBxjb8+5XPvnlk=",}

Page 16: OpenID Connect and Single Sign-On for Beginners

OpenID Connect – Basic Client Profile

End-UserClient Auth Server

Authenticate End-User

Credentials/Constent

Redirect to Client

Authorization Response

Token Request

Token Response

Redirect with Authz Request Authorization Request{ "exp": 1396919605, "sub": "https://login.salesforce.com/id/00Dx0000000A9y0EAC/005x0000000UnYmAAK", "aud": "3MVG9lKcPoNINVBLWJnB_Y...Lsn", "iss": "https://login.salesforce.com", "iat": 1396919485}

Page 17: OpenID Connect and Single Sign-On for Beginners

OpenID Connect – Basic Client Profile

End-UserClient Auth Server

Authenticate End-User

Credentials/Constent

Redirect to Client

Authorization Response

Token Request

Token Response

UserInfo Request

Redirect with Authz Request Authorization Request

GET /services/oauth2/userinfo HTTP/1.1Host: login.salesforce.comAuthorization: Bearer 00D...u7Bpj72Q.SBtEBjMK9kLPJWQibME_5M

Page 18: OpenID Connect and Single Sign-On for Beginners

OpenID Connect – Basic Client Profile

End-UserClient Auth Server

Authenticate End-User

Credentials/Constent

Redirect to Client

Authorization Response

Token Request

Token Response

UserInfo Request

UserInfo Response

Redirect with Authz Request Authorization Request

{ "sub": "https://login.salesforce.com/id/00Dx0000000A9y0EAC/005x0000000UnYmAAK", "user_id": "005x0000000UnYmAAK", "organization_id": "00Dx0000000A9y0EAC", "preferred_username": ”[email protected]", "nickname": ”user", "name": ”Demo User", "email": "[email protected]", "email_verified": true, "given_name": ”Demo", "family_name": ”User", ...}

Page 19: OpenID Connect and Single Sign-On for Beginners

As a Client As a Provider

• Auth Providers• Social single sign-on• JIT provisioning• Account linking

•Connected Apps•Salesforce as an IdP•Enterprise policies for

AuthorizationAuthentication LevelsRefresh Token DecayApplication PolicyAttributes

Example Example

OpenID Connect – Salesforce Implementation

Page 20: OpenID Connect and Single Sign-On for Beginners

Coming back to Universal ContainersWhat are we going to Implement ?

• OpenID Connect – for Social Sign-On into the org– Login to Salesforce org with Google+

• OpenID Connect - For salesforce login into the community– Login to community with any Salesforce org

Page 21: OpenID Connect and Single Sign-On for Beginners

IMPLEMENTATION STEPSSocial Sign-On with Google+ into Enterprise Org

Page 22: OpenID Connect and Single Sign-On for Beginners

Steps for Social Sign-On with Google+ into Enterprise Org

1. Setup MyDomain in the org

2. Configure an OpenID Connect type Authentication Provider pointing to Google.

3. Set a google plus user ID field on user record – for account linking.

4. Update a user record with a valid google plus user ID.

5. Configure enterprise branding page to enable Login with Google.

6. Test Login with Google into the enterprise org.

Page 23: OpenID Connect and Single Sign-On for Beginners

DEMOSocial Sign-On with Google+ into Enterprise Org

Page 24: OpenID Connect and Single Sign-On for Beginners

IMPLEMENTATION STEPSSingle Sign On into Community with any Salesforce Org

Page 25: OpenID Connect and Single Sign-On for Beginners

Steps for Single Sign On into Community with any Salesforce Org

1. Setup OpenID Connect Auth Provider pointing to a Connected App in IdP

2. Registration Handler code can do user checks based on Email or FederationID

3. Set the Community Login Page to use this Auth Provider

Page 26: OpenID Connect and Single Sign-On for Beginners

DEMOSingle Sign On into Community with any Salesforce Org

Page 27: OpenID Connect and Single Sign-On for Beginners

OpenID Connect Playground

openidconnect.herokuapp.com

Page 28: OpenID Connect and Single Sign-On for Beginners

Key Takeaways

• OpenID Connect is a modern Identity protocol that leverages OAUTH

• It provides an ID token and /UserInfo endpoint

• You can use it for Single sign-on (SSO)

• Salesforce can act as an OpenID Connect client. Example: Sign in with Google

• Salesforce can act as an OpenID Connect provider. Example: Login with Salesforce

Page 29: OpenID Connect and Single Sign-On for Beginners

Q & A

Page 30: OpenID Connect and Single Sign-On for Beginners