User Management with LastUser

34
User Management with LastUser Kiran Jonnalagadda, HasGeek PyCon India, Pune, September 2011 flickr.com/exfordy/128576390/

description

LastUser is a identity aggregating web service written in Python using the Flask framework. It provides an OAuth server that proxies for various popular identity providers.

Transcript of User Management with LastUser

Page 1: User Management with LastUser

User Management with LastUserKiran Jonnalagadda, HasGeek

PyCon India, Pune, September 2011flickr.com/exfordy/128576390/

Page 2: User Management with LastUser

The What & The Why

Page 3: User Management with LastUser

LastUser is an identity aggregating web service

LastUser

Your App 1 Your App 2 Your App 3

Page 4: User Management with LastUser

A simple goal

Login

Password

Submit

Login identifier that users can remember

Relief from password management

No user registration. Just login and use

Page 5: User Management with LastUser

OpenID:URLs as Identity

Page 6: User Management with LastUser

OpenID in theory:

http://jace.livejournal.com/

Page 7: User Management with LastUser

github.comwww.

URLs in the browser:

Page 8: User Management with LastUser

github.com

URLs in the browser:

Page 9: User Management with LastUser

github.com/http://

URLs in the browser:

Page 10: User Management with LastUser

github.com/https://

URLs in the browser:

Page 11: User Management with LastUser

URLs as Identifiers1. github.com2. github.com/3. www.github.com4. www.github.com/5. http://github.com6. http://github.com/7. http://www.github.com8. http://www.github.com/9. https://github.com10. https://github.com/11. https://www.github.com12. https://www.github.com/

Multiple strings; same final URL

flickr.com/mynameisharsha/5157965638/

Page 12: User Management with LastUser

Contrast with email Addresses:

[email protected] one character and it’s no longer

valid. Users are conditioned to type them in exactly every time

Page 13: User Management with LastUser

URL Ambiguity:https://www.google.com/accounts/o8/id

One OpenID URL for all Google accounts

Page 14: User Management with LastUser

URL Ambiguity:https://www.google.com/accounts/o8/id?id=AItOawnGAN1Swp5zAJn9UYCw0jivCRXg8qIe_9c

https://www.google.com/accounts/o8/id?id=AItOawm3y2JBSnIo0ZdNwtIa487VpQXtpbXNmU4

Both are the same Google id, on different domains, using directed identity. If you move to a new domain,

all your users’ ids change

Page 15: User Management with LastUser

URLs are not reliable identifiers for users

Page 16: User Management with LastUser

OpenID in practice

Page 17: User Management with LastUser

OAuth:Delegated Identity

Page 18: User Management with LastUser

The delegated id model

Your Application

Page 19: User Management with LastUser

The delegated id model

Your Application

Synchronizing identity across services?

Page 20: User Management with LastUser

Need a common identifier across services. It’s usually

an email address

Page 21: User Management with LastUser

LastUser as abstraction layer

LastUser — OAuth Server

Your App 1 Your App 2 Your App 3

Page 22: User Management with LastUser

Multiple apps, all connected to

one LastUser instance

Page 23: User Management with LastUser

1. Login screen provider

Page 24: User Management with LastUser

Connecting identitiesUsers sometimes login with a different service provider

Accounts can be connected if there is a common id

Twitter does not provide an email address

GitHub provides only md5sum of email via Gravatar. Can be connected if email is already known

Page 25: User Management with LastUser

Supported id providers

Twitter

Google

GitHub

OpenID (but not delegation)

Upcoming: LinkedIn, Facebook

Page 26: User Management with LastUser

OAuth: There is no single standard called OAuth. Every

implementation is different

Page 27: User Management with LastUser

There is no up-to-date Python library for OAuth2. Every service

provider has their own library.Contrast: Ruby has OmniAuth

Page 28: User Management with LastUser

LastUser implements OAuth 2.0 draft 16

(with gaps filled in)

Page 29: User Management with LastUser

OAuth 2.0 has two parts

OAuthAuthorization

Server

OAuthResource

Server

OAuth Client1. Request anaccess token

2. Use token toaccess resource

Page 30: User Management with LastUser

OAuth 2.0 has two parts

OAuthAuthorization

Server

OAuthResource

Server

OAuth Client1. Request anaccess token

2. Use token toaccess resource

OAuth 2.0 doesn’tspecify how this

bit works

LastUser does

Page 31: User Management with LastUser

2. Resource providers(work in progress)

Page 32: User Management with LastUser

3. Central access control

Page 33: User Management with LastUser

Pending work

Seamless login UI and pure client-side JS login API

Non-web login flow

Authorization to resource server communication protocol

Support for token types other than bearer tokens

Page 34: User Management with LastUser

LastUser is BSD-licensedhttps://github.com/hasgeek/lastuser