Entitlements and SandBoxing


This week we have finished porting all our products to 64-bits. We also updated the App Store versions accordingly following Apple new requirements regarding Entitlements and SandBoxing. But do you actually know what Entitlements and SandBoxing are? Even if you are not a programmer it is always interesting to have a small idea about security concepts since we are talking about security.

macOS has supported Sandboxing since OS X Lion, which was released in 2011. The Mac App Store has required apps to be sandboxed since March 2012. Windows does not natively provide app sandboxing, but some apps (such as Microsoft Office programs) can be run in a sandboxed mode. Additionally, several Windows utilities allow you to run apps in a sandbox, preventing them from affecting the system or other applications.

Sandboxing restricts an application’s access to only system resources, including the file system, for which it’s explicitly given access. A sandboxed application is given a code signature to prevent tampering, and a list of system resources it’s allowed to access. This list of system resources is called its entitlements.

Sandboxing is a software management strategy that isolates applications from critical system resources and other programs. It provides an extra layer of security that prevents malware or harmful applications from negatively affecting your system.

Without sandboxing, an application may have unrestricted access to all system resources and user data on a computer. A sandboxed app on the other hand, can only access resources in its own "sandbox." An application's sandbox is a limited area of storage space and memory that contains the only resources the program requires. If a program needs to access resources or files outside the sandbox, permission must be explicitly granted by the system.

For example, when a sandboxed app is installed in macOS, a specific directory is created for that application's sandbox. The app is given unlimited read and write access to the sandboxed directory, but it is not allowed to read or write any other files on the computer's storage device unless it is authorized by the system. This access is commonly granted using the Open or Save dialog box, both of which require direct user input.

While sandboxing provides added security for users, it can also limit the capabilities of an application. For example, a sandboxed app may not allow command line input since the commands are run at a system level. Utilities such as backup programs and keyboard shortcut managers may not be granted sufficient permissions to function correctly. For this reason, some programs cannot be sandboxed.

I remember well when Apple first announced Sandboxing, originally they told Mac App Store developers that their apps would need to implement sandboxing by November 2011. Later that deadline was extended to March 2012. In February 2012, Apple extended that deadline again until June 1. But finally we entered the sandboxed era.

The plus side of sandboxing is that it means, in theory, that your apps will become safer and more trustworthy: Your Mac prevents them from accessing files they shouldn’t access. But that security comes with a price, at least in some cases. Some developers say that sandboxing will force them to remove features from their apps—or, in some cases, to pull them from the Mac App Store entirely.

We managed to sandbox the five applications we were already listing at the App Store, MaxBulk Mailer, iCash, Web Dumper, Loan Calc and FTP Disk. The user will see almost no differences, maybe the applications will sometimes ask for a file or a folder, that's all. With FTP Disk it has been a real challenge! Lots of coding in order to preserve the local file browser. Apple rejected the entitlements and the binaries several times, well, to say the true I was about to give up...

More information on Sandbox here: https://en.wikipedia.org/wiki/Sandbox_(computer_security)


Stan Busk - Software Engineer
at www.maxprog.com



Comments

Popular posts from this blog

The history of iCash and Peggy Première

iCash v3

Maxprog 16th anniversary