ESPC15 - Extending Authentication and Authorization

26
Extending Authentication and Authorization Edin Kapić

Transcript of ESPC15 - Extending Authentication and Authorization

Page 1: ESPC15 - Extending Authentication and Authorization

Extending Authentication and Authorization

Edin Kapić

Page 2: ESPC15 - Extending Authentication and Authorization

Edin Kapić• SharePoint Senior Architect &

Team Lead in Sogeti, Barcelona• President of SharePoint User

Group Catalonia (SUG.CAT)• Writer at Pluralsight• SharePoint Server Office

Servers and Services MVP• Tinker & geek

Email : [email protected] : @ekapic

LinkedIn : edinkapic

Page 3: ESPC15 - Extending Authentication and Authorization

Agenda• SharePoint, Authentication and Authorization• Claims• Claims-based Authentication• Claims-based Authorization• Claims Augmentation and Transformation• Claims Providers

• Federated Authentication

Page 4: ESPC15 - Extending Authentication and Authorization

SharePoint, Authentication & Authorization

SharePoint Web App

Authentication Provider

SPUser

Site Collection

Site

SPRoleAssignment

Authentication

Authorization

Page 5: ESPC15 - Extending Authentication and Authorization

SharePoint Authentication• SharePoint doesn’t authenticate by

itself

• It keeps user details in the user profile database and user information lists in each site collection

Page 6: ESPC15 - Extending Authentication and Authorization

SharePoint Authorization• Associated with principals• Authenticated users• Groups (SharePoint or AD)• Claims• App Add-in identities

Page 7: ESPC15 - Extending Authentication and Authorization

SharePoint 2013 Authentication Options• “Classic” Windows• Deprecated

• Claims-based• Windows tokens• FBA• SAML 1.1

Windows NTLM Token

Windows NTLM Token

FBA User

SAML 1.1 Token

SAML Token

SPUser

Page 8: ESPC15 - Extending Authentication and Authorization

App Add-In Authentication• Add-ins have identity and can be assigned permissions• Add-ins are principals, together with users and groups

• Add-in identity vs User identity

• Add-ins use OAuth to authenticate• Low-trust add-ins use 3-legged OAuth (with ACS broker)• High-trust add-ins use self-signed tokens

Page 9: ESPC15 - Extending Authentication and Authorization

Claims• A claim is a piece of your identity, claimed by some authority• Claims are received upon presenting credentials to a claims provider• Claims providers are trusted• Examples• Employee badge

• Name, department, clearance• Boarding passes

• Flight, seat, class, name• Paper Wristbands

• Ticket type, extra services

Page 11: ESPC15 - Extending Authentication and Authorization

SharePoint ClaimsClaim Type Claim Value Issuer Original Issuerhttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier

demo\ekapic SharePoint SharePoint

http://schemas.xmlsoap.org/ws/2008/06/identity/claims/primarysid

S-1-5-21-4067827123-213488314-8760374-513

SharePoint Windows

http://schemas.xmlsoap.org/ws/2005/05identity/claims/upn

[email protected] SharePoint Windows

http://schemas.microsoft.com/sharepoint/2009/08/claims/userid

0#.w|demo\ekapic SharePoint SecurityTokenService

Page 12: ESPC15 - Extending Authentication and Authorization

Claims Authentication• SharePoint augments and transforms the incoming claims to a

normalized claims identity• Can be done by more than one claims provider• Decouples the authentication method from the user identity

• For Windows incoming claims, there is a C2WTS (Claims to Windows Token Service) inside SharePoint 2013 to allow converting claims back into Windows identities

Page 13: ESPC15 - Extending Authentication and Authorization

Claims Authorization• Any claim can be used as a

security principal in SharePoint• Flexible alternative to security

groups• Claims can be surfaced by the

identity token service or custom claims provider in People Picker

Page 14: ESPC15 - Extending Authentication and Authorization

Claim Providers• Augment and surface the claims for People Picker• Can be generic or bound to a Trusted Identity Provider

• Inherits from SPClaimProvider abstract class

Page 15: ESPC15 - Extending Authentication and Authorization

Claims Augmentation and SurfacingDesired claim provider feature ImplementsClaims augmentation FillClaimsForEntity

SupportsEntityInformationClaims surfacing in People Picker FillSchema

FillClaimTypesFillClaimValueTypesFillEntityTypes

Claims hierarchy in People Picker left side FillHierarchySupportsHierarchy

Resolving typed claims in People Picker FillResolveSupportsResolve

Searching for claims in People Picker FillSearchSupportsSearch

Page 16: ESPC15 - Extending Authentication and Authorization

DEMO

Custom Claim Provider

Page 17: ESPC15 - Extending Authentication and Authorization

Federated Authentication• When the identity provider (IdP) is distinct from Windows (or FBA),

we have federated authentication• Third-party Secure Token Service (STS) issues a security token with

claims• This token is trusted by “clients” (Relying Parties, RP) as the STS is

trusted by them• Tokens are digitally signed

Page 18: ESPC15 - Extending Authentication and Authorization

Federated Authentication• ID cards or passports are

real-world examples of federated authentication

Page 19: ESPC15 - Extending Authentication and Authorization

Federated Identity Providers• Microsoft Active Directory Federation

Services (ADFS)• Microsoft Azure Active Directory• Thinktecture IdentityServer• Shibboleth• IBM Federated Identity Manager• ...

Page 20: ESPC15 - Extending Authentication and Authorization

Active Directory Federation Services (ADFS)• Part of Windows Server

features• Can transform AD into a

federated IdP• Doesn’t manage users

directly, but claims, identity providers and relying parties

Page 21: ESPC15 - Extending Authentication and Authorization

Azure Active Directory (AAD)• “AD and ADFS in the cloud”• Part of Azure / Office 365 offering• Underpins the most of the Office

365 / Azure hybrid architectures

Page 22: ESPC15 - Extending Authentication and Authorization

Thinktecture IdentityServer• Open-source IdP based on .NET and Windows Identity Framework• Modular architecture

Page 23: ESPC15 - Extending Authentication and Authorization

DEMO

Federated Authentication with ADFS

Page 24: ESPC15 - Extending Authentication and Authorization

Summary• Claims-based identity and authorization are the only way forward, so

make sure that you understand them well

• You can decouple user authentication from the user identity

• You can extend your user identity with additional claims

• You can get your user identity from somewhere else

Page 25: ESPC15 - Extending Authentication and Authorization

Further Reading• Steve Peschka’s blog https://samlman.wordpress.com • Kirk Evans’ blog http://blogs.msdn.com/b/kaevans/

• A Guide to Claims-Identity and Access Control https://msdn.microsoft.com/en-us/library/ff423674.aspx

Page 26: ESPC15 - Extending Authentication and Authorization

Thank you!

Tack så mycket!