what is a capability url (and why do i care?)

25
What is a Capability URL (and why do I care?) Dan Appelquist (@torgo ) Open Web Advocate, Telefónica Digital

Upload: daniel-appelquist

Post on 07-May-2015

4.677 views

Category:

Technology


3 download

DESCRIPTION

The W3C TAG is working on a set of best practices for capability URLs. What's a capability URL? Glad you asked. This presentation (give at "London Web Standards" on 20 Jan 2014) attempts to explain what a capability URL is and why Web developers should take care when using them. (NB: the first few slides are just speaker introduction.)

TRANSCRIPT

Page 1: What is a Capability URL (and why do I care?)

What is a Capability URL (and why do I care?)

Dan Appelquist (@torgo)Open Web Advocate, Telefónica Digital

Page 2: What is a Capability URL (and why do I care?)

Telefónica Digitalhttp://blog.digital.telefonica.com - @tefdigital

Page 3: What is a Capability URL (and why do I care?)

Firefox OShttp://firefoxos.com

Page 4: What is a Capability URL (and why do I care?)

W3C Technical Architecture Group“The TAG” http://w3.org/tag - @w3ctag

Page 5: What is a Capability URL (and why do I care?)

Jeni Tennison!

Technical Director of the ODI http://theodi.org

@jenit

Page 6: What is a Capability URL (and why do I care?)

Capability URLs

Page 7: What is a Capability URL (and why do I care?)

“Cool URIs Don’t Change”

http://www.w3.org/Provider/Style/URI.html- Tim Berners-Lee

Page 8: What is a Capability URL (and why do I care?)

Footnote: What’s the difference between a URI and a URL?

• In theory: URLs are a subset of URIs

• In practice: they are used interchangeably

• In reality: anyone who uses the term URI probably spends too much time around Web Standards wonks

Page 9: What is a Capability URL (and why do I care?)

Cool URLs Don’t Change

Page 10: What is a Capability URL (and why do I care?)

…but…

Page 11: What is a Capability URL (and why do I care?)

Not all URLs are cool

Page 12: What is a Capability URL (and why do I care?)

Some URLs are hot!

Page 13: What is a Capability URL (and why do I care?)

Sorry.

Page 14: What is a Capability URL (and why do I care?)

So what’s a hot URL?

• Something that provides a set of unique capabilities

• Access control - a key

• Ephemeral resources

Page 15: What is a Capability URL (and why do I care?)

Examples, please?• Password resets: “Your password has expired. Click here to

reset it.”

• Video chats: “The video conference is on https://opentokrtc.com/xyz...”

• Polls: “Send this link to anyone you wish to invite: http://doodle.com/xyz....”

• Github GISTs

• Google Calendar private URLs

• iCloud sharing

Page 16: What is a Capability URL (and why do I care?)

Reasons to Use

• No login required

• Easy to pass on

Page 17: What is a Capability URL (and why do I care?)

Reasons to Be Careful

• No login required

• Easy to pass on

Page 18: What is a Capability URL (and why do I care?)

URLs Aren’t Designed to be Secret

• It appears in the address bar (usually)

• It appears in log files - e.g. proxy logs

• If it’s passed on once it can be passed on again

Page 19: What is a Capability URL (and why do I care?)

Also, Web Architecture Says “No”• Using multiple URLs for the same resource runs contrary to

documented good practice:

• Good practice: Avoiding URI aliases : A URI owner should not associate arbitrarily different URIs with the same resource.(Source: Architecture of the World Wide Web, Volume One: http://www.w3.org/TR/webarch/)

• However, the rationale for this is based on sharing:

• It’s better for everyone linking to, or talking about, the same resource to use the same URL

• Capability URLs are oriented around limited sharing. In these circumstances, having multiple aliases is not an issue.

Page 20: What is a Capability URL (and why do I care?)

Recommendations for Use

• Only use:

• to avoid the need for users to log in to perform an action

• to make it easy for those with whom you share URLs to share them with others

• to avoid authentication overheads in APIs.

Page 21: What is a Capability URL (and why do I care?)

• Capability URLs should be https URLs - lowers possibility of exposure

• Pages that inform users of capability URLs should also be https

• Capability URLs should expire

Page 22: What is a Capability URL (and why do I care?)

• Pages accessed through a capability URL should not include links to third-party websites, or to third-party scripts

• If they do, they should include rel="noreferrer"

• Capability URLs should be revokable - e.g. by the user who created them

• Capability URLs must be unique and should be unguessable

Page 23: What is a Capability URL (and why do I care?)

Be aware of when you are using this pattern.

Employ best practices.

Remember: URLs are the fundamental architectural building block of the web. Use with care.

Page 24: What is a Capability URL (and why do I care?)

Capability URLs

Such powerful

Very not break Web

Many care

Wow.

Page 25: What is a Capability URL (and why do I care?)

Thanks!

Keep up with our ongoing work in this space:http://w3ctag.github.io/capability-urls/

Formal feedback round coming soon, but feel free to weigh in on GitHub (github.com/w3ctag) or on our mailing list [email protected] (also holds true for anything else the TAG is working on).

Dan Appelquist @torgo W3C TAG @w3ctag