{"id":262,"date":"2012-03-15T17:36:00","date_gmt":"2012-03-16T02:36:00","guid":{"rendered":"http:\/\/www.cloudidentity.com\/blog\/2012\/03\/15\/windows-identity-foundation-tools-for-visual-studio-11-part-i-using-the-local-development-sts-2\/"},"modified":"2012-03-15T17:36:00","modified_gmt":"2012-03-16T02:36:00","slug":"windows-identity-foundation-tools-for-visual-studio-11-part-i-using-the-local-development-sts-2","status":"publish","type":"post","link":"https:\/\/www.cloudidentity.com\/blog\/2012\/03\/15\/windows-identity-foundation-tools-for-visual-studio-11-part-i-using-the-local-development-sts-2\/","title":{"rendered":"Windows Identity Foundation Tools for Visual Studio 11 Part I: Using The Local Development STS"},"content":{"rendered":"<p>Welcome to the first walkthrough of the new WIF tools for Visual Studio 11 Beta! This is about using the local STS feature to test your application on your dev machine.<\/p>\n<p> The complete series include <a href=\"http:\/\/bit.ly\/ymqBuv\">Using the Local Development STS<\/a>, <a href=\"http:\/\/bit.ly\/wDXL3J\">manipulating common config settings<\/a>, <a href=\"http:\/\/bit.ly\/zJCt9E\">connecting with a business STS<\/a>, <a href=\"http:\/\/bit.ly\/zN84Iz\">get an F5 experience with ACS2<\/a>.<\/p>\n<ul><!--StartFragment--><\/ul>\n<p>Let\u2019s say that you downloaded the <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=245849\">new WIF tools<\/a> (well done! <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" alt=\"Smile\" src=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/6131.wlEmoticon_2D00_smile_5F00_43AAF687.png\" \/>) and you are itching to see them in action. Right away good Sir\/Ma\u2019am!<\/p>\n<p>&#160;<\/p>\n<p>Fire up Visual Studio 11 as Administrator (I know, I know\u2026 I\u2019ll explain later) and create a new ASP.NET Web Form Application.<\/p>\n<p><a href=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/5148.image_5F00_7C55A094.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px;border: 0px currentcolor\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/5148.image_5F00_7C55A094.png\" width=\"600\" height=\"357\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p>Right-click on the project in Solution Explorer, you\u2019ll find a very promising entry which sounds along the lines of \u201cIdentity and Access\u201d. Go for it!<\/p>\n<p>&#160;<\/p>\n<p><a href=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/0743.image_5F00_67EFDB09.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px;border: 0px currentcolor\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/0743.image_5F00_67EFDB09.png\" width=\"500\" height=\"544\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p>You get to a dialog which, in (hopefully) non-threatening terms, suggests that it can help handling your authentication options.    <br \/>The default tab, Providers, offer three options.<\/p>\n<p><a href=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/2402.image_5F00_4B264027.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px;border: 0px currentcolor\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/2402.image_5F00_4B264027.png\" width=\"600\" height=\"547\" \/><\/a><\/p>\n<p>The first option sounds pretty promising: we might not know what an STS exactly is, but we do want to test our application. Let\u2019s pick that option and hit OK. <\/p>\n<p><a href=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/8360.image_5F00_2162C534.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px;border: 0px currentcolor\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/8360.image_5F00_2162C534.png\" width=\"600\" height=\"548\" \/><\/a><\/p>\n<p>That\u2019s it? There must be something else I have to do, right? <em>Nope<\/em>. Just hit F5 and witness the magic of claims-based identity unfold in front of your very eyes. (OK, this is getting out hand. I\u2019ll tone it down a little).     <br \/>As you hit F5, keep an eye on the system tray: you\u2019ll see a new icon appear, informing you that \u201cLocal STS\u201d is now running.<\/p>\n<p><a href=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/4075.image_5F00_0D69329E.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px;border: 0px currentcolor\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/4075.image_5F00_0D69329E.png\" width=\"332\" height=\"218\" \/><\/a><\/p>\n<p>Your browser opens on the default page, shows the usual signs of redirection, and lands on the page with an authenticated user named Terry. Ok, that was simple! But what happened exactly?<\/p>\n<p><a href=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/0842.image_5F00_12D7A342.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px;border: 0px currentcolor\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/0842.image_5F00_12D7A342.png\" width=\"500\" height=\"440\" \/><\/a><\/p>\n<p>Stop the debugger and go back to the Identity and Access dialog, then pick the Local Development STS tab.<\/p>\n<p>The Local STS is a test endpoint, provided by the WIF tools, which can be used on the local machine for getting claims of arbitrary types and values in your application. By choosing \u201cUse the local development STS to test your application\u201d you told the WIF tools that you want your application to get tokens from the local STS, and the tools took care to configure your app accordingly. When you hit F5, the tools launched an instance of LocalSTS and your application redirected the request to it. LocalSTS does not attempt to authenticate requests, it just emits a token with the claim types and values it is configured to emit. In your F5 session you got the default claim types (name, surname, role, email) and values: if you want to modify those and add your own the Local Development STS tab offers you the means to do so, plus a handful of other knobs.<\/p>\n<p>&#160;<\/p>\n<p><a href=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/6710.image_5F00_4246120E.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 0px currentcolor\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/6710.image_5F00_4246120E.png\" width=\"600\" height=\"548\" \/><\/a><\/p>\n<p>What does this all mean? Well, for one: you no longer need to rely on the kindness of strangers (i.e. your admins) to set up a test\/staging ADFS2 endpoint to play with claim values; you also no longer need to create a custom STS and then modify directly the code in order to get the values you need to test your application.<\/p>\n<p>Also: all the settings for the LocalSTS come from one file, LocalSTS.exe.config, which lives in your application\u2019s folder. That means that you can create multiple copies of those files with different settings for your various test cases; you can even email values around fro repro-ing problems and similar. We think it\u2019s pretty cool <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" alt=\"Smile\" src=\"http:\/\/cloudidentity.com\/blog\/wp-content\/uploads\/2012\/03\/6131.wlEmoticon_2D00_smile_5F00_43AAF687.png\" \/><\/p>\n<p>&#160;<\/p>\n<p>Now: needless to say, this is <em>absolutely<\/em> for development-time and test-time only activities. This is absolutely not fit for production, in fact the F5 experience is enabled by various defaults which assume that you\u2019ll be running this far, far away from production (\u201cyou don\u2019t just walk in Production\u201d). In v1 the tools kind of tried to enforce some production-level considerations, like HTTPS, and your loud &amp; clear feedback is that at development time you don\u2019t want to be forced to deal with those and that you\u2019ll do it in your staging\/production environment. We embraced that, please let us know how that works for you!<\/p>\n<p>Don\u2019t forget to check out the other walkthroughs: the complete series include <a href=\"http:\/\/bit.ly\/ymqBuv\">Using the Local Development STS<\/a>, <a href=\"http:\/\/bit.ly\/wDXL3J\">manipulating common config settings<\/a>, <a href=\"http:\/\/bit.ly\/zJCt9E\">connecting with a business STS<\/a>, <a href=\"http:\/\/bit.ly\/zN84Iz\">get an F5 experience with ACS2<\/a>.<\/p>\n<div style=\"clear:both\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to the first walkthrough of the new WIF tools for Visual Studio 11 Beta! This is about using the local STS feature to test your application on your dev machine. The complete series include Using the Local Development STS, manipulating common config settings, connecting with a business STS, get an F5 experience&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/comments?post=262"}],"version-history":[{"count":0,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts\/262\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/media?parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/categories?post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/tags?post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}