<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Layer 7 - Blogs &#187; Francois Lascelles</title>
	<atom:link href="http://www.layer7tech.com/blogs/index.php/author/francois-lascelles/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.layer7tech.com/blogs</link>
	<description>API Management &#124; SOA Governance &#124; Cloud Integration</description>
	<lastBuildDate>Thu, 16 May 2013 21:00:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Compromised Twitter OAuth Keys</title>
		<link>http://www.layer7tech.com/blogs/index.php/compromised-twitter-oauth-keys-2/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/compromised-twitter-oauth-keys-2/#comments</comments>
		<pubDate>Fri, 08 Mar 2013 19:52:35 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[API Management]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[OAuth 2.0 with Layer 7 Gateways]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Web API]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=4001</guid>
		<description><![CDATA[So Twitter’s OAuth keys have leaked. What does that mean? Don’t panic. The consequences of a client application’s key being compromised is as serious as user credentials being compromised. The risk associated with this breach is that a malicious application tricking you into participating in an OAuth handshake (phishing) could access the twitter API on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.layer7tech.com/blogs/wp-content/uploads/2013/03/twitter-blog.jpg"><img class="alignleft size-full wp-image-4014" style="padding-right:15px; " title="twitter-blog" src="http://www.layer7tech.com/blogs/wp-content/uploads/2013/03/twitter-blog.jpg" alt="oauth twitter hack" width="264" height="193" /></a>So Twitter’s OAuth keys have <a href="http://threatpost.com/en_us/blogs/twitter-oauth-api-keys-leaked-030713">leaked</a>.</p>
<p>What does that mean? Don’t panic. The consequences of a client application’s key being compromised is as serious as user credentials being compromised.</p>
<p>The risk associated with this breach is that a malicious application tricking you into participating in an OAuth handshake (phishing) could access the twitter API on your behalf.</p>
<p>Attackers might come up with clever ways to exploit this leak. In the meantime, avoid using twitter through any application other than the twitter application itself.</p>
<p>OAuth distinguishes between confidential and public clients.</p>
<p>Applications that you can publicly download on your own device (mobile or not) fall in the public category because they are subject to their embedded secret being reverse engineered as probably happened in this case. This incident is a good illustration of the fact that client secrets should not form the basis of a secure session in public clients like mobile applications because, well, those secrets are easily discovered.</p>
<p>Twitter may create new keys for their application and look for ways to better obfuscate them but it’s only a matter of time before these new secrets are also compromised.</p>
<p>As I discussed at Cloud Security Alliance and in our last <a href="http://www.youtube.com/watch?v=-gAIaTvxA9M&amp;list=UUaOIRuPgP5KS7J0t0707AeA&amp;index=1">Tech Talk</a>, authentication involving redirection between applications on mobile device has its risks.</p>
<p>There are ways to completely secure this between applications of a same domain but solving this across 3rd party mobile apps, in a fool-proof way requires either something like a multi-factor authentication or the provisioning of client secrets post-application download which is often not practical.</p>
<p>Either way, API and application providers would do well not relying on pseudo-secrets embedded in publicly available applications as the basis of any security.</p>
<p>In the case of client applications issued by the same provider as the API they consume (e.g. the official twitter app), the password grant type make a lot more sense to me and provides a better UX.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/compromised-twitter-oauth-keys-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling OAuth Token Distributors</title>
		<link>http://www.layer7tech.com/blogs/index.php/enabling-token-distributors/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/enabling-token-distributors/#comments</comments>
		<pubDate>Fri, 08 Feb 2013 19:59:02 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[API Management]]></category>
		<category><![CDATA[EBooks]]></category>
		<category><![CDATA[OAuth]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=3872</guid>
		<description><![CDATA[Are you a token distributor? If you provide an API, you probably are. One thing I like about tokens is that, when they are compromised, your credentials are unaffected. Unfortunately, it doesn’t work so well the other way around. When your password is compromised, you should assume the attacker could also get access tokens to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.layer7tech.com/library/ebooks/5-oauth-essentials-for-api-access-control/2870" target="_blank"><img class="alignleft size-full wp-image-3876" style="margin: 10px;" title="OAuth eBook" src="http://www.layer7tech.com/blogs/wp-content/uploads/2013/02/OAuth-eBook-v1.jpg" alt="OAuth eBook" width="287" height="300" /></a>Are you a token distributor? If you provide an API, you probably are.</p>
<p>One thing I like about tokens is that, when they are compromised, your credentials are unaffected. Unfortunately, it doesn’t work so well the other way around. When your password is compromised, you should assume the attacker could also get access tokens to act on your behalf.</p>
<p>In his post <em><a href="http://blog.talkingidentity.com/2013/02/the-dilemma-of-the-oauth-token-collector.html" target="_blank">The Dilemma of the OAuth Token Collector</a></em> and in <a href="http://storify.com/NishantK/the-case-of-too-many-tokens" target="_blank">this twitter conversation</a>, Nishant Kaushik and friends comment on the recent Twitter hack and discuss the pros and cons of instantly revoking all access tokens when a password is compromised.</p>
<p>I hear <a href="http://securitywatch.pcmag.com/none/307747-twitter-apps-can-still-tweet-despite-password-reset" target="_blank">the word of caution around automatically revoking all tokens at the first sign of a credential being compromised</a> but in a mobile world where user experience (UX) is sacred and where each tapping of a password can be a painful process, partial token revocation shouldn’t be automatically ruled out.</p>
<p>Although, as Nishant suggests, “it is usually hard to pinpoint the exact time at which an account got compromised”, you may know that it happened within a range and use the worst case scenario. I’m not saying that was necessarily the right thing to do in reaction to Twitter’s latest incident but only revoking tokens that were issued after the earliest time the hack could have taken place is a valid approach that needs to be considered. The possibility of doing this allows the API provider to mitigate the UX impact and helps avoid service interruptions (yes, I know UX would be best served by preventing credentials being compromised in the first place).</p>
<p>Of course, acting at that level requires token governance. The ability to revoke tokens is essential to the API proviver. Any token management solution being developed today should pay great attention to it. Providing a GUI to enable token revocation is a start but a token management solution should expose an API through which tokens can be revoked too. This lets existing portals and ops tooling programmatically act on token revocation. Tokens need to be easily revoked per user, per application, per creation date, per scope etc. and per combination of any of these.</p>
<p>Are you a token distributor? You should think hard about token governance. You also think hard about scaling, security, integration to exiting identity assets and interop, among other things. We cover these issues and more in our new eBook : <em><a href="http://www.layer7tech.com/library/ebooks/5-oauth-essentials-for-api-access-control/2870" target="_blank">5 OAuth Essentials for API Access Control</a></em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/enabling-token-distributors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Give Me a JWT, I’ll Give You an Access Token</title>
		<link>http://www.layer7tech.com/blogs/index.php/give-me-a-jwt-ill-give-you-an-access-token/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/give-me-a-jwt-ill-give-you-an-access-token/#comments</comments>
		<pubDate>Fri, 04 Jan 2013 23:05:26 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[API Management]]></category>
		<category><![CDATA[Identity]]></category>
		<category><![CDATA[OAuth]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=3718</guid>
		<description><![CDATA[One of the common misconceptions about OAuth is that it provides identity federation by itself. Although supporting OAuth with federated identities is a valid pattern and is essential to many API providers, it does require the combination of OAuth with an additional federated authentication mechanism. Note that I’m not talking about leveraging OAuth for federation [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.layer7tech.com/products/oauth-toolkit" target="_blank"><img class="alignleft size-full wp-image-3724" style="margin: 0px 15px;" title="JSON Web Token" src="http://www.layer7tech.com/blogs/wp-content/uploads/2013/01/JSON-Web-Token-v1.jpg" alt="JSON Web Token" width="300" height="300" /></a>One of the common misconceptions about OAuth is that it provides identity federation by itself. Although supporting OAuth with federated identities is a valid pattern and is essential to many API providers, it does require the combination of OAuth with an additional federated authentication mechanism. Note that I’m not talking about leveraging OAuth for federation (that’s OpenID Connect) but rather an OAuth handshake in which the OAuth authorization server (AS) federates the authentication of the user.</p>
<p>There are different ways to federate the authentication of an end user as part of an OAuth handshake. One approach is to simply incorporate it as part of the authorization server’s interaction with the end user (handshake within handshake). This is only possible with grant types where the user is redirected to the authorization server in the first place, such as implicit or autz code. In that case, the user is redirected from the app, to the authorization server, to the identity provider (IDP), back to the authorization server and finally back to the application. The federated authentication is transparent to the client application participating in the OAuth handshake. The OAuth spec (which describes the interaction between the client application and the OAuth authorization server) does not get involved.</p>
<p><a href="http://flascelles.files.wordpress.com/2013/01/illustration1.png" target="_blank"><img src="http://flascelles.files.wordpress.com/2013/01/illustration1.png?w=450&amp;h=211" alt="illustration1" width="450" height="211" /></a></p>
<p>Another approach is for the client application to request the access token using an existing proof of authentication in the form of a signed claims (handshake after handshake). In this type of OAuth handshake, the redirection of the user (if any) is outside the scope of the OAuth handshake and is driven by the application. However, the exchange of the existing claim for an OAuth access token is the subject of a number of extension grant types.</p>
<p>One such extension grant type is defined in the <a href="http://tools.ietf.org/html/draft-ietf-oauth-saml2-bearer-15" target="_blank">SAML 2.0 Bearer Assertion Profiles for OAuth 2.0</a> specification, according to which a client application presents a SAML assertion to the OAuth authorization server in exchange for an OAuth access token. The <a href="http://www.layer7tech.com/products/oauth-toolkit" target="_blank">Layer 7 OAuth Toolkit</a> has implemented and provided samples for this extension grant type since its inception.</p>
<p><a href="http://flascelles.files.wordpress.com/2013/01/illustration2.png" target="_blank"><img src="http://flascelles.files.wordpress.com/2013/01/illustration2.png?w=450&amp;h=229" alt="illustration2" width="450" height="229" /></a></p>
<p>Because of the prevalence of SAML in many environments and its support by many identity providers, this grant type has the potential to be leveraged in lots of ways in the enterprise and across partners. There is, however, an emerging alternative to bloated, verbose SAML assertions – one that is more &#8220;API-friendly&#8221;, based on JSON: <a href="http://openid.net/specs/draft-jones-json-web-token-07.html" target="_blank">JSON Web Token (JWT)</a>. JWT allows the representation of claims in a compact, JSON format and the signing of such claims using JWS. For example, OpenID Connect’s ID Tokens are based on the JWT standard. The same way that a SAML assertion can be exchanged for an access token, a JWT can also be exchanged for an access token. The details of such a handshake are defined as part of another extension grant type defined as part of <a href="http://www.ietf.org/id/draft-ietf-oauth-jwt-bearer-04.txt" target="_blank">JSON Web Token (JWT) Bearer Token Profiles for OAuth 2.0</a>.</p>
<p>Give me a JWT, I’ll give you an access token. Although I expect templates for this extension grant type to be featured as part of an upcoming revision of the <a href="http://www.layer7tech.com/products/oauth-toolkit" target="_blank">OAuth Toolkit</a>, the recent addition of JWT and JSON primitives enables me to extend the current OAuth authorization server template to support JWT bearer grants with a Layer 7 Gateway today.</p>
<p>The first thing I need for this exercise is to simulate an application getting a JWT claim issued on behalf of a user. For this, I create a simple endpoint on the Gateway that authenticates a user and issues a JWT returned as part of the response.</p>
<p><a href="http://flascelles.files.wordpress.com/2013/01/idppolicy.png" target="_blank"><img src="http://flascelles.files.wordpress.com/2013/01/idppolicy.png?w=450&amp;h=484" alt="idppolicy" width="450" height="484" /></a></p>
<p>Pointing my browser to this endpoint produces the following output:</p>
<p><a href="http://flascelles.files.wordpress.com/2013/01/idoutput.png" target="_blank"><img src="http://flascelles.files.wordpress.com/2013/01/idoutput.png?w=450&amp;h=177" alt="idoutput" width="450" height="177" /></a></p>
<p>Then, I extend the authorization server token endpoint policy to accept and support the JWT bearer grant type. The similarities between the SAML bearer and the JWT bearer grant types are most obvious in this step. I was able to copy the policy branch and substitute the SAML and XPath policy constructs for JWT and JSON path ones. I can also base trust on HMAC-type signatures that involve a share secret, instead of a PKI-based signature validation, if desired.</p>
<p><a href="http://flascelles.files.wordpress.com/2013/01/newas.png" target="_blank"><img src="http://flascelles.files.wordpress.com/2013/01/newas.png?w=450&amp;h=327" alt="newAS" width="450" height="327" /></a></p>
<p>I can test this new grant type using a REST client calling the OAuth authorization server’s token endpoint. I inject into this request the JWT issued by the JWT issuer endpoint and specify the correct grant type.</p>
<p><a href="http://flascelles.files.wordpress.com/2013/01/illustration5.png" target="_blank"><img src="http://flascelles.files.wordpress.com/2013/01/illustration5.png?w=450&amp;h=307" alt="illustration5" width="450" height="307" /></a></p>
<p>I can now authorize an API call based on this new access token, as I would any other access token. The original JWT claim is saved as part of the OAuth session and is available throughout the lifespan of this access token. This JWT can later be consulted at runtime when API calls are authorized inside the API runtime policy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/give-me-a-jwt-ill-give-you-an-access-token/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Runtime Token Mapping for Mobile API Traffic</title>
		<link>http://www.layer7tech.com/blogs/index.php/runtime-token-mapping-for-mobile-api-traffic/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/runtime-token-mapping-for-mobile-api-traffic/#comments</comments>
		<pubDate>Sat, 10 Nov 2012 00:30:39 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[API Management]]></category>
		<category><![CDATA[Identity]]></category>
		<category><![CDATA[Mobile Access]]></category>
		<category><![CDATA[OAuth]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=3291</guid>
		<description><![CDATA[Here’s an interesting pattern that we’re constantly running into at various API Management projects: runtime mapping between a token used by external mobile applications and another form of authentication required by an internal system. The need for this comes up when a legacy API/service with an existing access control mechanism needs to be exposed to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.layer7tech.com/products/oauth-toolkit" target="_blank"><img class="alignleft size-full wp-image-3294" style="margin: 10px;" title="OAuth for Mobile" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/11/OAuth-for-Mobile-v2.jpg" alt="OAuth for Mobile" width="300" height="163" /></a>Here’s an interesting pattern that we’re constantly running into at various <a href="http://www.layer7tech.com/library/solution-briefs/layer-7-for-api-management/2109" target="_blank">API Management projects</a>: runtime mapping between a token used by external mobile applications and another form of authentication required by an internal system. The need for this comes up when a legacy API/service with an existing access control mechanism needs to be exposed to a mobile application for which the current access control mechanism is not appropriate.</p>
<p><strong>Example 1: Kerberos-Constrained Delegation</strong><br />
Services and APIs developed using Microsoft stacks often expect a Windows identity at runtime for role-based authorization. Providing a Kerberos ticket all the way to a mobile device outside the security domain is an anti-pattern. Instead, the user of the mobile application is subjected to an OAuth handshake. The authorization server leverages the user credentials at handshake time to also get a Kerberos ticket on behalf of this user and stores it as part of the OAuth session – see the token lifecycle management concept explained in <a href="http://www.layer7tech.com/blogs/index.php/oauth-token-management-2/" target="_blank">this previous post</a>. The OAuth access token is mapped to the Kerberos ticket at runtime when the API calls are made by the mobile application.</p>
<p><strong>Example 2: An SSO Token</strong><br />
Many backend services were originally intended to be consumed by Web applications. When the user of a Web application logs into the Web portal, a session is created in the IAM solution and when the Web portal needs to consume the internal API on behalf of the user, it leverages this same SSO token. I’m thinking here of solutions such as CA SiteMinder, Oracle Access Manager etc. When this same API is now consumed by a native mobile application, instead of a Web application, the existing login flow is no longer adequate. Again, an OAuth authorization server is leveraged to create a session between the mobile application and the API Management infrastructure. In this case, the OAuth authorization server will get the SSO token created at the same time as the front-side access token and map between the two at runtime.</p>
<p style="text-align: left;">This pattern is applicable no matter what the internal token is. Other common forms for these internal tokens include a SAML assertion issued by an STS and session IDs issued by the backend service itself through a <em>/login</em> method. Note that baking such login methods directly into an API constitutes an anti-pattern but the token mapping offers a non-intrusive “resolution”, which restores proper decoupling at the perimeter whilst avoiding any change to the legacy backend.</p>
<p><strong>OAuth Handshake</strong><br />
During an initial OAuth handshake, the OAuth authorization server is provided with credentials for the user. These credentials might be provided by the application itself in the case of a resource-owner-password-credentials grant type or by the user via a login form directly on the OAuth authorization server. The best practice is to use password grants for trusted applications (applications provided by the same provider of the API itself) and to use the implicit or authorization-code grant type for third-party applications. These credentials are used by the OAuth authorization server to authenticate the user and issue an access token. In addition to this, the OAuth authorization server may use the user credentials during this same process, to get an internal token issued by doing its own handshake with the internal token server/STS or by making a <em>/login</em>–style API call. The OAuth access token is returned to the mobile application and both tokens are stored as part of the OAuth session, alongside the other properties of the session, such as scope, timestamps etc. Note that there is often a temptation to store the user credentials as part of this session for later use but this is not recommended.</p>
<p><img class="aligncenter" style="margin-top: 10px; margin-bottom: 10px;" title="figure1-v2" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/11/figure1-v2.jpg" alt="" width="570" height="226" /></p>
<p>It makes sense to align the life spans of both the internal and external tokens so that they can be reissued together when they expire. Whenever these tokens need to be reissued, the OAuth authorization server will again be the component driving this. For better user experience, the mobile application will often want to avoid prompting the user for credentials. The OAuth standard accommodates this through the concept of refresh tokens but the internal token issuing pattern doesn’t always do that. For example, Kerberos-constrained delegation will let you get a new Kerberos token without the user&#8217;s password but other systems will not allow for that. This is often the source of motivation for storing the user credentials as part of the user session as mentioned above. You can instead allow for an internal token with a longer lifespan than the external token and reuse the existing internal token at OAuth refresh time.</p>
<p><strong>Runtime Mapping</strong><br />
At runtime, the mobile application consumes an API on behalf of the user by calling the OAuth resource server, the runtime analog of the OAuth authorization server.</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-3298" style="margin-top: 10px; margin-bottom: 10px;" title="figure2-v2" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/11/figure2-v2.jpg" alt="" width="570" height="216" />The OAuth resource server is the component responsible for validating an incoming OAuth access token. At runtime, the resource server can retrieve session information associated with the token presented by the application from the token management layer. The resource server will look at the scope and determine whether or not the API call should be authorized or not. When access control is completely assigned to the API Management infrastructure, the resource server makes all the authorization decisions, then passes the API call to the backend API endpoint but in this case, the backend API has its own authorization mechanism. To accommodate this mapping requirement, the resource server retrieves the internal token associated with the access token presented by the mobile application and injects it to the API call to the backend service.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/runtime-token-mapping-for-mobile-api-traffic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Define Your Own API Management Deployment Model</title>
		<link>http://www.layer7tech.com/blogs/index.php/define-your-own-api-management-deployment-model/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/define-your-own-api-management-deployment-model/#comments</comments>
		<pubDate>Mon, 08 Oct 2012 16:35:34 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[API Management]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=3118</guid>
		<description><![CDATA[API Management platforms come in different shapes and sizes: cloud-based infrastructure, on-premise infrastructure, multi-tenant SaaS, single-provider portals, API ecosystems etc. For this third part in a series of posts on API Management deployment models, let&#8217;s look at some of the considerations in choosing the right approach for your API Management project. Let’s Start With the [...]]]></description>
			<content:encoded><![CDATA[<p>API Management platforms come in different shapes and sizes: cloud-based infrastructure, on-premise infrastructure, multi-tenant SaaS, single-provider portals, API ecosystems etc. For this third part in a series of posts on API Management deployment models, let&#8217;s look at some of the considerations in choosing the right approach for your API Management project.</p>
<p><strong>Let’s Start With the Data</strong><br />
Assuming the data of the target APIs already exists, where is that data living? If the data does not exist, are there constraints as to where it can reside (certification requirements, legal obligations etc)? Bridging this data to the external world will require some level of security at the perimeter of the existing data zone, regardless of where or how the rest of the API Management infrastructure is deployed. In that case, the infrastructure model is at least part of the solution. Conversely, if the data does not exist yet and/or can freely exist in a public zone, the hosted API Management model is a great alternative. Ideally, the data or backend is located in the &#8220;same&#8221; public zone. This may seem obvious but if the same zone is not hosting both API Management and backend, you do not realize the full benefit. Backend as a service can be considered as part of the platform, especially for public deployments.<br />
As Leif concludes in his post <a href="http://www.layer7tech.com/blogs/index.php/do-you-need-mbaas-to-be-a-mobile-bad-ass-developer/" target="_blank">Do You Need MBaaS to be a Mobile Bad Ass Developer?</a>, enterprise-focused APIs benefit less from MBaaS because the backend is too often tied to the enterprise zone.</p>
<p>Despite the advantages of a &#8220;near API Management&#8221;, many API providers require high degrees of elasticity, to handle seasonal peaks for example. Public providers deliver effective ways to accommodate such traffic characteristics. You want your cake and eat too? When data can be governed privately and pushed to public-side cache, API backend management is coordinated at the perimeter of each zone, to allow you to scale across multiple regions.</p>
<p style="text-align: center;"><img class="size-full wp-image-3127 aligncenter" title="define_your_own_figure1_v2" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/10/define_your_own_figure1_v2.jpg" alt="" width="575" height="344" /></p>
<p><strong>What About Identities?</strong><br />
Identity-related information is of particular sensitivity, which often makes it better suited for private. Even in situations where the data returned by APIs is effectively hosted, the authentication of subscribers can continue to involve an on-premise component. Done right, this means your API Management infrastructure will need to enable access control that accommodates federation across these zones.</p>
<p><img class="aligncenter size-full wp-image-3130" title="define_your_own_figure2_v2" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/10/define_your_own_figure2_v2.jpg" alt="" width="551" height="297" /></p>
<p>OAuth accommodates this in many ways. One can decouple the OAuth authorization server closer to the source of the identity and the OAuth resource server closer to the API data. Another approach is to implement the OAuth implementation fully in each zone and delegate authentication across zones, using a federated authentication API.</p>
<p><img class="aligncenter size-full wp-image-3131" title="define_your_own_figure3_v2" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/10/define_your_own_figure3_v2.jpg" alt="" width="444" height="242" /></p>
<p>The identities that applications will consume your API on behalf of may also be provided by a third party. Trends like social login and standards like OpenID Connect will enable this federated authentication to not only go across zones but integrate with social identity providers and enable a more social user experience. When building out your API Management infrastructure, be an OAuth hero, not a security zero.</p>
<p><strong>Which Ecosystem?</strong><br />
Creating visibility for an API by joining an API ecosystem can also be a motivating factor in selecting an API Management platform. I would argue that the Internet is the ecosystem and that maintaining ownership of your own APIs and their infrastructure does not preclude you from reaching out to your target developer audience. An API marketplace may help provide the visibility you are looking for but the <a href="http://www.layer7tech.com/solutions/api-management-solutions-for-mobile-and-web" target="_blank">complete API management infrastructure</a> will still have touch points to multiple zones, whether public or private.</p>
<p>In the end, there is no one-size-fits-all API Management deployment model and many considerations are relevant to design. This post does not claim to be an exhaustive list of such considerations. I’ve touched other obvious ones such as security and cost in the <a href="http://flascelles.wordpress.com/2012/02/07/api-management-infrastructure-vs-saas/" target="_blank">first</a> and <a href="http://www.layer7tech.com/blogs/index.php/faking-the-cloud-in-api-management/" target="_blank">second</a> parts of this series. Also, I will be describing this hybrid model in more detail at <a href="http://www.misti.com/default.asp?page=65&amp;Return=70&amp;ProductID=4985&amp;LS=cloud" target="_blank">Cloud Security Alliance Congress</a> when I give a presentation titled <em>Seasonal Burst Handling Using Hybrid Cloud Infrastructure</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/define-your-own-api-management-deployment-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile API Best Practice: Traffic Compression</title>
		<link>http://www.layer7tech.com/blogs/index.php/mobile-api-best-practice-traffic-compression/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/mobile-api-best-practice-traffic-compression/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 16:55:54 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[API Design & Optimization]]></category>
		<category><![CDATA[API Management]]></category>
		<category><![CDATA[Developers & Development]]></category>
		<category><![CDATA[Mobile Access]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=2867</guid>
		<description><![CDATA[Despite how simple it is to support, compressing API traffic is an often-overlooked optimization. In situations where an API returns verbose resources, compressing the payload is a great way to reduce latencies. JSON and XML are highly compressible formats, for example. APIs targeting mobile applications should pay special attention to improving call latency, as mobile [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.layer7tech.com/tutorials/api-optimization-tutorials" target="_blank"><img class="alignleft size-full wp-image-2894" style="margin: 0px;" title="Mobile API Traffic Compression" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/08/Mobile-API-Traffic-Compression.jpg" alt="Mobile API Traffic Compression" width="238" height="300" /></a>Despite how simple it is to support, compressing API traffic is an often-overlooked optimization. In situations where an API returns verbose resources, compressing the payload is a great way to reduce latencies. JSON and XML are highly compressible formats, for example.</p>
<p>APIs targeting mobile applications should pay special attention to improving call latency, as mobile apps are often used in bandwidth-constrained situations (e.g. using a mobile app on your smartphone connected to an airport wifi). One should set aggressive targets for these latencies, in order to maintain a positive user experience. Although UX specialists have many tricks up their sleeves, they can’t hide a 10-second API response time. Can your API always respond in 100ms or less under bad connections? Better?</p>
<p><a href="http://www.layer7tech.com/products/products-overview" target="_blank">Layer 7&#8242;s Gateways</a> have built-in compression of REST API traffic using gzip compression. Most client-side frameworks also have built-in support for this kind of encoding. The compression is initiated by the requesting application, simply by adding the following HTTP header to its requests:</p>
<p><span style="color: #888888;">accept-encoding: gzip</span></p>
<p>iOS sample:<span style="color: #808080;"><br />
&#8230;<br />
[urlReq setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"]<br />
&#8230;</span></p>
<p><a title="github" href="https://gist.github.com/3491254" target="_blank">Android sample</a>:<span style="color: #888888;"><br />
&#8230;</span><br />
<span style="color: #888888;"> URL url = new URL(urlString);</span><br />
<span style="color: #888888;"> HttpsURLConnection  conn =<br />
(HttpsURLConnection)url.openConnection();</span><br />
<span style="color: #888888;"> conn.setRequestProperty(&#8220;accept-encoding&#8221;, &#8220;gzip&#8221;);</span><br />
<span style="color: #888888;"> &#8230;</span></p>
<p><a title="github" href="https://gist.github.com/3490606" target="_blank">JavaScript sample</a>:<span style="color: #888888;"><br />
&#8230;</span><br />
<span style="color: #888888;"> ajax=new XMLHttpRequest();</span><br />
<span style="color: #888888;"> ajax.setRequestHeaders(&#8216;accept-encoding&#8217;,'gzip&#8217;);</span><br />
<span style="color: #888888;"> &#8230;</span></p>
<p>Any API traffic flowing through theLayer 7&#8242;s  <a title="Layer 7 API Proxy" href="http://www.layer7tech.com/products/api-proxy" target="_blank">SecureSpan API Proxy</a> or <a href="http://www.layer7tech.com/products/mobile-access-gateway" target="_blank">SecureSpan Mobile Access Gateway</a> automatically benefits from this compression.</p>
<p>Although the reduced-latency benefit of gzip encoding resources is more pronounced for larger resources and low-bandwidth networks, the compression tradeoff on the client side is negligible. API providers and mobile application developers should consider adopting this mode by default.</p>
<p>In addition to response compression, Layer 7 Gateways also support gzip encoding for request messages. This also provides reduction of latency on the client side when requests contain compressible payloads. For example, consider an HTTP PUT with content-type=application/json. The client application declares the compressed content using the content-encoding http header as part of the request.</p>
<p><span style="color: #888888;">PUT /aresource</span><br />
<span style="color: #888888;"> Content-Type: application/json</span><br />
<span style="color: #888888;"> Content-Encoding: gzip</span></p>
<p><span style="color: #888888;">[gzip encoded]{</span><br />
<span style="color: #888888;"> ‘a’: ‘large and complex json here’</span><br />
<span style="color: #888888;"> }[gzip encoded]</span></p>
<p>When a Layer 7 Gateway detects that an API requester declares this &#8220;preemptive&#8221; compression, it will not only automatically decompress the request at the perimeter but also compress the response using the same mechanism by default (if the response has a payload).</p>
<p><span style="color: #888888;">200 OK</span><br />
<span style="color: #888888;"> Content-Type: application/json</span><br />
<span style="color: #888888;"> Content-Encoding: gzip</span></p>
<p><span style="color: #888888;">[compressed response]</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/mobile-api-best-practice-traffic-compression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OAuth World Tour</title>
		<link>http://www.layer7tech.com/blogs/index.php/oauth-world-tour/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/oauth-world-tour/#comments</comments>
		<pubDate>Thu, 09 Aug 2012 21:00:17 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[Tech Talk Tuesday]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=2781</guid>
		<description><![CDATA[Steve and I had another great Tech Talk in Vancouver this week, discussing the recent controversy around OAuth 2.0 and the state of the standard in general. A couple of questions that came up (thank you Michael and David, among others) were around the availability of libraries for iOS and Android platforms. Although I’m not [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.layer7tech.com/library/tech-talks/tech-talk-tuesday-oauth-20-do-we-still-need-it/2619" target="_blank"><img class="alignleft size-full wp-image-2783" style="margin: 10px;" title="OAuth World Tour" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/08/OAuth-World-Tour-v1.jpg" alt="OAuth World Tour" width="300" height="189" /></a>Steve and I had <a href="http://www.layer7tech.com/library/tech-talks/tech-talk-tuesday-oauth-20-do-we-still-need-it/2619" target="_blank">another great Tech Talk</a> in Vancouver this week, discussing the recent controversy around OAuth 2.0 and the state of the standard in general. A couple of questions that came up (thank you Michael and David, among others) were around the availability of libraries for iOS and Android platforms.</p>
<p>Although I’m not as familiar with Android, there definitely seems to be a lack of tooling for enabling OAuth 2.0 on iOS today. The lack of client-side libraries for standards-based access control on mobile devices generally could be problematic for API adoption in the enterprise, as mobile applications represent one of the main targets for enterprise APIs.</p>
<p>Facilitating OAuth on mobile applications is going to be central to my presentation at <a href="http://www.meetup.com/Chicago-Mobile-Application-Development-Enthusiasts/events/62097172/" target="_blank">next week’s Chicago Mobile Meetup</a> where I’ve been invited to speak. At the meetup, we’ll be describing client-side OAuth tooling patterns, exchanging our ideas about different approaches and discussing some code samples.</p>
<p>From there, I will be making my way to Australia for an <a href="http://www.layer7tech.com/event-registration/apibreakfast" target="_blank">API Management Breakfast Seminar in Melbourne</a>, where I’ll be talking about API Management in general but also covering the latest in OAuth 2.0 solutions. Finally, I’ll be moving on to the <a href="http://www.gartner.com/technology/summits/apac/application-development/" target="_blank">Gartner AADI Summit in Sydney</a>, where Layer 7 will be at booth S6.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/oauth-world-tour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Returning from #CIS2012</title>
		<link>http://www.layer7tech.com/blogs/index.php/returning-from-cis2012-2/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/returning-from-cis2012-2/#comments</comments>
		<pubDate>Fri, 20 Jul 2012 17:45:04 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[Cloud Access Control]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Cloud Security]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Identity]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[OpenID Connect]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=2595</guid>
		<description><![CDATA[Cloud Identity Summit was definitely worth the trip. The talks were great, the audience was great and the venue was outstanding. Sign me up for next year in Napa! It’s beautiful and quiet at Vail Cascade this morning. As I stepped outside, I’m pretty sure I saw SAML scurrying away into the trees. This is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cloudidentitysummit.com/" target="_blank"><img class="alignleft size-full wp-image-2601" style="margin: 10px;" title="Francois Lascelles at Cloud Identity Summit" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/07/Francois-Lascelles-at-Cloud-Identity-Summit.jpg" alt="Francois Lascelles at Cloud Identity Summit" width="263" height="300" /></a>Cloud Identity Summit was definitely worth the trip. The talks were great, the audience was great and the venue was outstanding. Sign me up for next year in Napa!</p>
<p>It’s beautiful and quiet at <a href="http://www.vailcascade.com/" target="_blank">Vail Cascade</a> this morning. As I stepped outside, I’m pretty sure I saw SAML scurrying away into the trees. This is weird given this week’s proclamations that SAML was dead. Although we won&#8217;t be rid of SAML anytime soon, I do look forward to enterprise adoption of the new kid on the block: <a href="http://www.layer7tech.com/tutorials/openid-connect" target="_blank">OpenID Connect</a>. Easier federation, <a href="http://www.layer7tech.com/blogs/index.php/mobile-friendly-federated-identity-part-2-openid-connect/" target="_blank">OpenID Connect-style</a> is already common for consumer identity providers; enterprise identity providers should take note and follow suit. As a vendor of API Management infrastructure, it’s up to us to enable the enterprise to better reach out to its target audience. I see <a href="http://www.businesswire.com/news/home/20120716005274/en/Layer-7-Demonstrate-OpenID-Connect-Implementation-Cloud" target="_blank">support for OpenID Connect</a> as a key component in achieving this today.</p>
<p>My favorite proclamation of the week goes to Patrick Harding who declared in his talk titled “The Platformication of the Enterprise is Upon us Again and They Forgot Security (Again)” that API tokens are going to be “the currency of the API economy”. <a href="http://www.layer7tech.com/blogs/index.php/oauth-token-management-2/" target="_blank">The management of tokens and their lifecycle</a> is indeed a crucial component of API Management. Consider the case of a mobile application consuming an enterprise API using an OAuth token. Such tokens are associated with the API provider, the user (subscriber), the mobile application and the mobile device. Each live token is potentially associated with multiple parties and one of the challenges of API token management is to enable control of the right tokens by the right parties.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/returning-from-cis2012-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile-Friendly Federated Identity: Part 2 &#8211; OpenID Connect</title>
		<link>http://www.layer7tech.com/blogs/index.php/mobile-friendly-federated-identity-part-2-openid-connect/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/mobile-friendly-federated-identity-part-2-openid-connect/#comments</comments>
		<pubDate>Fri, 22 Jun 2012 00:00:11 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[Identity]]></category>
		<category><![CDATA[Mobile Access]]></category>
		<category><![CDATA[OAuth]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=2385</guid>
		<description><![CDATA[The idea of delegating the authentication of a user to a third-party is ancient. At some point however, a clever (or maybe lazy) developer thought to leverage an OAuth handshake to achieve this. In the first part of this blog post, I pointed out winning patterns associated with the popular social login trend. In this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://openid.net/connect/" target="_blank"><img class="alignleft size-medium wp-image-2414" style="margin: 10px;" title="openid_connect" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/06/openid_connect-300x63.png" alt="" width="300" height="63" /></a>The idea of delegating the authentication of a user to a third-party is ancient. At some point however, a clever (or maybe lazy) developer thought to leverage an OAuth handshake to achieve this. In the <a href="http://www.layer7tech.com/blogs/index.php/mobile-friendly-federated-identity-part-1-the-social-login-legacy/" target="_blank">first part</a> of this blog post, I pointed out winning patterns associated with the popular social login trend. In this second part, I suggest the use of specific standards to achieve the same for your identities.</p>
<p>OAuth was originally conceived as a protocol allowing an application to consume an API on behalf of a user. As part of an OAuth handshake, the API provider authenticates the user. The outcome of the handshake is the application getting an access token. This access token does not directly provide useful information for the application to identify the user. However, when the provider exposes an API that returns information about the user, the application can use this as a means to close the loop on the delegated authentication.</p>
<p><a href="http://flascelles.files.wordpress.com/2012/06/handshake1.png" target="_blank"><img class="alignnone size-full wp-image-382" style="margin-top: 10px; margin-bottom: 0px;" src="http://flascelles.files.wordpress.com/2012/06/handshake1.png" alt="" width="450" height="265" /></a></p>
<p><em>Step 1 – User is subjected to an OAuth handshake with provider knowing its identity</em></p>
<p><a href="http://flascelles.files.wordpress.com/2012/06/getuserinfo.png" target="_blank"><img class="alignnone size-full wp-image-382" style="margin-top: 10px; margin-bottom: 0px;" src="http://flascelles.files.wordpress.com/2012/06/getuserinfo.png" alt="" width="450" height="265" /></a></p>
<p><em>Step 2 – Application uses the access token to discover information about the user by calling an API</em></p>
<p>As a provider enabling an application to discover the identity of a user through such a sequence, you could define your own simple API. Luckily, an emerging standard covers such semantics: <a href="http://openid.net/connect/" target="_blank">OpenID Connect</a>. Currently a draft spec, OpenID Connect defines (among other things) a “user info” endpoint that takes an OAuth access token as its input and returns a simple JSON structure containing attributes about the user, authenticated as part of the OAuth handshake.</p>
<p>Request:<br />
<em> GET /userinfo?schema=openid HTTP/1.1</em><br />
<em> Host: server.example.com</em><br />
<em> Authorization: Bearer SlAV32hkKG</em></p>
<p>Response:<br />
<em>200 OK</em><br />
<em> content-type: application/json</em><br />
<em> {</em><br />
<em> “user_id”: “248289761001″,</em><br />
<em> “name”: “Jane Doe”,</em><br />
<em> “given_name”: “Jane”,</em><br />
<em> “family_name”: “Doe”,</em><br />
<em> “email”: “janedoe@example.com”,</em><br />
<em> “picture”: “http://example.com/janedoe.jpg”</em><br />
<em> }</em></p>
<p>In Layer 7&#8242;s <a href="http://www.layer7tech.com/products/mobile-access-gateway" target="_blank">SecureSpan Mobile Access Gateway</a> OpenID Connect implementation, a generic user info endpoint is provided, which validates an incoming OAuth access token and returns user attributes for the user associated with said token. You can plug in your own identity attributes as part of this user info endpoint implementation. For example, if you are managing identities using an LDAP provider, you inject an LDAP query in the policy, as illustrated below.</p>
<p><a href="http://flascelles.files.wordpress.com/2012/06/getuserattributes.png" target="_blank"><img class="alignnone size-full wp-image-382" style="margin-top: 10px; margin-bottom: 10px;" src="http://flascelles.files.wordpress.com/2012/06/getuserattributes.png" alt="" width="450" height="265" /></a></p>
<p>To get the right LDAP record, the query is configured to take the variable <em>${session.subscriber_id}</em> as its input. This variable is automatically set by the <a href="http://www.layer7tech.com/products/oauth-toolkit" target="_blank">Layer 7 OAuth Toolkit</a> as part of the OAuth access token validation. You could easily look up the appropriate identity attributes from a different source using, for example, a SQL query or even an API call – all the input necessary to discover these attributes is available to the manager.</p>
<p>Another aspect of OpenID Connect is the issuing of ID tokens during the OAuth handshake. This ID token is structured following the<a href="http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-00" target="_blank"> JSON Web Token specification (JWT)</a>, including JWS signatures. Layer 7’s OpenID Connect introduces the following assertions to issue and handle JWT-based ID tokens:</p>
<ul>
<li>Generate ID Token</li>
<li>Decode ID Token</li>
</ul>
<p><a href="http://flascelles.files.wordpress.com/2012/06/generateidtoken.png" target="_blank"><img class="alignnone size-full wp-image-382" style="margin-top: 10px; margin-bottom: 10px;" src="http://flascelles.files.wordpress.com/2012/06/generateidtoken.png" alt="" width="450" height="265" /></a></p>
<p>Note that, at the time of writing, OpenID Connect is a moving target and the specification is subject to change before finalization.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/mobile-friendly-federated-identity-part-2-openid-connect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile-Friendly Federated Identity: Part 1 &#8211; The Social Login Legacy</title>
		<link>http://www.layer7tech.com/blogs/index.php/mobile-friendly-federated-identity-part-1-the-social-login-legacy/</link>
		<comments>http://www.layer7tech.com/blogs/index.php/mobile-friendly-federated-identity-part-1-the-social-login-legacy/#comments</comments>
		<pubDate>Tue, 12 Jun 2012 18:00:57 +0000</pubDate>
		<dc:creator>Francois Lascelles</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Identity]]></category>
		<category><![CDATA[Mobile Access]]></category>
		<category><![CDATA[OAuth]]></category>

		<guid isPermaLink="false">http://www.layer7tech.com/blogs/?p=2275</guid>
		<description><![CDATA[If I were to measure the success of a federated identity system, I would consider the following factors: End user experience How easy it is for a relying party to participate How well it meets security requirements I get easily frustrated when subjected to bad user experience regarding user login and Single Sign-On but I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.layer7tech.com/library/product-data-sheets/securespan-mobile-access-gateway/2510" target="_blank"><img class="alignleft size-full wp-image-2279" style="margin: 10px 30px;" title="Mobile Identity Header" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/06/Mobile-Identity-Header.jpg" alt="Mobile Identity" width="210" height="300" /></a>If I were to measure the success of a federated identity system, I would consider the following factors:</p>
<ul>
<li>End user experience</li>
<li>How easy it is for a relying party to participate</li>
<li>How well it meets security requirements</li>
</ul>
<p>I get easily frustrated when subjected to bad user experience regarding user login and Single Sign-On but I also recognize apps that get this right. In this first part of a series on the topic of mobile-friendly federated identity, I would like to identify winning patterns associated with the social login trend.</p>
<p>My friend Martin recently introduced me to a mobile app called Strava, which tracks bike and run workouts. You start the app at the beginning of the workout and it captures GPS data along the way – distance, speed, elevation etc. Getting this app working on my smartphone was the easiest thing ever &#8211; download, start the app, login with Facebook, ready to go. The login part was flawless &#8211; I tapped the <em>Login with Facebook</em> button and was redirected to the native Facebook app on my smartphone, from which I was able to express consent.</p>
<p>This neat OAuth-ish handshake only required three taps of my thumb. If I had been redirected through a mobile browser, I would have had to type in email address and password. By the way, I don’t even know that password, it’s hidden in some encrypted file on my laptop somewhere, so at this point I move on to something else and that’s the end of the app for me. Starting such handshakes by redirecting the user through the native app is the right choice in the case of a native app relying on a social provider that also has its own native app.</p>
<p><a href="http://www.layer7tech.com/blogs/wp-content/uploads/2012/06/Mobile-Identity-Figure-1.jpg" target="_blank"><img class="alignleft size-full wp-image-2283" title="Mobile Identity Figure 1" src="http://www.layer7tech.com/blogs/wp-content/uploads/2012/06/Mobile-Identity-Figure-1.jpg" alt="Mobile Identity Figure 1" width="600" height="323" /></a> <em>Figure 1 – Create account by expressing consent on social provider native app</em></p>
<p>At this point, my social identity is associated to the session that the Strava app has with the Strava API. Effectively, I have a Strava account without needing to establish a shared secret with this service. This is the part where federated identity comes in. Strava does not need to manage a shared secret with me and does not lose anything in federating my identity to a social provider. It still lets me create a profile on their service and saves data associated to me.</p>
<p>When I came home from my ride, I was able to get nice graphs and stats and once I accepted the fact that I have become old, fat and slow, decided to check <a href="http://www.strava.com" target="_blank">strava.com</a> on my laptop. Again, a friendly social login button enabled me to login in a flash and I could see the same information with a richer GUI. Of course, on my laptop, I do have a session with my social provider on the same browser, so this works great. The same service accessed from multiple devices, each redirecting me to authenticate in the appropriate way for the device in use.</p>
<p>Now that we’ve established how fantastic the login user experience is, what about the effort needed on the relying party? Strava has to register an app on Facebook. Once this is in place, a Strava app simply takes the user through the handshake and retrieves information about that user once the handshake is complete. In the case of Facebook on an iOS device, the instructions on how to do this are available <a href="https://developers.facebook.com/docs/mobile/ios/build/#implementsso" target="_blank">here</a>. Even without a client library, all that would be required would be to implement an OAuth handshake and call an API with the resulting token, to discover information about the user. There is no XML, there is no SAML, no digital signatures and other things that would cause mobile developers to cringe.</p>
<p>Although a good user experience is critical to the adoption of an app, the reasons for Strava to leverage the social network for login go beyond simplifying user login. Strava also happens to rely on the social network to let users post their exploits. This in turn enhances visibility for the app and drives adoption, as other users of the same social network discover Strava through these posts.</p>
<p>Although social login is not just about federated authentication, it creates expectations as to how federated authentication should function and what should be required to implement it. These expectations are not just from end users but also from a new breed of application developers who rely on lightweight, mobile-friendly mechanisms.</p>
<p>In the second part of this series, I will illustrate how you can cater to such expectations and implement the same patterns for your own identities, using standards like OAuth and OpenID Connect with the <a href="http://www.layer7tech.com/library/product-data-sheets/securespan-mobile-access-gateway/2510" target="_blank">Layer 7 Gateway</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layer7tech.com/blogs/index.php/mobile-friendly-federated-identity-part-1-the-social-login-legacy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
