SlideShare a Scribd company logo
Synapse india Reviews on Security for the SharePoint 
Developer 
Security for the SharePoint Developer
Overview 
What does security refer to? 
Code access security 
User authentication 
User authorization 
Changes in SP2 for WSS and SPS 
The SharePoint authorization model 
Robust authentication code
Why worry about security? 
Why worry about security? If the code or the user 
cannot do something, there will be an exception. 
Cryptic or vague error messages lead to more 
helpdesk calls. 
Bad way to do things, especially with a multi-step 
process. Can lead to data loss or inconsistent 
data. 
Don’t show options users don’t have rights to.
Types of security 
Code Access Security 
Security for executing code 
User security – comes in two flavors 
Authentication – proving that a user is who he/she 
says he/she is 
Actual credentials 
Mapping credentials – think SSO 
Authorization – making sure that a user has 
access to the resources he/she should and 
nothing else
Code Access Security 
Why have CAS? 
ASP.Net and SharePoint allow administrators to 
install black-box software that run in process with 
other components 
Lack of CAS would allow unproven code to 
access any resource on the network without 
administrator knowledge 
One component could access private fields, 
properties, and methods from another component
Working with Code Access Security 
SharePoint trust modes affect what resources 
assemblies can access 
Use demand statements to check for code 
permissions before collecting data from users or 
beginning implicit transactions 
Provide administrators with informative error 
messages to configure systems to give your code 
correct access security
User Authentication 
Accessing remote resources with Default 
Credentials - the double hop 
Pre SP2 this may fail 
SP2 supports Kerberos 
Can’t rely on a Kerberos enabled site 
Steps to enable Kerberos on a site
User Authentication Issues 
What happens when users authenticate with PKI 
certificates? 
Remote web resources cannot be accessed using 
Default Credentials 
The remote web request does not have access to 
the private key that was used to authenticate to 
the portal site 
Server side code (ASPX pages and web parts) 
can detect PKI certificates and make alternate 
access provisions
Changes with WSS and SPS SP2 
Strongly signed assemblies must be in the GAC 
The error SharePoint reports is “The assembly is not registered as 
safe” 
This is a requirement even if the site is configured to run in Full 
trust mode 
Kerberos is now a selectable security mode for IIS sites 
Allows default credentials to work properly in web parts and 
ASP.Net applications that access remote resources
The SharePoint authorization model 
Authorization is stored at three levels –Area, Site, 
List 
Any object (area, site, list) may contain a 
reference to another object for authorization 
inheritance 
The SiteData web service returns a 
_sWebMetadata structure that contains the ACLs 
list for sites and areas
The _sWebMetadata structure 
Relevant items: 
InheritedSecurity 
The Permissions member will contain a URL to 
the site or area from which permissions are 
inherited 
Permissions 
If InheritedSecurity is false, an XML document 
that contains the site groups and Windows users 
and groups with authorizations to the site or area, 
as well as their permissions
Permissions XML 
<?xml version="1.0" encoding="utf-8" ?> 
<GetPermissionCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/"> 
<Permissions> 
<Permission MemberID="1073741829" Mask="-1" MemberIsUser="False" MemberGlobal="False" 
RoleName="Administrator" /> 
<Permission MemberID="1073741828" Mask="1029638927" MemberIsUser="False" MemberGlobal="False" 
RoleName="Web Designer" /> 
<Permission MemberID="1073741827" Mask="1027801615" MemberIsUser="False" MemberGlobal="False" 
RoleName="Contributor" /> 
<Permission MemberID="1073741826" Mask="138608641" MemberIsUser="False" MemberGlobal="False" 
RoleName="Reader" /> 
<Permission MemberID="1073741825" Mask="134283264" MemberIsUser="False" MemberGlobal="False" 
RoleName="Guest" /> 
</Permissions> 
</GetPermissionCollection>
Parsing the Permission XML 
MemberIsUser indicates whether the Permission element is a role, or a 
Windows user or group 
Mask is a bit mask that corresponds to values in the SPRights enumeration. 
Example: To check for AddListItems (0x00000002) permission, use: 
(Mask & 0x00000002) == 0x00000002 
For Windows users or groups, the Permission element may contain these 
attributes: 
IsDomainGroup, IsSiteAdmin, LoginName, Name, SID, UserLogin 
If the Permission element is not a Role but the IsDomainGroup attribute is not 
present, we can look up the user information by using: 
UserGroupService.GetUserInfo(permission.UserLogin) 
If the Permission element is a Role, we can resolve the user membership for 
role by using: 
UserGroupService.GetUserCollectionFromRole(perm.RoleName)
Get All User Collection From Web sample return 
<?xml version="1.0" encoding="utf-8" ?> 
<GetAllUserCollectionFromWeb 
xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/"> 
<Users> 
<User ID="1" Sid="S-1-5-21-1935655697-287218729-682003330-1934" 
Name="Eugene Rosenfeld" 
LoginName=“meanweselerosen03" Email=“erosen03@hotmail.com" Notes="" 
IsSiteAdmin="True" 
IsDomainGroup="False" /> 
</Users> 
</GetAllUserCollectionFromWeb>
Robust Authentication Code 
Request use SP 2 Kerberos so default credentials can be 
passed to remote resources 
Support multiple authentication models to access remote 
resources 
Encapsulate login process in code 
Passing default credentials 
Using SSO to map credentials when site is not running in Kerberos 
or when user is authenticating with PKI – Storing credentials as 
web part properties is not secure!

More Related Content

PPTX
Secure Code Warrior - Trust no input
PPTX
Secure Code Warrior - Cross site scripting
PPTX
Secure Code Warrior - Remote file inclusion
PPTX
SharePoint 2013 and ADFS
PPTX
Secure Code Warrior - Os command injection
PPTX
CoLabora March 2022 - Improve security posture by implementing new Azure AD ...
PPTX
Introduction to OAuth2
PDF
Colabora.dk - Azure PTA vs ADFS vs Desktop SSO
Secure Code Warrior - Trust no input
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Remote file inclusion
SharePoint 2013 and ADFS
Secure Code Warrior - Os command injection
CoLabora March 2022 - Improve security posture by implementing new Azure AD ...
Introduction to OAuth2
Colabora.dk - Azure PTA vs ADFS vs Desktop SSO

What's hot (20)

PPT
Silicon Valley Code Camp 2009: OAuth: What, Why and How
PPTX
Authentication and Authorization in Asp.Net
PPTX
Presentation
PPTX
Secure Code Warrior - Secure by default
PPTX
The Who, What, Why and How of Active Directory Federation Services (AD FS)
PPT
O auth 2
PDF
Difference between authentication and authorization in asp.net
PPTX
Android app security
PDF
PPTX
Identity Management in SharePoint 2013
PPTX
Microsoft Azure Identity and O365
PPTX
Asp.net membership anduserroles_ppt
PPTX
O auth2 with angular js
PPT
Fast and Free SSO: A Survey of Open-Source Solutions to Single Sign-on
PPTX
IAM Password
PPTX
Dell Password Manager Introduction
PPTX
IdP, SAML, OAuth
PDF
Stateless Auth using OAUTH2 & JWT
PPTX
Share point 2013 add-in (formerly app) development
PPTX
Saml vs Oauth : Which one should I use?
Silicon Valley Code Camp 2009: OAuth: What, Why and How
Authentication and Authorization in Asp.Net
Presentation
Secure Code Warrior - Secure by default
The Who, What, Why and How of Active Directory Federation Services (AD FS)
O auth 2
Difference between authentication and authorization in asp.net
Android app security
Identity Management in SharePoint 2013
Microsoft Azure Identity and O365
Asp.net membership anduserroles_ppt
O auth2 with angular js
Fast and Free SSO: A Survey of Open-Source Solutions to Single Sign-on
IAM Password
Dell Password Manager Introduction
IdP, SAML, OAuth
Stateless Auth using OAUTH2 & JWT
Share point 2013 add-in (formerly app) development
Saml vs Oauth : Which one should I use?
Ad

Similar to Synapse india reviews on security for the share point developer (20)

PPT
Bh Win 03 Rileybollefer
PDF
Keeping Pace with OAuth’s Evolving Security Practices.pdf
PPT
ASP.NET 13 - Security
DOCX
Authorization in asp
PDF
Hacking identity: A Pen Tester's Guide to IAM
PPTX
Design Practices for a Secure Azure Solution
PDF
Vm ware view manager training in hyderabad
PPT
Intro to Web Application Security
PPTX
SINGLE SIGN-ON
PPTX
Why Cant I Access The Portal
PPT
Share Point Server Security with Joel Oleson
PDF
Authentication and authorization in res tful infrastructures
PPT
Top Ten Tips For Tenacious Defense In Asp.Net
PPTX
Session management
PPTX
webapplicationattacks-101005070110-phpapp02.pptx
PDF
Web application security (eng)
PPTX
Azure AD - Password attacks - logging and protections
PPT
Novell® iChain® 2.3
PPTX
ASP.NET Lecture 5
PDF
Java Web Programming [9/9] : Web Application Security
Bh Win 03 Rileybollefer
Keeping Pace with OAuth’s Evolving Security Practices.pdf
ASP.NET 13 - Security
Authorization in asp
Hacking identity: A Pen Tester's Guide to IAM
Design Practices for a Secure Azure Solution
Vm ware view manager training in hyderabad
Intro to Web Application Security
SINGLE SIGN-ON
Why Cant I Access The Portal
Share Point Server Security with Joel Oleson
Authentication and authorization in res tful infrastructures
Top Ten Tips For Tenacious Defense In Asp.Net
Session management
webapplicationattacks-101005070110-phpapp02.pptx
Web application security (eng)
Azure AD - Password attacks - logging and protections
Novell® iChain® 2.3
ASP.NET Lecture 5
Java Web Programming [9/9] : Web Application Security
Ad

More from saritasingh19866 (20)

PPT
Synapseindia drupal intro 0
PPT
Synapseindia mobile apps cellular networks and mobile computing part1
PPT
Synapse india reviews on mobile and tablet computing
PPT
Synapse india complaints iphone or ipad application development
ODP
Synapse india reviews on cross plateform mobile apps development
PPT
Synapse india reviews on android and ios
PPT
Synapse india reviews on i phone and android os
ODP
Synapse india reviews on share point development
ODP
Synapse india reviews on gui programming in .net
ODP
Synapse india reviews on mobile application development
PPT
Synapse india reviews on android application
ODP
Synapse india reviews on asp.net mobile application
PPT
Synapse india reviews on php website development
PPT
Synapse india reviews on php and sql
PPT
Synapseindia reviews on array php
PPT
Synapseindia reviews about Basic Networking
PPT
Synapseindia revirews about networking
POT
Synapseindia reviews
PPT
Synapse india reviews abot Networking Concept
ODP
Synapse india reviews
Synapseindia drupal intro 0
Synapseindia mobile apps cellular networks and mobile computing part1
Synapse india reviews on mobile and tablet computing
Synapse india complaints iphone or ipad application development
Synapse india reviews on cross plateform mobile apps development
Synapse india reviews on android and ios
Synapse india reviews on i phone and android os
Synapse india reviews on share point development
Synapse india reviews on gui programming in .net
Synapse india reviews on mobile application development
Synapse india reviews on android application
Synapse india reviews on asp.net mobile application
Synapse india reviews on php website development
Synapse india reviews on php and sql
Synapseindia reviews on array php
Synapseindia reviews about Basic Networking
Synapseindia revirews about networking
Synapseindia reviews
Synapse india reviews abot Networking Concept
Synapse india reviews

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Insiders guide to clinical Medicine.pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
master seminar digital applications in india
Supply Chain Operations Speaking Notes -ICLT Program
Microbial disease of the cardiovascular and lymphatic systems
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
STATICS OF THE RIGID BODIES Hibbelers.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Insiders guide to clinical Medicine.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
O5-L3 Freight Transport Ops (International) V1.pdf
RMMM.pdf make it easy to upload and study
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pre independence Education in Inndia.pdf
TR - Agricultural Crops Production NC III.pdf
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Abdominal Access Techniques with Prof. Dr. R K Mishra
master seminar digital applications in india

Synapse india reviews on security for the share point developer

  • 1. Synapse india Reviews on Security for the SharePoint Developer Security for the SharePoint Developer
  • 2. Overview What does security refer to? Code access security User authentication User authorization Changes in SP2 for WSS and SPS The SharePoint authorization model Robust authentication code
  • 3. Why worry about security? Why worry about security? If the code or the user cannot do something, there will be an exception. Cryptic or vague error messages lead to more helpdesk calls. Bad way to do things, especially with a multi-step process. Can lead to data loss or inconsistent data. Don’t show options users don’t have rights to.
  • 4. Types of security Code Access Security Security for executing code User security – comes in two flavors Authentication – proving that a user is who he/she says he/she is Actual credentials Mapping credentials – think SSO Authorization – making sure that a user has access to the resources he/she should and nothing else
  • 5. Code Access Security Why have CAS? ASP.Net and SharePoint allow administrators to install black-box software that run in process with other components Lack of CAS would allow unproven code to access any resource on the network without administrator knowledge One component could access private fields, properties, and methods from another component
  • 6. Working with Code Access Security SharePoint trust modes affect what resources assemblies can access Use demand statements to check for code permissions before collecting data from users or beginning implicit transactions Provide administrators with informative error messages to configure systems to give your code correct access security
  • 7. User Authentication Accessing remote resources with Default Credentials - the double hop Pre SP2 this may fail SP2 supports Kerberos Can’t rely on a Kerberos enabled site Steps to enable Kerberos on a site
  • 8. User Authentication Issues What happens when users authenticate with PKI certificates? Remote web resources cannot be accessed using Default Credentials The remote web request does not have access to the private key that was used to authenticate to the portal site Server side code (ASPX pages and web parts) can detect PKI certificates and make alternate access provisions
  • 9. Changes with WSS and SPS SP2 Strongly signed assemblies must be in the GAC The error SharePoint reports is “The assembly is not registered as safe” This is a requirement even if the site is configured to run in Full trust mode Kerberos is now a selectable security mode for IIS sites Allows default credentials to work properly in web parts and ASP.Net applications that access remote resources
  • 10. The SharePoint authorization model Authorization is stored at three levels –Area, Site, List Any object (area, site, list) may contain a reference to another object for authorization inheritance The SiteData web service returns a _sWebMetadata structure that contains the ACLs list for sites and areas
  • 11. The _sWebMetadata structure Relevant items: InheritedSecurity The Permissions member will contain a URL to the site or area from which permissions are inherited Permissions If InheritedSecurity is false, an XML document that contains the site groups and Windows users and groups with authorizations to the site or area, as well as their permissions
  • 12. Permissions XML <?xml version="1.0" encoding="utf-8" ?> <GetPermissionCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/"> <Permissions> <Permission MemberID="1073741829" Mask="-1" MemberIsUser="False" MemberGlobal="False" RoleName="Administrator" /> <Permission MemberID="1073741828" Mask="1029638927" MemberIsUser="False" MemberGlobal="False" RoleName="Web Designer" /> <Permission MemberID="1073741827" Mask="1027801615" MemberIsUser="False" MemberGlobal="False" RoleName="Contributor" /> <Permission MemberID="1073741826" Mask="138608641" MemberIsUser="False" MemberGlobal="False" RoleName="Reader" /> <Permission MemberID="1073741825" Mask="134283264" MemberIsUser="False" MemberGlobal="False" RoleName="Guest" /> </Permissions> </GetPermissionCollection>
  • 13. Parsing the Permission XML MemberIsUser indicates whether the Permission element is a role, or a Windows user or group Mask is a bit mask that corresponds to values in the SPRights enumeration. Example: To check for AddListItems (0x00000002) permission, use: (Mask & 0x00000002) == 0x00000002 For Windows users or groups, the Permission element may contain these attributes: IsDomainGroup, IsSiteAdmin, LoginName, Name, SID, UserLogin If the Permission element is not a Role but the IsDomainGroup attribute is not present, we can look up the user information by using: UserGroupService.GetUserInfo(permission.UserLogin) If the Permission element is a Role, we can resolve the user membership for role by using: UserGroupService.GetUserCollectionFromRole(perm.RoleName)
  • 14. Get All User Collection From Web sample return <?xml version="1.0" encoding="utf-8" ?> <GetAllUserCollectionFromWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/"> <Users> <User ID="1" Sid="S-1-5-21-1935655697-287218729-682003330-1934" Name="Eugene Rosenfeld" LoginName=“meanweselerosen03" Email=“erosen03@hotmail.com" Notes="" IsSiteAdmin="True" IsDomainGroup="False" /> </Users> </GetAllUserCollectionFromWeb>
  • 15. Robust Authentication Code Request use SP 2 Kerberos so default credentials can be passed to remote resources Support multiple authentication models to access remote resources Encapsulate login process in code Passing default credentials Using SSO to map credentials when site is not running in Kerberos or when user is authenticating with PKI – Storing credentials as web part properties is not secure!