SlideShare une entreprise Scribd logo
1  sur  55
   Authentication vs. Authorization
   Claims Authentication in SharePoint 2010
   Integrating Facebook from scratch
     New SharePoint 2010 web application
     Adding an Azure Access Control Service (ACS)
      Trusted Identity Provider (Facebook)
     Going “beyond authentication” to surface
      Facebook data in SharePoint and vice versa
   How many of you are…
     Developers?
     System administrators?
     IT professionals?
     Others?
   Integrating SharePoint 2010 with an
    identity provider such as Facebook will
    present different challenges for each role
   Authentication (AuthN) is the process of
    validating a user’s identity
     SharePoint never performs authentication
   If the login prompt keeps appearing, think
    authentication issue!
     Unless it’s the dreaded
     loopback check!
   Authorization (AuthZ) is the process of
    determining the resources, features, etc. to
    which an authenticated user has access
   If you see “Access Denied” errors, think
    authorization issue!
   What is a claim?
     A piece of information describing a user
      ▪ Name
      ▪ Email Address
      ▪ Role/Group membership
      ▪ Age
      ▪ Hire Date
   Whose claims do I trust, and which claims
    affect authorization decisions I make?
   Token
     Serialized set of claims about an authenticated
     user, digitally signed by the token’s issuer
   Identity Provider (IP)
     Validates user credentials
   Security Token Service (STS)
     Builds, signs, and issues tokens containing claims
   Relying party (RP)
     Applications that makes authorization decisions
     based on claims (SharePoint 2010)
   Decoupling of authentication logic from
    authorization and personalization logic
     Applications no longer need to determine who
      the user is, they receive claims identifying the
      user
     Great for developers who rarely want to work
      with identity!
   Provides a common way for applications
    to acquire the identity information they
    need about users
1. “I’d like to access this protected resource.”
2. “I don’t know who you are. Identity provider, authenticate him.”
3. “My user ID is Danny and my password is BaCoNbAcOn!!1.”
4. “Hi, Danny. Here is a token you can
   use containing attributes about you.”
5. “I’d like to access this resource;
   hopefully it has the proof you need
   to authorize me!”




                                                       SharePoint 2010
   Claims Based Authentication (Tokens)
     Windows Authentication: NTLM/Kerberos, Basic
     Forms-Based Authentication (ASP.NET
      Membership provider and Role manager)
     Other Trusted Identity providers (like Facebook!)
   Classic Mode Authentication (“Old School”)
     Windows Authentication (NTLM/Kerberos) only
   Both map authenticated users to SPUser
    objects (security principals)
   The single biggest decision of your life!
   Updated TechNet guidance:
     “For new implementations of SharePoint
     Server 2010, you should consider we
     recommend claims-based authentication.”




      http://technet.microsoft.com/en-us/library/cc262350.aspx
   Allows users to choose how to authenticate
    when multiple providers are configured
    (Mixed Authentication)
   /_login/default.aspx




   Custom code opportunity
     http://bit.ly/IR0eRR
   Code behind:
IClaimsPrincipal claimsPrincipal = Page.User as IClaimsPrincipal;
IClaimsIdentity claimsIdentity = (IClaimsIdentity) claimsPrincipal.Identity;
GridView1.DataSource = claimsIdentity.Claims;
Page.DataBind();




    http://blogs.pointbridge.com/Blogs/nielsen_travis/Pages/Post.aspx?_ID=32
Demo #1
 Cloud-based service that provides an easy
  way of authenticating and authorizing users
  to gain access to web applications
 Includes support for Windows Live ID,
  Google, Yahoo, and Facebook
 Also includes support for Active Directory
  Federation Services (AD FS) 2.0
 Simple browser-based management portal
 $1.99/100k transactions (free until Nov. 30!)
 Three things must be done to add support
  for users to login to SharePoint via Facebook:
1. Create a Facebook application
      https://developers.facebook.com/apps
2.    Configure ACS for Facebook support
      Permissions you will request from Facebook users
      Relying Party application and Rule Group setup
3.    Configure ACS as a Trusted Identity Provider
      in SharePoint
   No! You can integrate external identity
    providers with SharePoint without ACS
     You have no choice if you want to use identity
     providers not currently supported by ACS
     (such as LinkedIn or Twitter)
   You will need to write your own code to:
     Ensure the user has logged in to the IP
     Obtain claim information from the IP
     Package and sign tokens (your own STS)
Demo #2
   Click “Create New App”
   Provide Display Name and Namespace




   Note App ID and App Secret values
   Provide Website URL to ACS
Demo #3
   From the ACS management portal, add a
    new Identity Provider
   Enter App ID and App Secret values from
    Facebook application you created earlier
   Enter a comma-delimited list of Application
    Permissions you want to request
     https://developers.facebook.com/docs/reference/
     api/permissions/
   In our demo, we will request:
     email,user_location,user_hometown,user_website,use
     r_work_history,publish_stream,user_birthday,friend
     s_birthday,user_education_history,user_photos,user
     _about_me
   Permissions you request will be displayed
    to the end user the first time they log in




   Request the minimum subset of
    permissions you need
     Users are more likely to reject bigger requests
   Generate Rule Group
     Named set of claim rules that define which
     identity claims are passed from identity
     providers to your relying party application




   SharePoint will still need to be configured
    to make use of these claims
   Configure Relying Party application
   Provide Name, Realm, and Return URL
     Return URL: Realm + /_trust
   Choose SAML 1.1 token format
   Update Token lifetime to >600 seconds




   Select Identity providers and Rule
    groups
   Generate self-signed certificate
     C:Program FilesMicrosoft Office
     Servers14.0Tools>MakeCert.exe -r
     -pe -n
     "CN=dannyjessee.accesscontrol.wind
     ows.net" -sky exchange -ss my
     (Self-signed, exportable, subject key type
     “exchange,” store in “personal” certificate store)
   Development only! Please use a
    legitimate certificate in production!
   Upload this certificate (.pfx format) as the
    Token Signing Certificate in ACS
Demo #4
   New-SPTrustedRootAuthority
     Name, Certificate (self-signed .cer made
     earlier)
   New-SPClaimTypeMapping
     IncomingClaimType
     IncomingClaimTypeDisplayName
     LocalClaimType (or SameAsIncoming)
   New-SPTrustedIdentityTokenIssuer
     Name, Realm, ImportTrustCertificate
     ClaimsMappings, SignInUrl, IdentifierClaim
   Running this PowerShell script will add
    “Facebook” to the list of Trusted Identity
    Providers
   Eligible to be added to Claims-based web
    applications in Central Administration
   Before Facebook users will be authorized
    to access anything, we must grant them
    an appropriate level of permissions
   Best to set a “Full Read” web application
    policy for users coming in from Facebook
     In a public-facing scenario, you likely won’t
      know specific user identities to set more
      granular permissions
     Not to mention the people picker issues!
Demo #5
   All claims whose OriginalIssuer is
    TrustedProvider:Facebook




   AccessToken is the key to all user data
   Make calls to the Facebook Graph API
     https://developers.facebook.com/docs/referen
        ce/api/
       Retrieve data about the user and his/her
        friends
       Upload photos/videos, post status messages
       Data returned from Facebook in JSON format
       Requests to https://graph.facebook.com/...
        ▪ me/feed, me/friends, me/photos, me/videos
Demo #6
   Code snippets in these slides are not
    complete
     Do not include proper error checking/handling
     Do not show proper impersonation of System
     Account where necessary
   Please download the code
     http://facebookwebparts.codeplex.com
   Examples use the Facebook C# SDK
     http://csharpsdk.org
   Returned in a claim from Facebook
     A new AccessToken is issued each login
     Our key to all of the data about the logged in user
     Required for all calls to the Facebook Graph API
   Two hour lifetime by default
   To leverage this token across the site, I store
    it in the SPWeb.AllProperties property bag
     web.AllProperties[“fbAccessToken_{loginname}”]
     AllProperties required for case sensitivity
 Change                 to
 Initial display name for the SPUser is based
  on the specified IdentifierClaim
 Make this friendlier – we know their name!

if (SPContext.Current.Web.CurrentUser == null)
{
   SPUser user = web.EnsureUser("i:" + claimsIdentity.Name);
   currentUser.Name = givenName;
   currentUser.Update();
}
var client = new Facebook.FacebookClient(token);
var me = (IDictionary<string, object>)client.Get("me");
JsonObject location = me["location"] as JsonObject;
myLocation = (string)location["name"];


       myLocation is in City, State format
       Parsed and sent to Weather Underground
        API
        http://api.wunderground.com/api/[key]/
         geolookup/conditions/forecast/q/[state]/
         [city].json
var client = new Facebook.FacebookClient(token);
var me = (IDictionary<string, object>)client.Get("me");
SPList lstContacts = web.Lists["Contacts"];
SPListItem item = lstContacts.Items.Add();
item["First Name"] = (string)me["first_name"];
item["Last Name"] = (string)me["last_name"];
JsonArray work = me["work"] as JsonArray;
// Most recent/current employer stored in work[0]
JsonObject company = work[0] as JsonObject;
JsonObject employer = company["employer"] as JsonObject;
JsonObject position = company["position"] as JsonObject;
item["Company"] = (string)employer["name"];
item["Job Title"] = (string)position["name"];
item.SystemUpdate();
var client = new Facebook.FacebookClient(token);
var me = (IDictionary<string, object>)
client.Get("me/friends?fields=name,birthday");
JsonArray friendData = me["data"] as JsonArray;
foreach (JsonObject friend in friendData)
{
   if (friend.ContainsKey("birthday"))
   {
      /* Some users share MM/DD of birthday, others share
         MM/DD/YYYY
          We only care about MM/DD for our purposes, and
         Facebook always pads with leading zeros */
      string birthday = (string)friend["birthday"];
      birthMonth = int.Parse(birthday.Substring(0, 2));
      birthDate = int.Parse(birthday.Substring(3, 2));
      ...
SPList lstCalendar = web.Lists["Calendar"];
SPListItem birthdayItem = lstCalendar.Items.Add();
birthdayItem["Title"] = name + (name.EndsWith("s") ? "' birthday" :
"'s birthday");
birthdayItem["EventDate"] = dtBirthday;
birthdayItem[SPBuiltInFieldId.Duration] = 60 * 60 * 24;
birthdayItem[SPBuiltInFieldId.EventType] = 1;
birthdayItem[SPBuiltInFieldId.fRecurrence] = true;
birthdayItem[SPBuiltInFieldId.fAllDayEvent] = true;
string recurrence =
"<recurrence><rule><firstDayOfWeek>su</firstDayOfWeek>" +
"<repeat><yearly yearFrequency='1' month='" + birthMonth.ToString()
+ "' day='" + birthDate.ToString() + "' /></repeat>" +
"<windowEnd>2014-01-01T00:00:00Z</windowEnd></rule></recurrence>";
birthdayItem["RecurrenceData"] = recurrence;
birthdayItem.SystemUpdate();
var client = new Facebook.FacebookClient(token);
Dictionary<string, object> dict = new Dictionary<string,
object> {
   { "title", "I know how to post videos to
Facebook...from SharePoint!" },
   { "description", "See more at SPS Cincinnati October
27, 2012!" },
   { "vid1", new FacebookMediaObject { ContentType =
"video/x-flv", FileName = "facebook.flv"
}.SetValue(File.ReadAllBytes(@"C:facebook.flv")) }
};
client.PostAsync("me/videos", dict);
var client = new Facebook.FacebookClient(token);
Dictionary<string, object> dict = new Dictionary<string,
object>();
dict.Add("message", "Yay for Claims-Based Identity,
Facebook, SharePoint, and Bacon!");
dict.Add("link",
"http://sharepointsaturday.org/cincinnati");
dict.Add("picture",
"http://www.sharepointsaturday.org/cincinnati/SiteImages/Sca
rePointSpookinnati.jpg");
dict.Add("name", "SharePoint Saturday Cincinnati");
dict.Add("caption", "October 27, 2012");
dict.Add("description", "Come see my presentation about
Claims-Based Identity in SharePoint 2010 at SPS
Cincinnati!");
client.PostAsync("me/feed", dict);
   Ensure “Allow users to edit values for this
    property” flag is set



SPServiceContext sc = SPServiceContext.GetContext(site);
UserProfileManager userProfileMangager = new
   UserProfileManager(sc);
UserProfile profile =
   userProfileMangager.GetUserProfile(true);
profile[PropertyConstants.StatusNotes].Value =
   txtStatus.Text;
profile.Commit();
   Silverlight application courtesy MossLover
   Interfaces with the user’s webcam, saves
    captured images to document library
   Added event handler to upload to
    Facebook
string contentType = "image/jpeg";
var client = new Facebook.FacebookClient(fbAccessToken);
Dictionary<string, object> dict = new Dictionary<string,
object> {
   { "message", "Uploaded picture from Silverlight webcam
image capture in SharePoint!" },
   { "pic1", new FacebookMediaObject { ContentType =
contentType, FileName = properties.ListItem.File.Name
}.SetValue(properties.ListItem.File.OpenBinary()) }
};
client.PostAsync("me/photos", dict);
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud
SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud

Contenu connexe

Tendances

Build Secure Cloud-Hosted Apps for SharePoint 2013
Build Secure Cloud-Hosted Apps for SharePoint 2013Build Secure Cloud-Hosted Apps for SharePoint 2013
Build Secure Cloud-Hosted Apps for SharePoint 2013Danny Jessee
 
Extending SharePoint 2010 to your customers and partners
Extending SharePoint 2010 to your customers and partnersExtending SharePoint 2010 to your customers and partners
Extending SharePoint 2010 to your customers and partnersCorey Roth
 
CIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in ActionCIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in ActionCloudIDSummit
 
DD109 Claims Based AuthN in SharePoint 2010
DD109 Claims Based AuthN in SharePoint 2010DD109 Claims Based AuthN in SharePoint 2010
DD109 Claims Based AuthN in SharePoint 2010Spencer Harbar
 
SharePoint 2010 authentications
SharePoint 2010 authenticationsSharePoint 2010 authentications
SharePoint 2010 authenticationsWyngate Solutions
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring SecurityOrest Ivasiv
 
Linkedin & OAuth
Linkedin & OAuthLinkedin & OAuth
Linkedin & OAuthUmang Goyal
 
Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?Anil Saldanha
 
O auth2 with angular js
O auth2 with angular jsO auth2 with angular js
O auth2 with angular jsBixlabs
 
Claims Based Identity In Share Point 2010
Claims  Based  Identity In  Share Point 2010Claims  Based  Identity In  Share Point 2010
Claims Based Identity In Share Point 2010Steve Sofian
 
The Who, What, Why and How of Active Directory Federation Services (AD FS)
The Who, What, Why and How of Active Directory Federation Services (AD FS)The Who, What, Why and How of Active Directory Federation Services (AD FS)
The Who, What, Why and How of Active Directory Federation Services (AD FS)Jay Simcox
 
Securing your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID ConnectSecuring your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID ConnectManish Pandit
 
24032022 Zero Trust for Developers Pub.pdf
24032022 Zero Trust for Developers Pub.pdf24032022 Zero Trust for Developers Pub.pdf
24032022 Zero Trust for Developers Pub.pdfTomasz Kopacz
 
Best Practices for Application Development with Box
Best Practices for Application Development with BoxBest Practices for Application Development with Box
Best Practices for Application Development with BoxJonathan LeBlanc
 
Live Identity Services Drilldown - PDC 2008
Live Identity Services Drilldown - PDC 2008Live Identity Services Drilldown - PDC 2008
Live Identity Services Drilldown - PDC 2008Jorgen Thelin
 
Creating a Sign On with Open id connect
Creating a Sign On with Open id connectCreating a Sign On with Open id connect
Creating a Sign On with Open id connectDerek Binkley
 

Tendances (20)

Build Secure Cloud-Hosted Apps for SharePoint 2013
Build Secure Cloud-Hosted Apps for SharePoint 2013Build Secure Cloud-Hosted Apps for SharePoint 2013
Build Secure Cloud-Hosted Apps for SharePoint 2013
 
Extending SharePoint 2010 to your customers and partners
Extending SharePoint 2010 to your customers and partnersExtending SharePoint 2010 to your customers and partners
Extending SharePoint 2010 to your customers and partners
 
CIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in ActionCIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in Action
 
DD109 Claims Based AuthN in SharePoint 2010
DD109 Claims Based AuthN in SharePoint 2010DD109 Claims Based AuthN in SharePoint 2010
DD109 Claims Based AuthN in SharePoint 2010
 
AD FS Workshop | Part 2 | Deep Dive
AD FS Workshop | Part 2 | Deep DiveAD FS Workshop | Part 2 | Deep Dive
AD FS Workshop | Part 2 | Deep Dive
 
SharePoint 2010 authentications
SharePoint 2010 authenticationsSharePoint 2010 authentications
SharePoint 2010 authentications
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
 
OAuth2 and LinkedIn
OAuth2 and LinkedInOAuth2 and LinkedIn
OAuth2 and LinkedIn
 
Linkedin & OAuth
Linkedin & OAuthLinkedin & OAuth
Linkedin & OAuth
 
Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?
 
O auth2 with angular js
O auth2 with angular jsO auth2 with angular js
O auth2 with angular js
 
Claims Based Identity In Share Point 2010
Claims  Based  Identity In  Share Point 2010Claims  Based  Identity In  Share Point 2010
Claims Based Identity In Share Point 2010
 
The Who, What, Why and How of Active Directory Federation Services (AD FS)
The Who, What, Why and How of Active Directory Federation Services (AD FS)The Who, What, Why and How of Active Directory Federation Services (AD FS)
The Who, What, Why and How of Active Directory Federation Services (AD FS)
 
SharePoint 2013 and ADFS
SharePoint 2013 and ADFSSharePoint 2013 and ADFS
SharePoint 2013 and ADFS
 
Securing your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID ConnectSecuring your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID Connect
 
24032022 Zero Trust for Developers Pub.pdf
24032022 Zero Trust for Developers Pub.pdf24032022 Zero Trust for Developers Pub.pdf
24032022 Zero Trust for Developers Pub.pdf
 
Oauth 2.0
Oauth 2.0Oauth 2.0
Oauth 2.0
 
Best Practices for Application Development with Box
Best Practices for Application Development with BoxBest Practices for Application Development with Box
Best Practices for Application Development with Box
 
Live Identity Services Drilldown - PDC 2008
Live Identity Services Drilldown - PDC 2008Live Identity Services Drilldown - PDC 2008
Live Identity Services Drilldown - PDC 2008
 
Creating a Sign On with Open id connect
Creating a Sign On with Open id connectCreating a Sign On with Open id connect
Creating a Sign On with Open id connect
 

En vedette

Get Started with Apps for SharePoint 2013!
Get Started with Apps for SharePoint 2013!Get Started with Apps for SharePoint 2013!
Get Started with Apps for SharePoint 2013!Danny Jessee
 
Get Started with Apps for SharePoint 2013
Get Started with Apps for SharePoint 2013Get Started with Apps for SharePoint 2013
Get Started with Apps for SharePoint 2013Danny Jessee
 
SPC Adriatics 2016 - Alternative Approaches to Solution Development in Office...
SPC Adriatics 2016 - Alternative Approaches to Solution Development in Office...SPC Adriatics 2016 - Alternative Approaches to Solution Development in Office...
SPC Adriatics 2016 - Alternative Approaches to Solution Development in Office...Marc D Anderson
 
SPC Adriatics 2016 - Creating a Great User Experience in SharePoint
SPC Adriatics 2016 - Creating a Great User Experience in SharePointSPC Adriatics 2016 - Creating a Great User Experience in SharePoint
SPC Adriatics 2016 - Creating a Great User Experience in SharePointMarc D Anderson
 
Office 365 and share point online ramp up in 60 minutes for on-premises share...
Office 365 and share point online ramp up in 60 minutes for on-premises share...Office 365 and share point online ramp up in 60 minutes for on-premises share...
Office 365 and share point online ramp up in 60 minutes for on-premises share...Nik Patel
 
Get Started with Apps for SharePoint 2013!
Get Started with Apps for SharePoint 2013!Get Started with Apps for SharePoint 2013!
Get Started with Apps for SharePoint 2013!Danny Jessee
 
Unity Connect Haarlem 2016 - The Lay of the Land of Client-Side Development c...
Unity Connect Haarlem 2016 - The Lay of the Land of Client-Side Development c...Unity Connect Haarlem 2016 - The Lay of the Land of Client-Side Development c...
Unity Connect Haarlem 2016 - The Lay of the Land of Client-Side Development c...Marc D Anderson
 
Designing Corporate News Application Using SharePoint 2013 Web Content Manage...
Designing Corporate News Application Using SharePoint 2013 Web Content Manage...Designing Corporate News Application Using SharePoint 2013 Web Content Manage...
Designing Corporate News Application Using SharePoint 2013 Web Content Manage...Nik Patel
 
SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...
SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...
SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...Nik Patel
 
Build Secure Cloud-Hosted Apps for SharePoint 2013
Build Secure Cloud-Hosted Apps for SharePoint 2013Build Secure Cloud-Hosted Apps for SharePoint 2013
Build Secure Cloud-Hosted Apps for SharePoint 2013Danny Jessee
 

En vedette (10)

Get Started with Apps for SharePoint 2013!
Get Started with Apps for SharePoint 2013!Get Started with Apps for SharePoint 2013!
Get Started with Apps for SharePoint 2013!
 
Get Started with Apps for SharePoint 2013
Get Started with Apps for SharePoint 2013Get Started with Apps for SharePoint 2013
Get Started with Apps for SharePoint 2013
 
SPC Adriatics 2016 - Alternative Approaches to Solution Development in Office...
SPC Adriatics 2016 - Alternative Approaches to Solution Development in Office...SPC Adriatics 2016 - Alternative Approaches to Solution Development in Office...
SPC Adriatics 2016 - Alternative Approaches to Solution Development in Office...
 
SPC Adriatics 2016 - Creating a Great User Experience in SharePoint
SPC Adriatics 2016 - Creating a Great User Experience in SharePointSPC Adriatics 2016 - Creating a Great User Experience in SharePoint
SPC Adriatics 2016 - Creating a Great User Experience in SharePoint
 
Office 365 and share point online ramp up in 60 minutes for on-premises share...
Office 365 and share point online ramp up in 60 minutes for on-premises share...Office 365 and share point online ramp up in 60 minutes for on-premises share...
Office 365 and share point online ramp up in 60 minutes for on-premises share...
 
Get Started with Apps for SharePoint 2013!
Get Started with Apps for SharePoint 2013!Get Started with Apps for SharePoint 2013!
Get Started with Apps for SharePoint 2013!
 
Unity Connect Haarlem 2016 - The Lay of the Land of Client-Side Development c...
Unity Connect Haarlem 2016 - The Lay of the Land of Client-Side Development c...Unity Connect Haarlem 2016 - The Lay of the Land of Client-Side Development c...
Unity Connect Haarlem 2016 - The Lay of the Land of Client-Side Development c...
 
Designing Corporate News Application Using SharePoint 2013 Web Content Manage...
Designing Corporate News Application Using SharePoint 2013 Web Content Manage...Designing Corporate News Application Using SharePoint 2013 Web Content Manage...
Designing Corporate News Application Using SharePoint 2013 Web Content Manage...
 
SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...
SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...
SharePoint Saturday Chicago Suburbs 2016 - Modern Intranet Development Best P...
 
Build Secure Cloud-Hosted Apps for SharePoint 2013
Build Secure Cloud-Hosted Apps for SharePoint 2013Build Secure Cloud-Hosted Apps for SharePoint 2013
Build Secure Cloud-Hosted Apps for SharePoint 2013
 

Similaire à SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud

Developing custom claim providers to enable authorization in share point an...
Developing custom claim providers to enable authorization in share point   an...Developing custom claim providers to enable authorization in share point   an...
Developing custom claim providers to enable authorization in share point an...AntonioMaio2
 
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...Xamarin
 
SharePoint 2010 Extranets and Authentication: How will SharePoint 2010 connec...
SharePoint 2010 Extranets and Authentication: How will SharePoint 2010 connec...SharePoint 2010 Extranets and Authentication: How will SharePoint 2010 connec...
SharePoint 2010 Extranets and Authentication: How will SharePoint 2010 connec...Brian Culver
 
SPS Belgium 2015 - High-trust Apps for On-Premises Development
SPS Belgium 2015 -  High-trust Apps for On-Premises DevelopmentSPS Belgium 2015 -  High-trust Apps for On-Premises Development
SPS Belgium 2015 - High-trust Apps for On-Premises DevelopmentEdin Kapic
 
Spsbe15 high-trust apps for on-premises development
Spsbe15   high-trust apps for on-premises developmentSpsbe15   high-trust apps for on-premises development
Spsbe15 high-trust apps for on-premises developmentBIWUG
 
Claim Based Authentication in SharePoint 2010 for Community Day 2011
Claim Based Authentication in SharePoint 2010 for Community Day 2011Claim Based Authentication in SharePoint 2010 for Community Day 2011
Claim Based Authentication in SharePoint 2010 for Community Day 2011Joris Poelmans
 
MongoDB World 2019: Securing Application Data from Day One
MongoDB World 2019: Securing Application Data from Day OneMongoDB World 2019: Securing Application Data from Day One
MongoDB World 2019: Securing Application Data from Day OneMongoDB
 
SPTECHCON - Who are You and What Do You Want - Working with OAuth in SharePoi...
SPTECHCON - Who are You and What Do You Want - Working with OAuth in SharePoi...SPTECHCON - Who are You and What Do You Want - Working with OAuth in SharePoi...
SPTECHCON - Who are You and What Do You Want - Working with OAuth in SharePoi...Eric Shupps
 
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.Eric Shupps
 
Understanding SharePoint Apps, authentication and authorization infrastructur...
Understanding SharePoint Apps, authentication and authorization infrastructur...Understanding SharePoint Apps, authentication and authorization infrastructur...
Understanding SharePoint Apps, authentication and authorization infrastructur...SPC Adriatics
 
e-SUAP - Security - Windows azure access control list (english version)
e-SUAP - Security - Windows azure access control list (english version)e-SUAP - Security - Windows azure access control list (english version)
e-SUAP - Security - Windows azure access control list (english version)Sabino Labarile
 
Authorization in asp
Authorization in aspAuthorization in asp
Authorization in aspOPENLANE
 
Understanding Claim based Authentication
Understanding Claim based AuthenticationUnderstanding Claim based Authentication
Understanding Claim based AuthenticationMohammad Yousri
 
Authentication Models
Authentication ModelsAuthentication Models
Authentication ModelsRaj Chanchal
 
Managing Identity and Securing Your Mobile and Web Applications with Amazon C...
Managing Identity and Securing Your Mobile and Web Applications with Amazon C...Managing Identity and Securing Your Mobile and Web Applications with Amazon C...
Managing Identity and Securing Your Mobile and Web Applications with Amazon C...Amazon Web Services
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIAmazon Web Services
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIAmazon Web Services
 
Microsoft identity manoj mittal
Microsoft identity manoj mittalMicrosoft identity manoj mittal
Microsoft identity manoj mittalManoj Mittal
 
6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase AuthPeter Friese
 

Similaire à SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud (20)

Developing custom claim providers to enable authorization in share point an...
Developing custom claim providers to enable authorization in share point   an...Developing custom claim providers to enable authorization in share point   an...
Developing custom claim providers to enable authorization in share point an...
 
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
 
SharePoint 2010 Extranets and Authentication: How will SharePoint 2010 connec...
SharePoint 2010 Extranets and Authentication: How will SharePoint 2010 connec...SharePoint 2010 Extranets and Authentication: How will SharePoint 2010 connec...
SharePoint 2010 Extranets and Authentication: How will SharePoint 2010 connec...
 
SPS Belgium 2015 - High-trust Apps for On-Premises Development
SPS Belgium 2015 -  High-trust Apps for On-Premises DevelopmentSPS Belgium 2015 -  High-trust Apps for On-Premises Development
SPS Belgium 2015 - High-trust Apps for On-Premises Development
 
Spsbe15 high-trust apps for on-premises development
Spsbe15   high-trust apps for on-premises developmentSpsbe15   high-trust apps for on-premises development
Spsbe15 high-trust apps for on-premises development
 
Claim Based Authentication in SharePoint 2010 for Community Day 2011
Claim Based Authentication in SharePoint 2010 for Community Day 2011Claim Based Authentication in SharePoint 2010 for Community Day 2011
Claim Based Authentication in SharePoint 2010 for Community Day 2011
 
Oauth
OauthOauth
Oauth
 
MongoDB World 2019: Securing Application Data from Day One
MongoDB World 2019: Securing Application Data from Day OneMongoDB World 2019: Securing Application Data from Day One
MongoDB World 2019: Securing Application Data from Day One
 
SPTECHCON - Who are You and What Do You Want - Working with OAuth in SharePoi...
SPTECHCON - Who are You and What Do You Want - Working with OAuth in SharePoi...SPTECHCON - Who are You and What Do You Want - Working with OAuth in SharePoi...
SPTECHCON - Who are You and What Do You Want - Working with OAuth in SharePoi...
 
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
Who Are You and What Do You Want? Working with OAuth in SharePoint 2013.
 
Understanding SharePoint Apps, authentication and authorization infrastructur...
Understanding SharePoint Apps, authentication and authorization infrastructur...Understanding SharePoint Apps, authentication and authorization infrastructur...
Understanding SharePoint Apps, authentication and authorization infrastructur...
 
e-SUAP - Security - Windows azure access control list (english version)
e-SUAP - Security - Windows azure access control list (english version)e-SUAP - Security - Windows azure access control list (english version)
e-SUAP - Security - Windows azure access control list (english version)
 
Authorization in asp
Authorization in aspAuthorization in asp
Authorization in asp
 
Understanding Claim based Authentication
Understanding Claim based AuthenticationUnderstanding Claim based Authentication
Understanding Claim based Authentication
 
Authentication Models
Authentication ModelsAuthentication Models
Authentication Models
 
Managing Identity and Securing Your Mobile and Web Applications with Amazon C...
Managing Identity and Securing Your Mobile and Web Applications with Amazon C...Managing Identity and Securing Your Mobile and Web Applications with Amazon C...
Managing Identity and Securing Your Mobile and Web Applications with Amazon C...
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UI
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UI
 
Microsoft identity manoj mittal
Microsoft identity manoj mittalMicrosoft identity manoj mittal
Microsoft identity manoj mittal
 
6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth6 Things You Didn't Know About Firebase Auth
6 Things You Didn't Know About Firebase Auth
 

Dernier

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneUiPathCommunity
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 
Français Patch Tuesday - Avril
Français Patch Tuesday - AvrilFrançais Patch Tuesday - Avril
Français Patch Tuesday - AvrilIvanti
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 

Dernier (20)

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyone
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 
Français Patch Tuesday - Avril
Français Patch Tuesday - AvrilFrançais Patch Tuesday - Avril
Français Patch Tuesday - Avril
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 

SharePoint 2010, Claims-Based Identity, Facebook, and the Cloud

  • 1.
  • 2.
  • 3.
  • 4. Authentication vs. Authorization  Claims Authentication in SharePoint 2010  Integrating Facebook from scratch  New SharePoint 2010 web application  Adding an Azure Access Control Service (ACS) Trusted Identity Provider (Facebook)  Going “beyond authentication” to surface Facebook data in SharePoint and vice versa
  • 5. How many of you are…  Developers?  System administrators?  IT professionals?  Others?  Integrating SharePoint 2010 with an identity provider such as Facebook will present different challenges for each role
  • 6.
  • 7. Authentication (AuthN) is the process of validating a user’s identity  SharePoint never performs authentication  If the login prompt keeps appearing, think authentication issue!  Unless it’s the dreaded loopback check!
  • 8. Authorization (AuthZ) is the process of determining the resources, features, etc. to which an authenticated user has access  If you see “Access Denied” errors, think authorization issue!
  • 9. What is a claim?  A piece of information describing a user ▪ Name ▪ Email Address ▪ Role/Group membership ▪ Age ▪ Hire Date  Whose claims do I trust, and which claims affect authorization decisions I make?
  • 10. Token  Serialized set of claims about an authenticated user, digitally signed by the token’s issuer  Identity Provider (IP)  Validates user credentials  Security Token Service (STS)  Builds, signs, and issues tokens containing claims  Relying party (RP)  Applications that makes authorization decisions based on claims (SharePoint 2010)
  • 11. Decoupling of authentication logic from authorization and personalization logic  Applications no longer need to determine who the user is, they receive claims identifying the user  Great for developers who rarely want to work with identity!  Provides a common way for applications to acquire the identity information they need about users
  • 12. 1. “I’d like to access this protected resource.” 2. “I don’t know who you are. Identity provider, authenticate him.” 3. “My user ID is Danny and my password is BaCoNbAcOn!!1.” 4. “Hi, Danny. Here is a token you can use containing attributes about you.” 5. “I’d like to access this resource; hopefully it has the proof you need to authorize me!” SharePoint 2010
  • 13. Claims Based Authentication (Tokens)  Windows Authentication: NTLM/Kerberos, Basic  Forms-Based Authentication (ASP.NET Membership provider and Role manager)  Other Trusted Identity providers (like Facebook!)  Classic Mode Authentication (“Old School”)  Windows Authentication (NTLM/Kerberos) only  Both map authenticated users to SPUser objects (security principals)
  • 14. The single biggest decision of your life!  Updated TechNet guidance:  “For new implementations of SharePoint Server 2010, you should consider we recommend claims-based authentication.” http://technet.microsoft.com/en-us/library/cc262350.aspx
  • 15. Allows users to choose how to authenticate when multiple providers are configured (Mixed Authentication)  /_login/default.aspx  Custom code opportunity  http://bit.ly/IR0eRR
  • 16. Code behind: IClaimsPrincipal claimsPrincipal = Page.User as IClaimsPrincipal; IClaimsIdentity claimsIdentity = (IClaimsIdentity) claimsPrincipal.Identity; GridView1.DataSource = claimsIdentity.Claims; Page.DataBind(); http://blogs.pointbridge.com/Blogs/nielsen_travis/Pages/Post.aspx?_ID=32
  • 18.
  • 19.  Cloud-based service that provides an easy way of authenticating and authorizing users to gain access to web applications  Includes support for Windows Live ID, Google, Yahoo, and Facebook  Also includes support for Active Directory Federation Services (AD FS) 2.0  Simple browser-based management portal  $1.99/100k transactions (free until Nov. 30!)
  • 20.  Three things must be done to add support for users to login to SharePoint via Facebook: 1. Create a Facebook application  https://developers.facebook.com/apps 2. Configure ACS for Facebook support  Permissions you will request from Facebook users  Relying Party application and Rule Group setup 3. Configure ACS as a Trusted Identity Provider in SharePoint
  • 21. No! You can integrate external identity providers with SharePoint without ACS  You have no choice if you want to use identity providers not currently supported by ACS (such as LinkedIn or Twitter)  You will need to write your own code to:  Ensure the user has logged in to the IP  Obtain claim information from the IP  Package and sign tokens (your own STS)
  • 23. Click “Create New App”  Provide Display Name and Namespace  Note App ID and App Secret values  Provide Website URL to ACS
  • 25. From the ACS management portal, add a new Identity Provider
  • 26. Enter App ID and App Secret values from Facebook application you created earlier  Enter a comma-delimited list of Application Permissions you want to request  https://developers.facebook.com/docs/reference/ api/permissions/  In our demo, we will request:  email,user_location,user_hometown,user_website,use r_work_history,publish_stream,user_birthday,friend s_birthday,user_education_history,user_photos,user _about_me
  • 27. Permissions you request will be displayed to the end user the first time they log in  Request the minimum subset of permissions you need  Users are more likely to reject bigger requests
  • 28. Generate Rule Group  Named set of claim rules that define which identity claims are passed from identity providers to your relying party application  SharePoint will still need to be configured to make use of these claims
  • 29. Configure Relying Party application  Provide Name, Realm, and Return URL  Return URL: Realm + /_trust
  • 30. Choose SAML 1.1 token format  Update Token lifetime to >600 seconds  Select Identity providers and Rule groups
  • 31. Generate self-signed certificate  C:Program FilesMicrosoft Office Servers14.0Tools>MakeCert.exe -r -pe -n "CN=dannyjessee.accesscontrol.wind ows.net" -sky exchange -ss my (Self-signed, exportable, subject key type “exchange,” store in “personal” certificate store)  Development only! Please use a legitimate certificate in production!
  • 32. Upload this certificate (.pfx format) as the Token Signing Certificate in ACS
  • 34. New-SPTrustedRootAuthority  Name, Certificate (self-signed .cer made earlier)  New-SPClaimTypeMapping  IncomingClaimType  IncomingClaimTypeDisplayName  LocalClaimType (or SameAsIncoming)  New-SPTrustedIdentityTokenIssuer  Name, Realm, ImportTrustCertificate  ClaimsMappings, SignInUrl, IdentifierClaim
  • 35. Running this PowerShell script will add “Facebook” to the list of Trusted Identity Providers  Eligible to be added to Claims-based web applications in Central Administration
  • 36. Before Facebook users will be authorized to access anything, we must grant them an appropriate level of permissions  Best to set a “Full Read” web application policy for users coming in from Facebook  In a public-facing scenario, you likely won’t know specific user identities to set more granular permissions  Not to mention the people picker issues!
  • 38. All claims whose OriginalIssuer is TrustedProvider:Facebook  AccessToken is the key to all user data
  • 39. Make calls to the Facebook Graph API  https://developers.facebook.com/docs/referen ce/api/  Retrieve data about the user and his/her friends  Upload photos/videos, post status messages  Data returned from Facebook in JSON format  Requests to https://graph.facebook.com/... ▪ me/feed, me/friends, me/photos, me/videos
  • 41. Code snippets in these slides are not complete  Do not include proper error checking/handling  Do not show proper impersonation of System Account where necessary  Please download the code  http://facebookwebparts.codeplex.com  Examples use the Facebook C# SDK  http://csharpsdk.org
  • 42. Returned in a claim from Facebook  A new AccessToken is issued each login  Our key to all of the data about the logged in user  Required for all calls to the Facebook Graph API  Two hour lifetime by default  To leverage this token across the site, I store it in the SPWeb.AllProperties property bag  web.AllProperties[“fbAccessToken_{loginname}”]  AllProperties required for case sensitivity
  • 43.  Change to  Initial display name for the SPUser is based on the specified IdentifierClaim  Make this friendlier – we know their name! if (SPContext.Current.Web.CurrentUser == null) { SPUser user = web.EnsureUser("i:" + claimsIdentity.Name); currentUser.Name = givenName; currentUser.Update(); }
  • 44. var client = new Facebook.FacebookClient(token); var me = (IDictionary<string, object>)client.Get("me"); JsonObject location = me["location"] as JsonObject; myLocation = (string)location["name"];  myLocation is in City, State format  Parsed and sent to Weather Underground API  http://api.wunderground.com/api/[key]/ geolookup/conditions/forecast/q/[state]/ [city].json
  • 45. var client = new Facebook.FacebookClient(token); var me = (IDictionary<string, object>)client.Get("me"); SPList lstContacts = web.Lists["Contacts"]; SPListItem item = lstContacts.Items.Add(); item["First Name"] = (string)me["first_name"]; item["Last Name"] = (string)me["last_name"]; JsonArray work = me["work"] as JsonArray; // Most recent/current employer stored in work[0] JsonObject company = work[0] as JsonObject; JsonObject employer = company["employer"] as JsonObject; JsonObject position = company["position"] as JsonObject; item["Company"] = (string)employer["name"]; item["Job Title"] = (string)position["name"]; item.SystemUpdate();
  • 46. var client = new Facebook.FacebookClient(token); var me = (IDictionary<string, object>) client.Get("me/friends?fields=name,birthday"); JsonArray friendData = me["data"] as JsonArray; foreach (JsonObject friend in friendData) { if (friend.ContainsKey("birthday")) { /* Some users share MM/DD of birthday, others share MM/DD/YYYY We only care about MM/DD for our purposes, and Facebook always pads with leading zeros */ string birthday = (string)friend["birthday"]; birthMonth = int.Parse(birthday.Substring(0, 2)); birthDate = int.Parse(birthday.Substring(3, 2)); ...
  • 47. SPList lstCalendar = web.Lists["Calendar"]; SPListItem birthdayItem = lstCalendar.Items.Add(); birthdayItem["Title"] = name + (name.EndsWith("s") ? "' birthday" : "'s birthday"); birthdayItem["EventDate"] = dtBirthday; birthdayItem[SPBuiltInFieldId.Duration] = 60 * 60 * 24; birthdayItem[SPBuiltInFieldId.EventType] = 1; birthdayItem[SPBuiltInFieldId.fRecurrence] = true; birthdayItem[SPBuiltInFieldId.fAllDayEvent] = true; string recurrence = "<recurrence><rule><firstDayOfWeek>su</firstDayOfWeek>" + "<repeat><yearly yearFrequency='1' month='" + birthMonth.ToString() + "' day='" + birthDate.ToString() + "' /></repeat>" + "<windowEnd>2014-01-01T00:00:00Z</windowEnd></rule></recurrence>"; birthdayItem["RecurrenceData"] = recurrence; birthdayItem.SystemUpdate();
  • 48. var client = new Facebook.FacebookClient(token); Dictionary<string, object> dict = new Dictionary<string, object> { { "title", "I know how to post videos to Facebook...from SharePoint!" }, { "description", "See more at SPS Cincinnati October 27, 2012!" }, { "vid1", new FacebookMediaObject { ContentType = "video/x-flv", FileName = "facebook.flv" }.SetValue(File.ReadAllBytes(@"C:facebook.flv")) } }; client.PostAsync("me/videos", dict);
  • 49. var client = new Facebook.FacebookClient(token); Dictionary<string, object> dict = new Dictionary<string, object>(); dict.Add("message", "Yay for Claims-Based Identity, Facebook, SharePoint, and Bacon!"); dict.Add("link", "http://sharepointsaturday.org/cincinnati"); dict.Add("picture", "http://www.sharepointsaturday.org/cincinnati/SiteImages/Sca rePointSpookinnati.jpg"); dict.Add("name", "SharePoint Saturday Cincinnati"); dict.Add("caption", "October 27, 2012"); dict.Add("description", "Come see my presentation about Claims-Based Identity in SharePoint 2010 at SPS Cincinnati!"); client.PostAsync("me/feed", dict);
  • 50. Ensure “Allow users to edit values for this property” flag is set SPServiceContext sc = SPServiceContext.GetContext(site); UserProfileManager userProfileMangager = new UserProfileManager(sc); UserProfile profile = userProfileMangager.GetUserProfile(true); profile[PropertyConstants.StatusNotes].Value = txtStatus.Text; profile.Commit();
  • 51. Silverlight application courtesy MossLover  Interfaces with the user’s webcam, saves captured images to document library
  • 52. Added event handler to upload to Facebook string contentType = "image/jpeg"; var client = new Facebook.FacebookClient(fbAccessToken); Dictionary<string, object> dict = new Dictionary<string, object> { { "message", "Uploaded picture from Silverlight webcam image capture in SharePoint!" }, { "pic1", new FacebookMediaObject { ContentType = contentType, FileName = properties.ListItem.File.Name }.SetValue(properties.ListItem.File.OpenBinary()) } }; client.PostAsync("me/photos", dict);

Notes de l'éditeur

  1. This is all admin/IT pro stuff…
  2. Liam Cleary makes a good point about how anonymous access is one case where Authorization precedes Authentication.
  3. Liam Cleary’s analogy of drivers licenses and vehicle registrations; police officers. HTTP 302 redirects. Can verify this with Fiddler.
  4. Claims opens up all the doors to you…FBA, Trusted Identity Providers (external-outside world)
  5. Can always go from Classic to Claims, can’t go back!!!
  6. Go to Central Administration and provision a simple new web application using Claims. Log in with an NTLM-based domain account.
  7. This is all admin/IT pro stuff…
  8. Here is where the devs get to do cool stuff!