Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows Server

Sharepoint 2013 : The Office JavaScript Object Model (part 3) - App Security

8/17/2014 4:35:26 AM

App Security

When delivering any technology solution you must give special attention to the types of security measures that have been taken to keep the user’s computer safe from malicious attacks. As a developer, you need to have a good sense for what the security framework is and the freedom and constraints with which you have to work.

Figure 2 shows the security framework for Apps for Office. Your App for Office actually runs in an Internet Explorer 9 or 10 Web Control out of process from the Office client app itself, in a sandbox host process. This provides a security boundary between your app and the client application and also isolates your app if it should have performance issues. The Office client application hosts the Web Extensibility Framework Runtime, which is the broker that manages communication and monitoring between the two processes, translates the JavaScript calls to native ones, and remotely renders your App for Office in the client application’s UI as a TaskPaneApp, ContentApp, or MailApp.

FIGURE 2

image

This security framework cannot be altered. However, as the developer, you can declaratively request what level of security permissions your app for Office needs to carry out its business within the manifest file via the <Permissions> element. You should be familiar enough with the API to set the requested level of permission based on your API use. To use a part of the API that requires more permissions than you’ve requested in the manifest will result in the Office client blocking the use of that specific part of the API at runtime. This, of course, results in an error being thrown and most likely a frustrated user.

For document-based apps you can request the permission levels shown in Table 2. The table intentionally represents gradations from least-privileged permission to most-privileged permission as you move down the table, where Restricted has the least permission on the document and ReadWriteDocument has the most.

TABLE 2: Document-based Permissions

∗ Source: Office manifest’s schema reference for apps on MSDN

PERMISSION DESCRIPTION
Restricted Permission that applies to all TaskPaneApps, enables activation, and allows use of the Settings object
ReadDocument Includes the Restricted permission, and also enables the TaskPaneApp to use the API to read the document, manage bindings, and subscribe to events
ReadAllDocument Includes the Restricted and ReadDocument permissions, and also enables the TaskPaneApp to use the API to obtain a binary copy of the document
WriteDocument Includes the Restricted permission, and also enables the TaskPaneApp to use the setSelectedDataAsync API to write to the document
ReadWriteDocument Includes the ReadAllDocument and WriteDocument permissions, and also enables the TaskPaneApp to use all write APIs

Table 3 shows the MailApp permissions. Note that if your MailApp requires the ReadWriteMailbox permission, then an Exchange administrator must install the app. Apps that require this permission level cannot be installed by the user.

TABLE 3: Mailbox-based Permissions

PERMISSION DESCRIPTION
Restricted Permission that applies to all MailApps, enables the ItemIs and ItemHasKnownEntity activation rules, enables use of the RoamingSettings object, and is a subset of the app JavaScript Object Model
ReadItem Applies to the selected item, includes the Restricted permission, and enables the MailApp to use all the well-known entities and regular expression activation rules to read all properties and to write custom properties
ReadWriteMailbox Includes all the ReadItem permission and also enables the MailApp to use the makeEWSRequestAsync method to read and write all properties of any item in the user’s mailbox
Other -----------------
- SQL Server 2012 : Understanding Latches and Spinlocks (part 3) - Latching Example - With Latching
- SQL Server 2012 : Understanding Latches and Spinlocks (part 2) - Latching Example - Without Latching
- SQL Server 2012 : Understanding Latches and Spinlocks (part 1) - Latching Example
- SQL Server 2012 : Latches and Spinlocks - Symptoms (part 2) - Measuring Latch Contention, Measuring Spinlock Contention , Contention Indicators
- SQL Server 2012 : Latches and Spinlocks - Symptoms (part 1) - Recognizing Symptoms
- Integrating SharePoint 2013 with the Office Applications (part 10) - Microsoft Outlook - Lists and Libraries
- Integrating SharePoint 2013 with the Office Applications (part 9) - Microsoft InfoPath - Customizing the Document Information Panel and List Forms
- Integrating SharePoint 2013 with the Office Applications (part 8) - Microsoft InfoPath -Deploying a Form Via Central Administration, Rendering a Form Using the InfoPath Form Web Part
- Integrating SharePoint 2013 with the Office Applications (part 7) - Microsoft Access - Access Services
- Integrating SharePoint 2013 with the Office Applications (part 6) - Microsoft Access
- Integrating SharePoint 2013 with the Office Applications (part 5) - Microsoft OneNote
- Integrating SharePoint 2013 with the Office Applications (part 3) - Microsoft Excel
- Integrating SharePoint 2013 with the Office Applications (part 3) - Microsoft Excel
- Integrating SharePoint 2013 with the Office Applications (part 2) - Microsoft Word - Compare Document Versions, Quick Parts
- Integrating SharePoint 2013 with the Office Applications (part 1) - Microsoft Word - Writing Blog Posts
- BizTalk 2006 : Creating More Complex Pipeline Components (part 4) - Custom Disassemblers
- BizTalk 2006 : Creating More Complex Pipeline Components (part 3) - Validating and Storing Properties in the Designer
- BizTalk 2006 : Creating More Complex Pipeline Components (part 2) - Schema Selection in VS .NET Designer
- BizTalk 2006 : Creating More Complex Pipeline Components (part 1) - Dynamically Promoting Properties and Manipulating the Message Context
- BizTalk 2006 : Custom Components (part 2) - Key BizTalk API Objects
 
 
Most view of day
- Programming Drivers for the User Mode Driver Framework - Driver Dynamic-Link Library and Exports
- Mix and Match with Old Windows and Macs : Internetworking with Windows 95, 98, and Me, Internetworking with UNIX and Linux
- Microsoft Exchange Server 2010 : Defining Email Addresses (part 2) - Email Address Policies - Changing an Existing Policy
- Microsoft Project 2010 : Setting Up a Project Budget - Assigning Accounting Codes
- Working with the User State Migration Tool (part 3) - Gathering Data by Running ScanState
- Deploying the Client for Microsoft Exchange Server 2007 : Planning Considerations and Best Practices, Preparing the Deployment
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting ActiveX Security Options
- Managing SharePoint 2010 with Windows PowerShell : Managing SharePoint 2010 Web Applications
- Sharepoint 2013 : The Office JavaScript Object Model (part 1) - Document-based Apps
- Microsoft Systems Management Server 2003 : Analysis and Troubleshooting Tools - Using SMS Service Manager
Top 10
- Windows Server 2012 : Administering Active Directory using Windows PowerShell (part 3) - Performing an advanced Active Directory administration task
- Windows Server 2012 : Administering Active Directory using Windows PowerShell (part 2) - Finding Active Directory administration cmdlets
- Windows Server 2012 : Administering Active Directory using Windows PowerShell (part 1) - Managing user accounts with Windows PowerShell
- Windows Server 2012 : Enabling advanced features using ADAC (part 3) - Creating fine-grained password policies
- Windows Server 2012 : Enabling advanced features using ADAC (part 2) - Configuring fine-grained password policies
- Windows Server 2012 : Enabling advanced features using ADAC (part 1) - Enabling and using the Active Directory Recycle Bin
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Marking a Workbook as Read-Only
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Working with Office Safe Modes
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting External Content Security Options
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting Privacy Options - Set Parental Controls for Online Research
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro