65
MAREK STĘPNIOWSKI @mstepniowski

Single sign-on

Embed Size (px)

Citation preview

Page 1: Single sign-on

MAREK STĘPNIOWSKI@mstepniowski

Page 2: Single sign-on
Page 3: Single sign-on
Page 4: Single sign-on
Page 5: Single sign-on

SINGLE SIGN-ON

Page 6: Single sign-on
Page 7: Single sign-on
Page 8: Single sign-on
Page 9: Single sign-on

Redmine - zarządzanie projektamiredmine.nowoczesnapolska.org.pl

Platforma Redakcyjnaredakcja.wolnelektury.pl

Page 10: Single sign-on

Redmine - zarządzanie projektamiredmine.nowoczesnapolska.org.pl

Platforma Redakcyjnaredakcja.wolnelektury.pl

Wolne Lekturywolnelektury.pl

Wolne Podręcznikiwiki.wolnepodreczniki.pl

Blognowoczesnapolska.org.pl

Page 11: Single sign-on

•Kerberos

•LDAP

•Active Directory

Page 12: Single sign-on

We don’t need nostinkin’ protocols!“

Page 13: Single sign-on

•CAS

•OpenID

•OAuth

Page 14: Single sign-on

CASJasig

Page 15: Single sign-on
Page 16: Single sign-on

redirect

Page 17: Single sign-on

Login: ________ Pass: ________

Page 18: Single sign-on

Login: marek Pass: ********

Page 19: Single sign-on

redirect(with token)

Page 20: Single sign-on

check token

Page 21: Single sign-on

yesmarek

no

Page 22: Single sign-on
Page 23: Single sign-on

FEATURES

• Centralized - all passwords are stored in one place

• Subsequent logins can happen without user interaction

• Easy to implement

Page 24: Single sign-on
Page 25: Single sign-on

GATEWAY AUTH

(accessing public webpage)

Page 26: Single sign-on

GATEWAY AUTH

redirect

Page 27: Single sign-on

GATEWAY AUTH

redirect(with token)

Note We don’t show the login form, even if the user is not logged in

Page 28: Single sign-on

GATEWAY AUTH

check token

Page 29: Single sign-on

GATEWAY AUTH

yesmarek

no

Page 30: Single sign-on

GATEWAY AUTH

If authentication was succesful serve the modified page

Page 31: Single sign-on
Page 32: Single sign-on

JAVASCRIPT AUTH

Page 33: Single sign-on

SINGLE SIGN-OFF

Page 34: Single sign-on

SINGLE SIGN-OFF

Sign off

Page 35: Single sign-on

SINGLE SIGN-OFFBut... It doesn’t scale!

Facebook uses delayed single sign-off:

• First cookie is long lived and keeps the user session

• Second cookie required to perform API calls is short lived and needs to be refreshed using the first cookie

• Signing off from Facebook deletes both cookies

Page 36: Single sign-on

CAS 2.0

Page 37: Single sign-on

<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'> <cas:authenticationSuccess> <cas:user>marek</cas:user> </cas:authenticationSuccess></cas:serviceResponse>

<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'> <cas:authenticationFailure code="INVALID_TICKET"> Ticket ST-1856339-aA5Yuvrxzpv8Tau1cYQ7 not recognized </cas:authenticationFailure></cas:serviceResponse>

Oh hai, XML!

Page 38: Single sign-on

<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'> <cas:authenticationSuccess> <cas:user>marek</cas:user> <cas:proxyGrantingTicket> PGTIOU-84678-8a9d... </cas:proxyGrantingTicket> </cas:authenticationSuccess></cas:serviceResponse>

<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'> <cas:authenticationFailure code="INVALID_TICKET"> Ticket ST-1856339-aA5Yuvrxzpv8Tau1cYQ7 not recognized </cas:authenticationFailure></cas:serviceResponse>

Oh hai, XML!

Page 39: Single sign-on

<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'> <cas:authenticationSuccess> <cas:user>marek</cas:user> <cas:proxyGrantingTicket> PGTIOU-84678-8a9d... </cas:proxyGrantingTicket> <fullName>Marek Stępniowski</fullName> <isAdmin>yes<isAdmin> </cas:authenticationSuccess></cas:serviceResponse>

<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'> <cas:authenticationFailure code="INVALID_TICKET"> Ticket ST-1856339-aA5Yuvrxzpv8Tau1cYQ7 not recognized </cas:authenticationFailure></cas:serviceResponse>

Oh hai, XML!

Page 40: Single sign-on

CAS 3.0

Page 41: Single sign-on

STUCK IN A LIMBOAdds attribute exchange

(most clients implement it as an extension of 2.0)

Page 43: Single sign-on

• Django

https://github.com/zuber/django-cas-providerhttps://github.com/zuber/django-cas-consumer

• Python

https://wiki.jasig.org/display/CASC/Pycas

• Ruby

http://code.google.com/p/rubycas-server/http://code.google.com/p/rubycas-client/

+many more

The simplest single sign-on solution available

Page 44: Single sign-on
Page 45: Single sign-on
Page 46: Single sign-on

OpenID: ________

Page 47: Single sign-on

OpenID: stepniowski.com

Page 48: Single sign-on

redirect

stepniowski.com

Page 49: Single sign-on

Login: ________ Pass: ________

stepniowski.com

Page 50: Single sign-on

Login: marek Pass: ********

stepniowski.com

Page 51: Single sign-on

redirect(with token)

stepniowski.com

Page 52: Single sign-on

check token

stepniowski.com

Page 53: Single sign-on

yes|no

stepniowski.com

Page 54: Single sign-on

stepniowski.com

Page 55: Single sign-on

FEATURES

Strangely similar to CAS

Page 56: Single sign-on

FEATURES

• Decentralized - you don’t need to store passwords at all

• Single sign-on but not single sign-in

• Hard to implement - delegation requires an HTML parser

Page 57: Single sign-on

openid.sreg

openid.ax

Page 58: Single sign-on

2.0

Page 59: Single sign-on

• Django

https://github.com/omab/django-social-auth

• Python

https://github.com/openid/python-openid

• Ruby

https://github.com/openid/ruby-openid

+many more

Page 60: Single sign-on

COMPARISON

CAS OpenID

• Centralized

• Single sign-on and sign-in

• Easy to implement

• Decentralized

• Only single sign-on

• Hard to implement

• Attribute exchange (CAS 3.0)

• Single sign-off

• Gateway authentication

• openid.sreg and openid.ax

• Single sign-off

• Browser extensions

Page 61: Single sign-on
Page 62: Single sign-on

ASK FOR ITAnd I will create a separate presentation

Page 63: Single sign-on

MAREK STĘPNIOWSKI@mstepniowski

Page 64: Single sign-on

http://www.setjam.com/jobs/

WE’RE HIRING!

Page 65: Single sign-on

DJANGOPIWOWarsaw SetJam HQ

WednesdayAugust 24th

@mstepniowski@marcink^marcinkaszynski