+ All Categories
Home > Technology > SharePoint 2013 with ADFS

SharePoint 2013 with ADFS

Date post: 06-Dec-2014
Category:
Upload: thomas-vochten
View: 1,795 times
Download: 5 times
Share this document with a friend
Description:
My session material on using ADFS together with SharePoint 2013 at the SharePoint Saturday Stockholm 2014
55
SharePoint 2013 with ADFS #SPSSTHLM02 Thomas Vochten January 25 th , 2014 SharePoint Saturday Stockholm
Transcript
Page 1: SharePoint 2013 with ADFS

SharePoint 2013 with ADFS

#SPSSTHLM02Thomas VochtenJanuary 25th, 2014

SharePoint Saturday

Stockholm

Page 2: SharePoint 2013 with ADFS

Thanks to our sponsors!

SharePint

Silver

Bronze

Raffle

Platinum

Gold

Page 3: SharePoint 2013 with ADFS

About me Thomas VochtenSharePoint Server MVP

Involuntary DBA

Platform Architect

@thomasvochten

http://thomasvochten.com

Page 4: SharePoint 2013 with ADFS

Agenda Claims based identity

ADFS and SharePoint together

Setting up & Configuring

Challenges

Page 5: SharePoint 2013 with ADFS

Claims based identity in a nutshell

Page 6: SharePoint 2013 with ADFS

Claims based identity

Page 7: SharePoint 2013 with ADFS

Claims based identity

Page 8: SharePoint 2013 with ADFS

Claims based identity

• Not a new concept• Claims provide abstraction• Authentication versus Authorization

Authorization decisions are based on claims

Page 9: SharePoint 2013 with ADFS

Some claims examples• Your name• Your email address• Your social security number• Your memberships• Your user account• Your booking reference• Your employment status• …

Page 10: SharePoint 2013 with ADFS

Authorization based on tokens

Classic Mode Authentication Claims Mode Authentication

Windows Token Claims Token

Default in SharePoint 2013

Default in SharePoint 2007, 2010

Page 11: SharePoint 2013 with ADFS

Claims Token

Claim

Claim

Claim

Claim

Signature

Name

Age

Location

Token

Page 12: SharePoint 2013 with ADFS

Vocabulary• Claim• Security Token• Identity Provider (IdP)• Relying Party (RP)• Security Token Service (STS)• Realm

Page 13: SharePoint 2013 with ADFS

Claims in SharePoint 2013

3 types of claim providers

• Windows• Trusted Provider (SAML)• Forms Based Authn

Multiple Authn providers possible in the same zoneClassic mode only via PowerShell

ADF

S

Page 14: SharePoint 2013 with ADFS

Identity Normalization

NT TokenWindows Identity

ASP.Net (FBA)LDAP, Custom

SAML TokenLiveID, ADFS,

Others

Anonymous User

SAML TokenClaims Based

Identity

SPUser

Page 15: SharePoint 2013 with ADFS

Windows Claims• NTLM or Kerberos are not dead• Single sign on in a domain environment• Used by SharePoint internally• Claims to Windows Token Service (c2wts)

Page 16: SharePoint 2013 with ADFS

Trusted Provider Claims• SharePoint as relying party• Needs an external identity provider such as ADFS• Based on open standards (SAML, WS-*)• Login experience: browser redirects

Page 17: SharePoint 2013 with ADFS

Identity Provider (IP)

ActiveDirectory

Security Token Service (STS)

User / Subject /Principal Requests token for AppX

Issues Security Tokencrafted for Appx

Relying party (RP)/Resource provider

Issuer IP-STS

Trusts the Security Tokenfrom the issuer

The Security TokenContains claims about the user

For example:• Name• Group membership• User Principal Name (UPN)• Email address of user• Email address of manager• Phone number• Other attribute values

Security Token “Authenticates” user to the application

ST

Signed by issuer

AppX

Authenticates user

© John Craddock

Page 18: SharePoint 2013 with ADFS

Use Cases• Cloud (what did you think)• Extranets• Mergers & acquisitions• Cross-forest authentication• Replacement for domain trusts• Advanced identity scenario’s

Federation

Single Sign On

Page 19: SharePoint 2013 with ADFS

Process token

Home realm discovery

Redirected to partner STS requesting ST for partner user

Return ST for consumption by your STS

Return new ST

YourAD FS 2.0 STS

YourClaims-aware app

ActiveDirectory

Partneruser

PartnerAD FS 2.0 STS & IP

Redirected to your STS

Authenticate

Send Token

Return cookiesand page

Browse app

Not authenticated

Redirect to your STS

ST

ST

ST

ST

App trusts STS Your STStrusts your

partner’s STS

© John Craddock

Page 20: SharePoint 2013 with ADFS

ADFS and SharePoint

Page 21: SharePoint 2013 with ADFS

Solutions on the market• CA SiteMinder• Shibolleth• Oracle Access Manager• IBM Tivoli Access Manager• Active Directory Federation Services• Custom solutions using WIF• …

Page 22: SharePoint 2013 with ADFS

Why ADFS ?• Natural candidate for SharePoint• Supports the necessary standards• Integration with Active Directory• Often used as a go-between• Powerful capabilities• Free with Windows Server license

ADFS Wiki on TechNet: http://thvo.me/adfswiki

Page 23: SharePoint 2013 with ADFS

Simplified Logon Process with ADFS User connects to SharePoint SharePoint redirects to ADFS ADFS checks username and password ADFS creates a token, signs it and puts it in a cookie ADFS redirects to SharePoint with that cookie SharePoint STS validates & extracts the claims from the token SharePoint STS creates another cookie for internal use

(FedAuth) SharePoint performs authorization User connects to the web application

Page 24: SharePoint 2013 with ADFS

Installing ADFS

Windows Server 2008 R2 ADFS 2.0 (free download)

Windows Server 2012 ADFS 2.1 (included)

Windows Server 2012 R2 ADFS 3.0 (included)

Configuration is stored in

• Windows Internal Database (standalone)• SQL Server (farm)

Install-WindowsFeature ADFS-Federation -IncludeManagementTools

Page 25: SharePoint 2013 with ADFS

Configuring ADFS

• Run the configuration wizard

• Create or join a federation service

• Specify a federation service name (URL)

Page 26: SharePoint 2013 with ADFS

Prepare ADFS for SharePoint• Export the token signing certificate• Configure SharePoint as a relying party• Configure claim rules

Page 27: SharePoint 2013 with ADFS

DemoConfigure ADFS for SharePoint

Page 28: SharePoint 2013 with ADFS

Prepare SharePoint for ADFS• Import the token signing certificate• Create a Trusted Security Token Issuer pointing

to ADFS• Configure the web application to use ADFS• Configure administrator permissions

Page 29: SharePoint 2013 with ADFS

Create the Trusted Security Token Issuer

# Import the ADFS token signing certificate to SharePoint

$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\TokenSigning.cer")New-SPTrustedRootAuthority -Name "token signing certificate" -Certificate $cert

# Define the claims type mappings

$emailClaimMap = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming

$roleClaimMap = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" -IncomingClaimTypeDisplayName "Role" -SameAsIncoming

$upnClaimMap = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn" -IncomingClaimTypeDisplayName "UPN" -SameAsIncoming

Page 30: SharePoint 2013 with ADFS

Create the Trusted Security Token Issuer

# Create the trusted identity provider

$realm = "urn:sharepoint:spssthlm"

$signInURL = "https://adfs01.lab.thvo.net/adfs/ls"

$issuer = New-SPTrustedIdentityTokenIssuer -Name "ADFS" -Description "ADFS Trusted Identity Provider" ` -Realm $realm -ImportTrustCertificate $cert ` -ClaimsMappings $emailClaimMap,$roleClaimMap,$upnClaimMap ` -SignInUrl $signInURL ` -IdentifierClaim $upnClaimMap.InputClaimType

Page 31: SharePoint 2013 with ADFS

Modify your web application• Change the web application authentication

provider

Page 32: SharePoint 2013 with ADFS

DemoConfigure SharePoint for ADFS

Page 33: SharePoint 2013 with ADFS

Challenges

Page 34: SharePoint 2013 with ADFS
Page 35: SharePoint 2013 with ADFS

People Picker• Most significant functional difference• Will resolve any claim by default

Page 36: SharePoint 2013 with ADFS

Custom Claims Provider

Implement a custom claims

provider

Page 37: SharePoint 2013 with ADFS

Custom Claims Provider• Augmentation• Name resolution

• Deployed as a full-trust solution file• Implements methods for searching in directories• Dependent on the “Microsoft SharePoint

Foundation Web Application”

https://ldapcp.codeplex.com/

Page 38: SharePoint 2013 with ADFS

Custom Claims Provider

Page 39: SharePoint 2013 with ADFS

Claims Encoding

i:0#.t|federation|thomasvochteni:0#.w|lab\thomasvochten

© Wictor Wilén

Page 40: SharePoint 2013 with ADFS

Multiple web applications• Tying multiple web applications to the same

Security Token Issuer• By default, only one realm is configured• Make sure you create a relying party in ADFS too

$ap = Get-SPTrustedIdentityTokenIssuer "ADFS"$uri = new-object System.Uri("https://spssthlm-mysites.lab.thvo.net/_trust/")$ap.ProviderRealms.Add($uri, "urn:sharepoint:spssthlm-mysites")$ap.Update()

Page 41: SharePoint 2013 with ADFS

Host Named Site Collections

Treated like a web application in ADFS:Create a relying party for every HNSC !

$ap = Get-SPTrustedIdentityTokenIssuer "ADFS"$uri = new-object System.Uri("https://www.spssthlm.se/_trust/")$ap.ProviderRealms.Add($uri, "urn:sharepoint:spssthlmpublic")$ap.Update()

Page 42: SharePoint 2013 with ADFS

Cross web application authentication• The FedAuth cookie contains only a single

domain• Cross-webapp requests are not authenticated

automatically• You have to logon to both webapps first• OOB Solution for user profile pictures:

$wa = Get-SPWebApplication https://spssthlm.lab.thvo.net$wa.CrossDomainPhotosEnabled = $true$wa.Update()

Page 43: SharePoint 2013 with ADFS

Search• Search needs Windows Authentication to crawl• Configure multiple authentication methods

(beware) or• Set up multiple zones

Page 44: SharePoint 2013 with ADFS

Cookies• Session cookies vs persistent cookies• Don’t forget the Office client• When do sessions expire? • Get-SPSecurityTokenServiceConfig

Page 45: SharePoint 2013 with ADFS

Certificates• Import the signing certificate root into

SharePoint too if needed• Import the SharePoint Root Authority certificate

into the trusted issuers on the SharePoint box

Page 46: SharePoint 2013 with ADFS

SharePoint Hosted Apps• SharePoint apps will not work for the scenario

where SharePoint is using SAML authentication and the application itself is also hosted in SharePoint.  However it WILL work if the SharePoint site is using SAML authentication and the application is hosted in Azure or provider-hosted

Page 47: SharePoint 2013 with ADFS

User Profile Service• Specify the ADFS server when configuring the

import connection• No matching between logged on user & user in

profile service• Check the “Claim User Identifier” in user profile

properties

Page 48: SharePoint 2013 with ADFS

Publishing to the internet• Federation service URL must be identical on the

intranet / internet• Use Split DNS to achieve this goal• Publish ADFS directly or via an ADFS Proxy• UAG 2010 can be a ADFS proxy too

Page 49: SharePoint 2013 with ADFS

Federation• A chain of trusted/trusting identity providers• Configure relying parties• Configure claims provider trusts• You probably want to play around with custom

claim rules here

Page 50: SharePoint 2013 with ADFS

Other tips• Choice of the unique identity claim is very

important• Home realm discovery

• Always use SSL, it doesn’t work without it• Most backend systems don’t understand SAML

claims

Page 51: SharePoint 2013 with ADFS

Useful tools• ULSViewer• Fiddler

Page 52: SharePoint 2013 with ADFS

DemoCommon issues an their solutions

Page 53: SharePoint 2013 with ADFS

Key Takeaways• Known the basics of claims based AuthN• Be aware:

- custom claims providers- multiple web apps or HNSC- cookies- user profile service

• ADFS does not only mean Active Directory• Not only for partner to partner federation

scenario’s

Page 54: SharePoint 2013 with ADFS

Q & A#spssthlm #spssthlm02@thomasvochten

Page 55: SharePoint 2013 with ADFS

...and visit our sponsors who made this day possible!

Thank you!

Please rate this session...


Recommended