Privacy and security of our data is something that is of great importance for us. However, we should not forget that Apple - it is a large corporation that is subject to the laws and provides user data to various government agencies, as well as Google, Microsoft and other large company. In the latest update iOS 8 and OS X Yosemite introduced several positive changes regarding Privacy and security of data, which should be well received by both users and so developers.
Apple uses a unique control over the hardware component of their products, software and services to provide users with the best security model (in detail about this in iOS Security Paper. In addition, they understand and want to let users know - their business model does not provide for the use and sale of your personal information.
The company wants to expand its customer base, including children up to 13 years, so they introduced the function of Family Sharing, to ensure the security of personal data of children. they also want to expand their influence in the corporate segment, using the Secure Enclave, Device Management and other security measures.
positioning
In iOS 8 were significantly upgraded API, working with locating via Core Location. These changes relate to both developers and ordinary users.
A new type approvals "While In Use"
Now, in order to gain access to a user-defined applications must issue a new request "While [app is] In Use" location.
Allows the app to both increase and decrease the type of permit and will issue a request for confirmation as long as the user does not forbid him access. The developers will be able to redirect the user to the system configuration directly from your application, rather than to show step by step, as it was before.
Access to location monitoring
Now you will clearly see that the applications that use the type of authorization "While In Use" determine your location while working in the background - this in the case of the status bar will indicate the application name (it will be blue as when using modem mode, audio recording or during call).
For native iOS-app this will be enabled by default.
The system will inform you and control the applications that use this type of authorization, showing a warning when the application in the background try to use your location. The same warning to the user can either allow the application to use location, or deny him access.
Obligatory explanation access goals
To gain access to the location in the application must be a good reason, they must be clearly set out and presented to the user in the description, otherwise such applications will be rejected by the censors App Store.
All this is aimed at the preservation of user privacy - what they talked so much on the WWDC. Restore lost trust very difficult and there is nothing that does not negatively affect your business as a lack of confidence of users.
Technical details
As mentioned above, for use Core Location and other API, carefully add Info.plist purpose of describing line (localizable) type resolution.
Info.plist corresponding keys are as follows:
- `NSLocationAlwaysUsageDescription`
- `NSLocationWhenInUseUsageDescription`
At the Core Location Manager now has two new block method, which must be declared using the monitoring locations (startUpdatingLocation
and etc.):
- `requestAlwaysAuthorization`
- `requestWhenInUseAuthorization`
Type approval "When Is Use" does not provide access to:
- monitoring of the region
- Global Change location
- new API Visits
- initiation of tracking your location in the background
- Background App Refresh
You can refer to a new screen privacy settings in iOS, using the URL UIApplicationOpenSettingsURLString
.
Camera
Access to the camera, and is possible only with the consent of the user. From the point of view of developers, this means that now they will have to consider at what point to display a warning describing the application purposes.
Technical details
The new class is used for purposes of describing the access chamber is NSCameraUseDescription
.
Access to the camera will cause the confirmation dialog, and as long as the user does not give his consent, the application does not receive any data.
Contacts
Access to contacts has also been redesigned and now includes a situation where you need to select a single contact or to send another invitation.
This is a great innovation, because now you will have less reason to grant third-party apps access to your contacts list. It is also worth noting that the application sees only a static copy of the contact and will not receive access to all future changes (as is the case now).
Now Contacts API supports filtering the contact list. It would be useful to highlight the contacts in the list that do not contain email or any other specified condition.
It will now also be possible to request a sample of only a specific data type, because it makes no sense to show the application and phone number if he needs only email. In addition, data can be filtered even value, for example, only people with mail on @ apple.com
.
Such filtering methods are appropriate to limit access to the full information, which is obtained by the application, and to reduce clutter in inappropriate properties.
Technical details
The use of certain methods, such as ABPeoplePickerNavigationControllerDelegate
In a future release of iOS 8 are not recommended:
- `PeoplePickerNavigationController: shouldContinueAfterSelectingPerson:`
- `PeoplePickerNavigationController: shouldContinueAfterSelectingPerson: property: identifier:`
other (ABPeoplePickerNavigationController
), Will be replaced by new ones:
- `PeoplePickerNavigationController: didSelectPerson:`
- `PeoplePickerNavigationController: didSelectPerson: property`
There will also be three new properties for NSPredicates settings and filtering contacts:
- `PredicateForEnablingPerson` - determines whether a contact is to be selected or not
- `PredicateForSelectionOfPerson` - selects a specified property or a contact as a whole
- `PredicateForSelectionOfProperty` - determines which of the properties can be displayed
Children
Apple already offers for children under 13 years of Special Game Center accounts that can limit access to chat, aliases, sheringu photos and no ads. Parental control is also available, and some schools provide students with the Apple ID, which have reasonable restrictions, such as the use of data for advertising purposes.
Now, thanks to Family Sharing in iOS 8, parents will be able to create Apple ID for their children and share with them the purchased content.
The essence of the Family Sharing is as follows:
- Create family Apple ID
- Sharing all your purchases (apps, books, etc.)
- purchase request -if the child presses the "Buy", parents must confirm the request and purchase the application for them
Role in the user experience
With the function «Ask to Buy» all in-app purchases are unlimited time to confirm them as parents need to approve the purchase. This applies to all applications, so developers need to provide the purchase verification status or may prohibit the purchase, after a certain write-offs. In these cases, the lock will be displayed (as parental restrictions, and corporate).
Developers will also have to provide for a situation where access to "restricted", in addition to the fact that he was "not allowed". This means that there should not be any instructions about how to activate access, because the user may not even be right for these changes.
Role in Privacy
In terms of privacy, developers will have more children using their applications, regardless of whether they are created for them or not.
Kids app must comply with the privacy policy, and in any case do not collect any user data (Personally Identifiable Information (PII)).
The Law on the Protection of Children's Online Privacy (The Children's Online Privacy Protection Act (COPPA)) is incredibly hard on those data which fall into the category of personal (PII) and it must be borne in mind, as it limits the use of even Bluetooth.
Action COPPA applies to those applications that users can clearly be attributed to the age group under 13 years. Despite the fact that it operates in the United States, most likely, such laws will be adopted in other countries, based on it, and if your application will correspond to COPPA, they automatically have to meet, and other similar laws.
Note. The recently introduced App Bundle function (application sets) does not allow to mix in conventional bundles applications and apps for kids. Also keep in mind that the use of Game Center and feature Ask to Buy, make applications incompatible with the requirements of COPPA.
Recommendations on apps for kids
Do not collect any user data, and avoid the following:
- logins
- Location, Contacts, Photos, Bluetooth, microphone, camera, HealthKit, Social,
- Push-notifications
Turn off features and functions based on age:
- Reading age and its safe storage (iCloud) allowed
- The application must be applied by users under the age of 13 years, or it will be rejected in the App Store
Confirmation of consent from their parents:
- Consult with a lawyer
- Use as an age limit request email parents, in which they can fill out the necessary documents
- Parents should be able to view and delete personal information (PII)
- Parents should be able to stop the collection of personal data
- If personal data are no longer used, they should be removed
In conclusion to this section. Provide your application for children, to the lawyers, it's a good idea. Do not forget that in many countries the legal age is considered to be a different age, so it is useful to adjust the age limit to the App Store a particular country.
Safari
Safari for iOS and OS X have also received some updates privacy settings. For example, are now automatically redirected to the App Store from advertising banners can not be without the user's consent.
Cookies lock for inactive sites
This means that if you open a website foo.com
, Access to read and write Cookies will only be at it. Any other sites that are inserted through the iframe or link to it, will not have access even to their own Cookies.
Improvements Keychain
Safari is now supported for new values avtozapoleniya (username
, current-password
, new-password
) To better understand the requirements of forms in different situations.
To better understand the registration, login, or change the password, Safari knows when to offer strong passwords and when to update saved. Thus, they will be available to all user devices, and it is a fine balance between security and convenience.
In iOS 8 native applications will have access to the credentials of sites that are stored in the keychain. Therefore, applications such as Vimeo, will be able to completely dispense with the account, if the user zaloginivalsya on Vimeo site through a browser that supports a bunch of keys.
In order to initiate a confirmation dialog for the use of keys stored in bundles accounting data, the application must necessarily be a function of "Domain Pairing" and it should be declared as described below.
It works in both directions, that is, if the user first installs the application and enter your account - accounting data will be stored in Keychain and later, when he will be input via the browser - re-entry is not required.
Technical details
Here are some guidelines for the declaration of intentions in your forms:
- Register - `username` and` new-password`
- Login - `username` and` current-password`
- Change Password - `username` (read-only),` current-password` and `new-password`
Domain Pairing
Applications can receive credentials in the keychain is only for those sites to which they have been granted access. Summarize:
1. for applications Vimeo
declared access vimeo.com
2. iOS schitytyvaet and checks the encrypted file vimeo.com
3. The file should contain the application ID Vimeo
For more information about how to encrypt the file, to request credentials from your application and other details, see Session # 506 WWDC 2014Titled "Your App, Your Website, and Safari"
Authentication and Keychain
Bunch of keys - a specialized database for the storage and use of confidential information in iOS and OS X. Apple has made it even safer to iOS, combining with the Secure Enclave - protected from unauthorized access cryptographic coprocessor which contains unique for each device encryption keys that are unchanged and unknown even the Apple (Only available on the iPhone 5S / iPad Air / Mini with Touch ID).
Bunch of keys
bunch of keys makes data synchronization between devices is really convenient and easy:
- App Groups provides a more flexible exchange between applications of one and the same developer
- simple exchange between the application and extension - widgets, social networks do not require authentication separately from the application with which they are associated
However, sometimes security is more important than convenience. Currently Bunch of keys to prevent copying of credentials from your device and they will not be included in the backup. Now this is also added the following:
- to access the data, the user will have to give their confirmation.
- used to confirm the Touch ID, with the ability to enter the device password.
- credentials will not be available if the password for the device will be disabled.
The safest scenario would require a data mark is used exclusively on the device and available only through authentication Touch ID. In addition, access to them should be discontinued as soon as the device is turned off password.
And do not forget - you can store in the Keychain any text, not just the login and password. Apple uses, between devices is to synchronize the Wi-Fi key needed to connect to the network. For example, if you connect to a secure wireless network with the MacBook you, after a few seconds (once held Sync) you can connect to it from your iPhone, save time entering complicated passwords with a mobile keyboard device.
Touch ID
Now you can use Touch ID, to provide access only to the owner of the device.
Using Keychain in this case is not necessary and it will be very useful for various banking applications to replace conventional PIN-codes, authentication using Touch ID. It's incredibly fast, convenient and more secure way to confirm the identity of the user.
The method, which replaces the input via Touch ID, you can choose at its discretion: password, sms-code or any other two-tier authentication mechanism.
HomeKit
HomeKit - a novelty in iOS 8, which should make it compatible with the Internet of Things (Internet of Things) and make their interactions easier and more convenient.
Now the problem is that devices from different manufacturers is very difficult to coordinate and organize their "Chat" with each other, because they all speak different "languages" and require different proprietary application.
It also creates an additional burden on the hardware component manufacturer that has to invest only in the creation of basic software for device management, but also in the creation and Support Click for simple applications users. But this concern for producers, consumers should not worry yet about device compatibility.
HomeKit allow you to just tell Siri: «Night mode", which will be managed (even if you are away from home) many devices from different manufacturers and Be confident in this, that all the doors are locked, the lighting in the house is off (and vice versa outside - included), the cameras begin to record what is happening, and many other of things.
All this with a single voice command, open any application without the need and regardless of the manufacturer of accessories you use.
"We do not think that the storage of your personal data on the side is a good idea. We believe that it is important to treat your personal information with the utmost seriousness. "- Kevin McLaughlin, Head of Wireless Software Engineering.
With regard to the security and your privacy, there are 4 key points:
- the data is stored only on your device
- control commands are initiated only with your device
- uses advanced encryption technology continuously
- for HomeKit-application is necessary to observe the conditions of the Privacy Policy
We take the security and privacy of users very seriously. This issue has been given much attention, took a lot of effort and time, as we do not made sure that we have the perfect solution. "- Kevin McLaughlin, head of the department Wireless Software Engineering.
All devices in the ligament HomeKit work safely, as privacy and safety are of the highest priority.
The mechanism introduced HomeKit Perfect forward secrecy, Which, though not new, but very well established. API HomeKit can not work in the background to provide additional assurance that it controls the user, rather than malicious applications.
The application can do the notification of any change of accessories (for example - the opening of the door), ensuring that the user is aware of them.
It is worth noting the fact that Apple has made identification mandatory for all team HomeKit accessories to pave a bridge between the digital and the physical world. It allows you to instruct Siri to determine, for example, a light bulb and the desired lamp blinks while.
Technical details
It would be better if you familiarize yourself with documentation, See 213th session with the WWDC 2014 at Navan «Introducing HomeKit» and visit the page, dedicated HomeKitWhich contains information for developers of applications and devices.
Here are the highlights there:
- API HomeKit can only work in the foreground-mode to ensure control by the user
- to accelerate the development process, use the built-in browser accessories
- in HomeKit mandatory delegation of techniques to ensure database integrity
- applications can subscribe to various events, such as switching particular bulb
- elements can be grouped, for example, from room to room (kitchen); zones (bottom floor); services (ceiling light) or actions (Night mode).
- Actions can be triggered manually, by schedule, adjusted to repeat, etc.
- Device incompatible with HomeKit, may be used through adapters HomeKit Bridge
- HomeKit can be extended, but the Siri only supports basic functionality
- Accessories can be accessed via Wi-Fi or BLuetooth LE
- Accessories may have the following characteristics:
- read only, for example for an outside temperature
- reading and writing, for example for adjusting the thermostat
- Only entry (mandatory for all devices), for example for identification device.
HealthKit
Another novelty iOS 8 that will bring a consistent experience, the security and confidentiality of data relating to health and fitness.
At the moment, all the data are divided and insecure stored in a variety of applications. Users Can not proper control over them after fitness app will be deleted. Now privacy is not a top priority, as data fragmentation and control them - a practice that needs to be changed. This raises concerns because such data are very valuable and are eager to take advantage of them for their own purposes insurance companies, banks and advertisers.
Just imagine what Facebook could do with behavioral information gathered Moves - an application that captures visited places and the fitness data from thousands of Android and iOS users.
While HealthKit - a secure container that is securely encrypted and stored in your pocket. He is always in your field of vision, and under your control, with built-in frontend - Health app in iOS 8.
Privacy above all
Apple understands that the trust of users, is the most valuable thing in the business, so its engineers and designers to create HealthKit paid special attention to privacy.
HealthKit constructed in such a way that applications can not distinguish between users who would prefer to hide your blood sugar levels, those who do not have this type of data in general. This makes data collection more difficult to certain categories of users, limiting the amount of information available.
Limits can be set as a data type, and for specific applications. They get the right read-only, write-only or read-write, but to change or delete data created by other applications, they can not. For example, the user can use the Health app to view the total number of calories burned for which information is collected from the different applications. In this case, each individual application will not have access to the full data set.
As described above, permits very detailed and instead of the usual warnings, HealthKit uses the list Authorization Sheet, which allows to control all the applications request access to the data, which are grouped in it for the type of permissions (Read / write).
Privacy Policy is mandatory for all HealthKit applications and should be described on the website and the app's page in the App Store, as in the case of applications for children, HomeKit and keyboards.
Health App
Health application allows the user to view more than 60 different types of data and control access to each of them (from the date of birth, until the level of potassium in the blood).
Also, this application is used to specify what information will be included in your medical record (Medical ID), which after adjustment becomes available from the lock screen (swipe to the side on the input screen password).
This is an interesting addition, since you can add to emergency telephone numbers, blood type, the status of the donation, various contraindications, and other useful information that will be available for medical personnel, without unlocking your device.
Technical details
Documentation is still quite scarce, and as I understand it, there will be no interference with your privacy.
It's nice that use HealthKit API is simple enough. It can help you easily identify the Measurement units, convert them to use statistics, storage and retrieval.
units and their transformation
Basic and complex units are defined class HKUnit
.
Base units are classified into types, such as weight (HKUnit.gramUnit ()
), Length (HKUnit.meterUnit ()
), Energy (HKUnit.jouleUnit ()
), temperature (HKUnit.degreeCelsiusUnit ()
).
Integrated units such as grams per deciliter, can be specified using the class formats, i.e. g / dL
.
HKQuantity (unit: HKUnit.meterUnit (), doubleValue: 1.79)
The number is set by and Unit Value, as defined above.
Compatibility amount of conversion can be checked through meterQuantity.isCompatibleWithUnit (HKUnit.secondUnit ()
.
Localization
New media format units (NSMassFormatter, NSLengthFormatter, NSEnergyFormatter
) Machined Parts localization for you.
For example, NSMassFormatter.forPersonMassUse = YES
automatically translate into a lot of Stone and pounds for the UK and the US, leaving kilograms for the rest of the world.
Data storage
All your data is stored in HealthKit Store (HKHealthStore
) And are subclasses of immutable HKObject
. The main class offers a way to store metadata catalogs and sources, which are inherited by subclasses HKSample
and HKCorrelation
.
correlation (HKCorrelation
) Objects - a set of common, inter-related metadata that alone does not make sense (for example, a single beat of the heart).
Objects can have a category (permanent, such as date of birth) or quantitative type (change over time, such as steps, potassium, etc.).
These may be specifically mentioned, for example, "Body Temperature in degrees Fahrenheit with ear thermometer Braun Serial number # 1234. Collect values from 98.8 to sample, since 10:00:00 AM until 10:00:10 AM ».
This metadata could allow you to isolate data from defective or less accurate devices, based on their serial number.
Note. HealthKit automatically handles the situation where the same data (e.g., number of steps) come from several sources. Without deduplication, this scenario would lead to duplication and inflates.
Retrieving data
HealthKit facilitates requests and tracking changes in large data sets. It ochespechivaetsya using HKQuery
and HKObserverQuery
to track changes, as well as HKAnchoredObjectQuery
Which is important for the numbering of pages in the results list.
HKObject
may have rich possibilities to distinguish data coming from a specific device using, for example, serial number.
Statistics
class HKStatistics
It helps with the collection of average, minimum, maximum performance, summing or splitting them according to different sources.
more advanced HKStatisticsCollection
and HKStatisticsCollectionQuery
, Allow you to define the range of time intervals templates and other more in-depth analysis.
CloudKit
CloudKit - Apple backend service that resembles the Facebook Parse, but he is responsible for accounts and data transmission, providing all the calculations the device and without identifying the person users. This is perhaps the most delicate change privacy iOS.
His advantage is that he is very well integrated into Xcode, iTunes Connect, iOS and OS X. As in all Kit-frameworks, it allows developers to focus on what makes their application unique and not to think of the fundamental things that are needed to run them.
Obviously, this is a key agrgument and, at the same time, the trade-off between security and convenience.
Privacy accounts
CloudKit does not provide applications with access to your real Apple ID or information from other applications. Instead, CloudKit creates a random user ID based on the application and It gives other applications access to your personal information held outside the container CloudKit.
Note. CloudKit will create an anonymous account, read-only, and without reference to the Apple ID. Other users can access your data to share and read-only.
Theoretically, the developer of malicious software could match CloudKit anonymous identifier from the "Annex 1" persistent identifier (such as an email, Twitter, Facebook, etc.), are available in the "Annex 2" through advertising ID (Advertising ID), which will be the same for all applications with one device.
We should not forget that the user can reset or turn off the advertising identifier as its use is limited and must be justified (this pays attention to the censors in the App Store). However, such justification can be the use of iAds, besides, very few people know about it existence and that it can be disabled and enabled by default for all users older than 13 years.
Search for friends
Friend Discovery function will work as part of CloudKit. The user can specify whether to display its information in certain applications, that if you want to keep your anonymity will allow the developers of other applications. Under the information refers to a random user ID, name, and surname.
Friend Discovery works without opening the personal information (PII), such as email, applications. Search conformity perform CloudKit servers that are responsible for the data, so applications and third-party developers are not involved in this process.
Optionally, CloudKit can perform a search on the provided email users. In this implementation of the process is encrypted, it is executed on a server (not on the device) and the data is sent over a secure connection.
Note. Two-tier iCloud authentication is not required, so the majority of accounts are protected by the usual password. This is used by the attackers and will do it again and again, because the accounts contain more and more information.
Security and data privacy
Each application has access to one or more containers CloudKit-owned property.
The containers have two databases, one of which is general, and the other private. Entries contained therein, or may be structured in the form of arrays and like Core Data, do not affect parts.
By default, shared records can be read by any user created - an authenticated user, and changed - only their own.
Unauthenticated users (do not have iCloud account) may be granted the right to read, but they will never be able to create or write to any private or in the general database.
The application can gain access to private databases, belonging only to the current user.
To prevent phishing, user accounts managed by CloudKit. Private database may contain records only one user in common - the ability to store multiple user accounts. Get access to common databases, you can use an anonymous ID.
Technical details
CloudKit used by Apple to create a new iCloud-application and, above all, is a technology transmission and is not intended for permanent data storage, so that the Core Data and other local solutions remain force.
quotas
The use of quotas for public and common databases to manage users and developers, soovtvetstvenno.
Control
iCloud Dashboard It allows developers to manage existing iCloud-containers, create new ones, through the Developer Dashboard, using the application ID (App ID).
recording
Entries CloudKit (CKRecords
) Have the same properties as the plist, plus CLLocation
, Which allows queries positioning, as well as CKReference
and CKAsset
. They will be automatically generated in the process of development.
recording area
recording area to group records. CKAssets
collects obsolete data using CLoudKit and supports delta apload, including other stages, like Core Data, which will also be deleted.
subscription
Applications can be notified of changes through the entries CloudKit APNS. Access to push-notifications (which are different from the custom notifications) have applications now have a default.
More information on this topic can be found in the WWDC sessions #208 and #231.
(via)