211
By Prabath Siriwardena, WSO2

Understanding OpenID

Embed Size (px)

DESCRIPTION

Understanding OpenID

Citation preview

Page 1: Understanding OpenID

By Prabath Siriwardena, WSO2

Page 2: Understanding OpenID

Why OpenID???

Page 3: Understanding OpenID

Too many passwords

Page 4: Understanding OpenID

Duplicated profiles everywhere

Page 5: Understanding OpenID

Oops..!!! My favorite user name…GONE…!!!

Page 6: Understanding OpenID

Why OpenID???

Page 7: Understanding OpenID

OpenID solves them all…!!!

Page 8: Understanding OpenID

Single user name/password

Page 9: Understanding OpenID

Single user profile

Page 10: Understanding OpenID

Claim your URL as your user name

Page 11: Understanding OpenID

What is OpenID???

Page 12: Understanding OpenID

OpenID is a URL or an XRI

Page 13: Understanding OpenID

http://prabath.myopenid.com

Page 14: Understanding OpenID

http://www.prabathsiriwardena.com

Page 15: Understanding OpenID

=prabath

Page 16: Understanding OpenID

Who gives me an OpenID???

Page 17: Understanding OpenID

OpenID Providers [OP] issue OpenIDs and maintain user profiles

Page 18: Understanding OpenID
Page 19: Understanding OpenID
Page 20: Understanding OpenID
Page 21: Understanding OpenID

Who accepts my OpenID???

Page 22: Understanding OpenID

Any web site can accept OpenIDs for sign in

Page 23: Understanding OpenID

13,196 unique web sites seen by myOpenID.com to accept OpenID, by May 2008

Page 24: Understanding OpenID
Page 25: Understanding OpenID
Page 26: Understanding OpenID
Page 27: Understanding OpenID

With OpenID we simply maintain a single user name/password pair…..

Page 28: Understanding OpenID
Page 29: Understanding OpenID
Page 30: Understanding OpenID
Page 31: Understanding OpenID
Page 32: Understanding OpenID
Page 33: Understanding OpenID
Page 34: Understanding OpenID
Page 35: Understanding OpenID

With OpenID we authenticate once at the OP and sign in to rest of the OpenID relying party

web sites….

Page 36: Understanding OpenID

That is Single Sign On

Page 37: Understanding OpenID

OpenID facilitates decentralized single sign on

Page 38: Understanding OpenID

What is “decentralized”???

Page 39: Understanding OpenID

NOT - centralized

Page 40: Understanding OpenID

No central server – or authority

Page 41: Understanding OpenID

Remember Microsoft Passport : That is centralized – there is a central server

Page 42: Understanding OpenID

With OpenID any body can be an OpenID Provider

Page 43: Understanding OpenID

Once again – What is OpenID???

Page 44: Understanding OpenID

OpenID is a URL or an XRI which facilitates decentralized single sign on

Page 45: Understanding OpenID

I enter my OpenID at the RP – how come the RP knows who is my OpenID Provider???

Page 46: Understanding OpenID

The process of getting to know about the corresponding OpenID Provider from a given

OpenID is known as ‘Discovery’.

Page 47: Understanding OpenID

Just type your OpenID on the browserhttp://prabath.myopenid.com

Page 48: Understanding OpenID
Page 49: Understanding OpenID

BUT… that is not what we wanted – just ‘view source’

Page 50: Understanding OpenID

<link rel="openid.server" href="http://www.myopenid.com/server" />

<link rel="openid2.provider" href="http://www.myopenid.com/server" />

Page 51: Understanding OpenID

Why there are two tags pointing to the same OpenID Provider URL???

Page 52: Understanding OpenID

openid.server OpenID 1.1openid2.provider OpenID 2.0

Page 53: Understanding OpenID

This form of discovery is know as ‘HTML Based Discovery’

Page 54: Understanding OpenID

What is ‘HTML Based Discovery’ ???

Page 55: Understanding OpenID

Under HTML-Based discovery, an HTML document MUST be available at the URL of the Claimed Identifier and RP retrieves the

document with an HTTP GET

Page 56: Understanding OpenID

Within the HEAD element of the document a LINK element MUST be included with

attributes "rel" set to "openid2.provider" and "href" set to an OP Endpoint URL

Page 57: Understanding OpenID

That is what we noticed earlier.

Page 58: Understanding OpenID

Any other forms of Discovery other than HTML- Based ???

Page 59: Understanding OpenID

XRDS-Based discovery [will be covered later…]

Page 60: Understanding OpenID

My OpenID is http://prabath.myopenid.com. BUT… I do NOT own that URL… it’s under the

control of myOpenID – not mine

Page 61: Understanding OpenID

This type of Identifiers are known as OP-Local Identifiers

Page 62: Understanding OpenID

What is an OP-Local Identifier???

Page 63: Understanding OpenID

An alternate Identifier for an end user that is local to a particular OP and thus not

necessarily under the end user's control.

Page 64: Understanding OpenID

Can I use my own URL as my OpenID ???

Page 65: Understanding OpenID

Of course you can – and that is known as the “Claimed Identifier”

Page 66: Understanding OpenID

What is a Claimed Identifier ???

Page 67: Understanding OpenID

An Identifier that the end user claims to own

Page 68: Understanding OpenID

I own a URL – but I am not an OpenID Provider – can I still use my URL as my OpenID ???

Page 69: Understanding OpenID

YES – you can

Page 70: Understanding OpenID

Say, the URL I own or my claimed identifier is http://www.prabathsiriwardena.com

Page 71: Understanding OpenID

I also have an account with myOpenID and my OP Local identifier is

http://prabath.myopenid.com

Page 72: Understanding OpenID

I can use my claimed identifier as my OpenID – by delegating the OpenID Provider

functionality to myOpenID

Page 73: Understanding OpenID

<link href='http://www.myopenid.com/server' rel='openid2.provider openid.server'/>

<link href='"http://prabath.myopenid.com/' rel='openid2.local_id openid.delegate'/>

Page 74: Understanding OpenID

With this approach we never limited to a single OpenID Provider.

Page 75: Understanding OpenID

If we lost faith on the OpenID Provider we can move to another – but, still keeping the

original OpenID

Page 76: Understanding OpenID

I have maintain a single user name/password pair for all my relying party web sites… will

OpenID make a difference for me ???

Page 77: Understanding OpenID

Of course in two ways.

Page 78: Understanding OpenID

Even you have the same user name/password for all the relying party web sites – still you

need to maintain your profile data in different places.

Page 79: Understanding OpenID

Also, what if you lose your password ? You will lose access to all your relying party web sites.

Page 80: Understanding OpenID

But, isn’t it the case under OpenID as well. If you lose your password to the OpenID Provider you lose access to all relying party web sites

depend on the OpenID.

Page 81: Understanding OpenID

No – it’s not.

Page 82: Understanding OpenID

With OpenID – if it is a claimed identifier - you never lose your password.

Page 83: Understanding OpenID

I own a URL – and I use it as my OpenID Claimed Identifier. What if I could not renew my

domain name ???? Now somebody else owns it…..

Page 84: Understanding OpenID

You own an OpenID until you can claim the ownership of the URL behind it

Page 85: Understanding OpenID

You lose the ownership of the URL – you lose your OpenID as well

Page 86: Understanding OpenID

BUT…

Page 87: Understanding OpenID

XRI based OpenIDs solve this issue

Page 88: Understanding OpenID

You never lose the ownership of the i-number behind an XRI – so, you never lose your XRI

based OpenID

Page 89: Understanding OpenID

What is an XRI ??? What is an i-number ???

Page 90: Understanding OpenID

eXtensible Resource Identifier

Page 91: Understanding OpenID

A Global Unique Identifier [just as Domain Names]

Page 92: Understanding OpenID

URL, Phone Number, Email are concrete identifiers

Page 93: Understanding OpenID

XRI is an abstract identifier

Page 94: Understanding OpenID

Concrete identifiers represent actual resources in a network

Page 95: Understanding OpenID

Abstract identifiers are used to find concrete identifiers

Page 96: Understanding OpenID

XRI is an abstract identifier which can be mapped to concrete identifiers

[e.g.: URL, email]

Page 97: Understanding OpenID

XRI syntax defines two forms of XRIs

Page 98: Understanding OpenID

i-names and i-numbers

Page 99: Understanding OpenID

i-names are human-friendly identifiers

Page 100: Understanding OpenID

=prabath

Page 101: Understanding OpenID

i-numbers are typically machine-friendly identifiers

Page 102: Understanding OpenID

=!BFC9.75B7.9B2.11C4

Page 103: Understanding OpenID

i-names, are intended to be re-assignable identifiers just like domain names

Page 104: Understanding OpenID

i-numbers are intended to be persistent

Page 105: Understanding OpenID

If your OpenID is your i-number – you never lose it

Page 106: Understanding OpenID

How an OpenID RP discovers an XRI based OpenID ???

Page 107: Understanding OpenID

XRDS based discovery [which we did not cover earlier]

Page 108: Understanding OpenID

HTML based discovery returns an HTML page [discussed earlier]

Page 109: Understanding OpenID

XRDS based discovery returns an XRDS document

Page 110: Understanding OpenID

eXtensible Resource Descriptor Sequence

Page 111: Understanding OpenID

<?xml version="1.0" encoding="UTF-8"?><xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)”

xmlns:openid="http://openid.net/xmlns/1.0">

<XRD ref="xri://=example"> <!-- service section -->

<!-- XRI resolution service --> <Service> </Service>

<!-- OpenID 2.0 login service --> <Service priority="10"> </Service>

<!-- OpenID 1.1 login service --> <Service priority="20"> </Service> </XRD>

Page 112: Understanding OpenID

XRDS based discovery – NOT just for XRI based OpenIDs

Page 113: Understanding OpenID

XRDS based discovery – can also be used for URL based OpenID discovery

Page 114: Understanding OpenID

If an URL – XRDS based discovery will use Yadis protocol for discovery

Page 115: Understanding OpenID

If an XRI – XRDS based discovery will use XRI resolution

Page 116: Understanding OpenID

A given XRDS document can define multiple services

Page 117: Understanding OpenID

<!-- XRI resolution service --> <Service> <ProviderID>xri://=!F83.62B1.44F.2813</ProviderID> <Type>xri://$res*auth*($v*2.0)</Type> <MediaType>application/xrds+xml</MediaType> <URI priority=”10”>http://resolve.example.com</URI> <URI priority=”15”>http://resolve2.example.com</URI> <URI>https://resolve.example.com</URI> </Service>

Page 118: Understanding OpenID

<!-- OpenID 2.0 login service --> <Service priority="10">

<Type>http://specs.openid.net/auth/2.0/signon</Type> <URI>http://www.myopenid.com/server</URI> <LocalID>http://example.myopenid.com/</LocalID>

</Service>

Page 119: Understanding OpenID

<!-- OpenID 1.0 login service --> <Service priority="20">

<Type>http://openid.net/server/1.0</Type> <URI>http://www.livejournal.com/openid/server.bml</URI> <openid:Delegate>

http://www.livejournal.com/users/example/ </openid:Delegate> </Service>

Page 120: Understanding OpenID

What attributes can my RP get from the OpenID Provider ???

Page 121: Understanding OpenID

Under OpenID; attribute flow is defined under two main extensions

Page 122: Understanding OpenID

OpenID Simple Attribute Registration [SReg]

Page 123: Understanding OpenID

OpenID Attribute Exchange [Ax]

Page 124: Understanding OpenID

OpenID Simple Registration allows for very light-weight profile exchange

Page 125: Understanding OpenID

It is designed to pass nine commonly requested pieces of information when an End User goes to register a new account with a web service

Page 126: Understanding OpenID

RP can request the required/optional attributes from the OP with the Authentication request

Page 127: Understanding OpenID

nickname, email, fullname, dob, gender, postcode, country, language, timezone

Page 128: Understanding OpenID

OpenID Attribute Exchange is for exchanging identity information between endpoints

Page 129: Understanding OpenID

Not limited for a predefined set of attributes

Page 130: Understanding OpenID

With AX : not just fetch attributes from the OP – but also can store attributes at the OP

Page 131: Understanding OpenID

Ax defines messages for retrieval [fetch] and storage [store] of identity information

Page 132: Understanding OpenID

“fetch” : retrieves attribute information from an OpenID Provider

Page 133: Understanding OpenID

“store” : saves or updates attribute information on the OpenID Provider

Page 134: Understanding OpenID

Both messages are originated from the RP as an indirect message

Page 135: Understanding OpenID

Under Ax each attribute is identified by an URI

Page 136: Understanding OpenID

There are two popular schemas which define subject identifiers to attributes

Page 137: Understanding OpenID

http://schema.openid.net &

http://www.axschema.org

Page 138: Understanding OpenID

Under http://schema.openid.net the attribute “email” is identified as

“http://schema.openid.net/contact/email”

Page 139: Understanding OpenID

Under http://www.axschema.orgthe attribute “email” is identified as “http://axschema.org/contact/email”

Page 140: Understanding OpenID

myOpenID.com supports http://schema.openid.net

Page 141: Understanding OpenID

RP can request the required/optional attributes from the OP with the Authentication request

Page 142: Understanding OpenID

[Demo]: Attribute flow with WSO2 OpenID Demo RP

https://is.test.wso2.org/javarp

Page 143: Understanding OpenID

Why Yahoo does NOT trust my RP – while all the other OpenID Providers ???

Page 144: Understanding OpenID

“This web site has not confirmed it’s identity with Yahoo! and might be fraudulent. Do not

share any personal information with this website unless you certain it is legitimate.”

Page 145: Understanding OpenID

Yahoo supports OpenID 2 and it does OpenID Relying Party Discovery

Page 146: Understanding OpenID

With OpenID RP Discovery, RPs should publish their valid return_to URLs in an XRDS

document.

Page 147: Understanding OpenID

To get rid of Yahoo! warning the RP needs to publish this XRDS at the return_to URL.

Page 148: Understanding OpenID

RP discovery also allows any software agent to discover sites that support OpenID

Page 149: Understanding OpenID

Am I correct to say that OpenID is a phishing heaven ???

Page 150: Understanding OpenID

Not really…!!!

Page 151: Understanding OpenID

OpenID does NOT address the problem of phishing

Page 152: Understanding OpenID

To the same extent any of the web sites are exposed to phishing – OpenID too exposed to

phishing.

Page 153: Understanding OpenID

There are many approaches taken individually by OpenID Providers to protect their users

against phishing.

Page 154: Understanding OpenID

Yahoo Sign In Seal

Page 155: Understanding OpenID
Page 156: Understanding OpenID

SeatBelt plugin for Firefox

Page 157: Understanding OpenID
Page 158: Understanding OpenID
Page 159: Understanding OpenID

Information Card based login

Page 160: Understanding OpenID
Page 161: Understanding OpenID
Page 162: Understanding OpenID

Login to OpenID Provider with a bookmark

Page 163: Understanding OpenID
Page 164: Understanding OpenID

Can OpenID RPs request OpenID Providers to authenticate users in a phishing resistant

manner ???

Page 165: Understanding OpenID

YES – they can

Page 166: Understanding OpenID

OpenID Provider Authentication Policy Extension[PAPE]

Page 167: Understanding OpenID

[Demo]: PAPE demo with WSO2 OpenID Demo RPhttps://is.test.wso2.org/javarp

Page 168: Understanding OpenID

How strong OpenID against Man-in-the-Middle attacks ???

Page 169: Understanding OpenID

This requires explaining what ‘OpenID Association’ is…

Page 170: Understanding OpenID

A given OpenID relying party can be either Dumb or Smart

Page 171: Understanding OpenID

Smart relying parties maintain a shared secret key with the OpenID Provider – while Dumb

relying parties maintain no state

Page 172: Understanding OpenID

We talk about ‘OpenID Associations’ only for ‘Smart’ RPs

Page 173: Understanding OpenID

‘OpenID Association’ takes place just after ‘Discovery’ and establishes ‘Shared Secret

Key” between OpenID Relying Party and the OpenID Provider

Page 174: Understanding OpenID

OpenID uses Diffie-Hellman key-exchange to establish the shared secret

Page 175: Understanding OpenID

Diffie-Hellman key-exchange allows two parties to jointly establish a shared secret key over an

insecure communications channel

Page 176: Understanding OpenID

‘Shared Secret Key’ is used to sign subsequent messages exchanged in between OpenID

Relying Party and the OpenID Provider

Page 177: Understanding OpenID

‘OpenID Association’ is a direct communication between OpenID Provider and the RP

Page 178: Understanding OpenID

Under OpenID, HTTP POST is used for all Direct Communications

Page 179: Understanding OpenID

Still we have NOT answered the original question…

Page 180: Understanding OpenID

How strong OpenID against Man-in-the-Middle attacks ???

Page 181: Understanding OpenID

Associations prevent tampering of signed fields by a man in the middle except during

discovery, association sessions

Page 182: Understanding OpenID

BUT… if DNS resolution or the transport layer is compromised; signatures on messages are not

adequate

Page 183: Understanding OpenID

How do we handle Man-in-the-Middle attacks for discovery and association sessions ???

Page 184: Understanding OpenID

One solution is to build a white-list of OpenID Providers and maintain their public key

certificates at the RP end

Page 185: Understanding OpenID

RP performs an XRDS-based discovery and OP returns a digitally signed XRDS document

Page 186: Understanding OpenID

RP verifies the signature

Page 187: Understanding OpenID

ALSO…

Page 188: Understanding OpenID

During an ‘Association’ OP can sign the field ‘assoc_handle’ by it’s private key and RP

verifies it once received

Page 189: Understanding OpenID

How good OpenID at handling DoS attacks ???

Page 190: Understanding OpenID

Within the protocol there are places where a rogue RP could launch a denial of service

attack against an OP

Page 191: Understanding OpenID

This can be done by the RP repeatedly requesting associations, authentication, or

verification of a signature

Page 192: Understanding OpenID

There is nothing in OpenID protocol messages that allows the OP to quickly check that it is a

genuine request

Page 193: Understanding OpenID

White-listing RPs is not a good solution

Page 194: Understanding OpenID

OpenID Providers can easily use generic IP based rate-limiting and banning techniques to help combat these sorts of attacks and black list

RPs

Page 195: Understanding OpenID

It’s hard to remember a whole URL as an OpenID ???

Page 196: Understanding OpenID

[ Source : http://www.ldap.com/1/commentary/wahl/20070220_01.shtml ]

Page 197: Understanding OpenID
Page 198: Understanding OpenID
Page 199: Understanding OpenID

Finally….

Page 200: Understanding OpenID

The complete OpenID Protocol flow…

Page 201: Understanding OpenID

The end user initiates authentication (Initiation) by presenting a User-Supplied Identifier to the

Relying Party via their User-Agent

http://subject.myopenid.com

Page 202: Understanding OpenID

The Relying Party performs discovery (Discovery) on the identifier and establishes the OP Endpoint URL that the end user uses

for authentication

Page 203: Understanding OpenID

(optional) The Relying Party and the OP establish an association (Establishing

Associations)

Association request

Association response

Page 204: Understanding OpenID

The OP uses an association to sign subsequent messages and the Relying Party to verify those

messages

Page 205: Understanding OpenID

The Relying Party redirects the end user's User-Agent to the OP with an OpenID

Authentication request (Requesting Authentication)

Page 206: Understanding OpenID

End user authenticates to the OP

authenticate

Page 207: Understanding OpenID

The OP redirects the end user's User-Agent back to the Relying Party with either an assertion that

authentication is approved (Positive Assertions) or a message that authentication failed (Negative

Assertions).

Page 208: Understanding OpenID

The Relying Party verifies (Verifying Assertions) the information received from the OP

Page 209: Understanding OpenID

Useful Links

1. http://openid.net2. http://www.openidbook.com/3. OpenID mailing list : http://openid.net/mailman/listinfo/general4. AxShema mail group: http://groups.google.com/group/axschema5. Blogs: http://www.blogged.com/tag/openid6. My blog: http://facilelogin.com7. WSO2 Identity Solution download page:

http://wso2.org/projects/solutions/identity8. WSO2 OpenID Demo OP : https://is.test.wso2.org9. WSO2 OpenID Demo RP : https://is.test.wso2.org/javarp

Page 210: Understanding OpenID

Next Webinar…. On 17th June

Introducing WSO2 ESB 1.7

Now open for registration…http://wso2.com/about/news/esb-webinar-june-17/

Page 211: Understanding OpenID

Questions…

Thank you…!