650 likes | 1.07k Views
Required Slide. SESSION CODE: OSP311. From N to Z: Authentication and Authorization in Microsoft SharePoint Server 2010. Rick Taylor Senior Technical Architect Perficient, Inc. Who Am I?. Who am I??? Who am I ??????????. The Guardian of Lost Souls. Rick Taylor. The Powerful.
E N D
Required Slide SESSION CODE: OSP311 From N to Z: Authentication and Authorization in Microsoft SharePoint Server 2010 Rick Taylor Senior Technical Architect Perficient, Inc.
Who Am I? • Who am I??? • Who am I ?????????? The Guardian of Lost Souls Rick Taylor The Powerful Slick Rick – if you’re nasty The Pleasurable The Indestructible
Introduction • Former Engineer with Platform Architecture Group in SharePoint Online • Contributing author on Microsoft Office SharePoint Server 2007 Administrator’s Guide • Connect w/ Rick on • Facebook • LinkedIn • Twitter • Spaces • TechNet
Agenda • Overview of Identities and Claims • What is Claims-based Identity? • A primer • Problem Spaces and Examples • Why is it important? • What does it do for me? • Why do I need it? • Upgrade Scenarios • Support Statements
Terminology • Claim • An assertion • Username • Email Address • Date of Birth • Security Token Service (STS) • A service that accepts requests and issues security tokens that contain claims • Identity Provider (IDP) • An issuer of a token • Relying Party (RP) • An application that uses Claims (Claims Aware)
Claims Primer • What is Identity? • Set of attributes to describe a user such as name, e-mail, age, group membership, etc. • Traverses the network as an array of bytes – referred to as a token • In a Claims-based scenario, the array of bytes carry Claims • What is a Claim? • Some authority that claims to have the attribute and its value
What is a Token? CLAIM = Email Address CLAIM = D.O.B CLAIM = Role TOKEN CLAIM = Given Name
Claims • Claims carry pieces of information about the user Token Name Age Location
Issuer • Tokens are issued by Security Token Service (STS) software • Identity providers can include Directory Services, Windows Live Id, etc.
Claims Primer - continued • What is the difference between a “claim” and an “attribute?” • Both Facebook & eHarmony have the age attribute • Facebook claims that I am 45, while eHarmony claims I am 29. • Authorization decisions may depend on the age attribute, your app needs to decide which “claim” you will trust. • Trust depends on scenario not on technical capability
Benefits • Applications can determine which Claims are required and which providers to trust • Provides multiple authentication scenarios on a single, unique namespace, i.e. http://sharepoint.contoso.com • Enable automatic and secure identity delegation within SharePoint • Seamless integration with external systems, i.e. Web Service calls
Problem Space • Sign-in • Retrieving identities, i.e. who are they • Services • Passing identities across boundaries, i.e. machines, Line of Business applications, etc.
Sign-in Scenarios • Sign-in to SharePoint with both Windows and LDAP directory Identity • Easily configure Intranet and Extranet users for Collaboration • Integrate with other customer identity systems (eg. ADFS, etc.) • Use Office Applications with non-Windows Authentication
Normalizing Identities Classic Claims NT TokenWindows Identity NT TokenWindows Identity SAML1.1+ADFS, etc. ASP.Net (FBA)SAL, LDAP, Custom … SAML Token Claims Based Identity SPUser
End User Experience Classic Mode
End User Experience Claims Mode
Forms-based Authentication in SharePoint Server 2010 Rick Taylor Senior Technical Architect Perficient demo…well…sorta..but not really
Claim Providers • Augmentation of Claims • Used to add application specific claims • SharePoint will authorize over these claims • Search and Resolve Claims • Provides a way to enumerate and select claims • SharePoint will present the claims in the User Experience
Office Applications • Office Client applications now support non-Integrated Windows Authentication • Office 2007 with Service Pack 2 on • Windows XP with Internet Explorer 8 • Windows Vista with Service Pack 2 or optionally with Internet Explorer 8 • Windows 7 • Office 2010 on • Windows XP with Internet Explorer 8 • Windows Vista with Service Pack 2 or optionally with Internet Explorer 8 • Windows 7
Changes to Forms-based Authentication • Forms-based Authentication users become Claims Identities • Claims identities are created as opposed to ASP.Net Generic identities • Secure Token Service calls the membership provider to validate user and issues a Claims token • ValidateUser() must be implemented by membership providers • Roles are converted to Claims and captured in the SAML token
Services Scenarios • Surface additional information about a person or object without challenge (Intranet-specific scenario) • Surface inventory information through an Enterprise portal (Extranet or Intranet-specific scenario) • Deploy secure SharePoint environments for user identity delegation
Code Snippet for Claims Viewer Web part using System; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using Microsoft.IdentityModel.Claims; namespace ClaimsViewerTest.VisualWebPart1 { public partial class VisualWebPart1UserControl : UserControl { protected void Page_Load(object sender, EventArgs e) { IClaimsPrincipal claimsPrincipal = Page.User as IClaimsPrincipal; IClaimsIdentity claimsIdentity = (IClaimsIdentity)claimsPrincipal.Identity; GridView1.DataSource = claimsIdentity.Claims; Page.DataBind(); } } }
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("c:\[name_of_cert].cer") $map1 = New-SPClaimTypeMappinghttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming$realm = "urn:" + $env:ComputerName + ":adfs"$signinurl = "https://[YOUR_SERVER_NAME]/adfs/ls/"$ap = New-SPTrustedIdentityTokenIssuer -Name "ADFS20Server" -Description "ADFS 2.0 Federated Server" -Realm $realm -ImportTrustCertificate $cert -ClaimsMappings $map1 -SignInUrl $signinurl -IdentifierClaim $map1.InputClaimType
Upgrade Scenarios • Integrated Windows will not require rework • Forms-based Authentication and WebSSO scenarios will need Claims conversion
Upgrade issues • When you upgrade from MOSS to SharePoint 2010: • Error: • “Forms Based Authentication on classic Web application has been deprecated.” • Fix: • Step 1 $w = Get-SPWebApplication "http://webappurl/"$w.UseClaimsAuthentication = $true;$w.Update()$w.ProvisionGlobally()
Upgrade Issues - Continued • Step 2 • Remove the <clear/> element from the Membership and Role provider sections in the web.config of the {SharePoint Root}\WebServices\Root • (Only occurs in upgrade, not clean)
Upgrade Issues - Continued • Naming Convention Change • aspnetsqlmembershipprovider:username IS NOW • i:0#.f|aspnetsqlmembershipprovider|username • Use PowerShell to change the names of all the users
Upgrade Issues • Any custom applications, web parts or utilities that used the SSO service in 2007 may require a rewrite or update to the code to reflect these changes to the Secure Store Service • Microsoft.Office.SecureStoreService.Serverassembly found here: C:\Program Files (x86)\MSECache\oserver2010\Global\Search\osrchwfe.cab
Other “Gotchas” Receive Error – “Root of Certificate Chain is Not Trusted Root Authority” • Must export the ADFS Token Signing Certificate • Must add the ADFS Token Signing Certificate Root Authority to List of Root Authorities in SharePoint
Standards • WS-Federation 1.1 • WS-Trust 1.4 • SAML Token 1.1