Start

The Security Policy of Backup Server Control

Security Architecture

When you launch Backup Server Control for the first time, it will automatically integrate into the security model of macOS. This is necessary because the application can be used to read files owned by other users or owned by the operating system. Only responsible system administrators who manage the respective computer should be allowed to perform such actions.

To guarantee a high security level, Backup Server Control works in two parts: The normal main application with the graphical user interface is coordinating all operations. It also executes all tasks that don’t require any special permissions. However, as soon as a privileged operation has to be executed, for example deleting an entire backup set of one of your computers, the application stops, makes you aware of the pending task, and checks whether the current user can identify herself as system administrator. If yes, the task will continue and the privileged operation can start.

If you only like to review the operation of your Time Machine backup server, namely just check how it is configured and how the different computers are performing their backups, no special permission will be needed, although this affects files protected by the operating system. Users who like to change operational settings or backup sets need administrative rights, however. Further details are given in the next section.

A privileged job is not executed by the main application. A second component, the so-called privileged helper does this work by receiving the request of the main application via a secure, tap-proof channel. Even if an unauthorized attacker would manage to manipulate the main program, it could not trigger any malicious functions in the computer, because it could not get permission to do that. Only the privileged component, which is monitored and specially protected by macOS has this technical capability. This means we have a separation of user rights in this setup. The privileged helper will also be called security component in this context.

In case the current user cannot identify as system administrator, the privileged operation will be rejected, denying its execution. You receive a notice in the graphical user interface that the pending task could not be continued due to security reasons.

Confirming a privileged operation

To create the aforementioned monitored link between main application and privileged component, macOS asks for permission to setup the helper program during the first start of Backup Server Control. After this special trust relationship has been established between main application and privileged component, Backup Server Control will begin to control the special permissions from there on. The following rules apply when verifying the right to execute a protected operation which could change data:

For security reasons, only those users can initiate a privileged operation in Backup Server Control for which the option Allow user to administer this computer is enabled in the account management of macOS. Such users are called administrators. This special option is the default for the user who owns the computer and has set it up.

The application cannot read your password: Neither the main application, nor its privileged component are involved in the password entry and verification of credentials. Both tasks are exclusively handled by macOS, so that your password cannot be seen by the programs. Only after macOS has checked your identity, the result will be sent to the application.

On computers with Touch ID, the confirmation can also be done by fingerprint: If your computer contains Apple’s fingerprint reader Touch ID, the verification of your identity can also be done by fingerprint. To check the pending operation, there will also be an additional short description in the Touch Bar, like that in the depicted example. As usual in macOS, you can choose whether to identify by password or by fingerprint.

On computers with Touch ID, the confirmation is also possible by fingerprint. The Touch Bar shows a notification in this case.
On computers with Touch ID, the confirmation is also possible by fingerprint. The Touch Bar shows a notification in this case.

A confirmation is valid for the pending operation, and for further operations in the next five (5) minutes: In some cases, Backup Server Control has to execute multiple privileged operations in rapid succession to achieve a certain process, for example, creating a new share point for the backup server, then configuring its detail setup. The application is designed to handle such a composite operation as single event, even if the operations are internally considered separate actions requiring different permissions. You only have to authenticate once, not twice in this example. But even operations which don’t belong together don’t necessarily lead to a renewed password entry: If a time of less than five minutes has passed between a privileged operation and your last authorization, another check of your identity will be avoided.

An authorization won’t be shared with other applications: When you have confirmed your identity to Backup Server Control to execute a privileged operation, this authorization will only be valid for the application itself, but not for other programs. This is also stricter than the usual guidelines of macOS, which would permit to avoid another password entry within five minutes for all applications running in the same login session.

The paragraphs below contain information for experienced system administrators. You can skip them during first reading.

Technical Details for Advanced Users

The security component will be installed into the folder /Library/PrivilegedHelperTools which is Apple’s recommended folder to be used for such utility programs. The name of the component is BackupServerControl-PrivilegedTool. macOS will automatically launch and quit this program as needed, avoiding to let it run as a background service for an extended period of time.

You can choose to remove the security tool at any time without any traces. In this case Backup Server Control will lose its capability to access privileged system areas, so the program will be forced to shut down either. Perform the following steps to remove the component:

  1. Launch Backup Server Control if it is not running yet.
  2. Select the menu item Configuration > Remove Security Component….
  3. Follow the instructions the program is giving. The program will quit itself as last step of this operation.

Removing outdated generations of the security component

Backup Server Control has protected many generations of the operating system with its security architecture. Because Apple has changed the guidelines and technologies for this aspect of the system many times, it can have been necessary in the past to modify the security component to use a completely new technology. Usually you won’t need to care about this. The application will notify you when an update is due and will perform all necessary steps by itself.

There can be cases however, where an updated security component is so different from its predecessor versions that it will no longer be compatible with them and cannot remove them automatically due to technical reasons. This means an outdated copy of the privileged helper could still be present in the system, even if the main application has been deleted or updated in the meanwhile. This usually doesn’t bother, because macOS only starts these programs when necessary. You may like to delete these old components however, to avoid possible misuse and to clean up your computer.

Backup Server Control offers a special maintenance feature to do this. It can search for outdated auxiliary programs and remove them if desired. Perform the following steps:

  1. Launch Backup Server Control if it is not running yet.
  2. Select the menu item Configuration > Clean old security components….

A window with a table lists all components which could still be installed from old versions of the application. Components marked by bold print are indeed still present and appear with the status removable. You can select one or more of these components and click the button Clean to delete them. If components are still in use unexpectedly, this will be automatically detected. You can only remove such helper programs after quitting their associated main applications.

Enabling stricter policies for administrator authorization

In older versions of the application, there were special cases for authorizing privileged operations where a login of a user with administrative rights was not allowed for security reasons. If desired, administrators can reinstate this previous, more restricted behavior.

Authorization in the current login session of a user who does not have administrative privileges

A user who is not currently logged in to macOS as an administrator can still perform privileged operations if they know the administrator credentials. The current login session does not need to be interrupted. If this option is not desired for security reasons, an administrator can block this by entering the following command on the affected computer:

sudo defaults write /Library/Preferences/com.bresink.system.BackupServerControl.plist MBSBlockAuthForNonAdminLogin -bool true

Fallback from local user identification to administrator authorization with name and password

To recognize users as authorized for a privileged operation, the application uses a feature of macOS known as local user authentication. macOS checks the user’s identity through a dialog window that asks for their credentials. Alternatively, it is also possible to use security hardware, e.g. reading a fingerprint via Touch ID or using a smart card.

There are special cases where macOS rejects local user authentication, considering the user as unauthorized:

In such cases, the program automatically switches to the traditional login of an administrator using name and password. If this option is not desired for security reasons, an administrator can block this by entering the following command on the affected computer:

sudo defaults write /Library/Preferences/com.bresink.system.BackupServerControl.plist MBSBlockLocalAuthFallback -bool true

Additional notes on changing security policies

Both policies mentioned above can be turned on or off independently. As a rule, the change takes effect the next time you start the application. However, there may be special operating situations in which macOS delays activation. If you want to ensure that the change takes effect in any case, it is recommended to restart the computer.

The return key may only be pressed at the end of the command, even if a command may be shown on several lines for reasons of space. After command entry, macOS will ask for the password of the currently logged-in administrator. It is entered covertly, so it does not appear on screen.

To switch the behavior back to default, the following commands can be used:

sudo defaults delete /Library/Preferences/com.bresink.system.BackupServerControl.plist MBSBlockAuthForNonAdminLogin

or respectively

sudo defaults delete /Library/Preferences/com.bresink.system.BackupServerControl.plist MBSBlockLocalAuthFallback