|
| 1 | +--- |
| 2 | +title: Shared Responsibility For Face Liveness Detection |
| 3 | +titleSuffix: Azure AI services |
| 4 | +description: Azure and customers share responsibility for liveness detection solutions, covering connections, client apps, devices, and abuse monitoring |
| 5 | +author: JinyuID |
| 6 | +ms.author: lijiny |
| 7 | +manager: nitinme |
| 8 | +ms.service: azure-ai-vision |
| 9 | +ms.date: 01/15/2025 |
| 10 | +--- |
| 11 | + |
| 12 | +# Shared Responsibility for Face Liveness Detection |
| 13 | + |
| 14 | +It's the shared responsibility between Azure and the customer to build a secure and compliance solution. You can learn more about Azure shared responsibility model at here: [Shared responsibility in the cloud - Microsoft Azure](/azure/security/fundamentals/shared-responsibility). Understanding the shared responsibility model is especially important for liveness detection solutions, this document covers three aspects about how to secure the solution and monitor the solution. |
| 15 | + |
| 16 | +## Secure the Connections |
| 17 | + |
| 18 | +The following diagram shows how customers work with Azure to secure the connections end to end. :::image type="content" source="media/secure-connection.png" alt-text="Azure liveness solution connection diagram"::: |
| 19 | + |
| 20 | +- Ensure the customer’s backend service acts as the orchestrator in liveness detection applications, using Azure's security infrastructure to initiate liveness detection sessions and examine the results. The customer is responsible for securing their backend service. |
| 21 | +- Implement proper authentication and authorization for the client application in the customer backend. Ensure the communication between the client application and backend service is protected from manipulation. |
| 22 | +- Authenticate the end user's real-world identity and link their account information to the liveness session. |
| 23 | +- Sign the application and distribute it only through official stores. |
| 24 | +Azure liveness detection secures the connection in following ways: |
| 25 | +- Validate all transactions using the session authorization token acquired via the session creation API. |
| 26 | +- Allow only HTTPS calls to the backend service. |
| 27 | +- Support the setup of Identity Access Management(IAM) roles for customers to authenticate and perform actions. |
| 28 | + |
| 29 | +## Secure the Client Application |
| 30 | + |
| 31 | +A sophisticated attacker could alter or tamper the client application, which could render the liveness result not trustworthy. There are different approaches depending on which platform the application use: |
| 32 | + |
| 33 | +### Mobile Applications |
| 34 | + |
| 35 | +In both Android and iOS platforms, there are native support and third party solutions to check application integrity, such as [iOS App Attest](https://developer.apple.com/documentation/devicecheck/establishing-your-app-s-integrity), and [Android Play Integrity](https://developer.android.com/google/play/integrity). It's the application developer’s responsibility to integrate the integrity check feature and respond promptly to potential hacks. |
| 36 | +Azure liveness detection implemented safeguards against untrustworthy runtime environments. Azure Liveness Detection SDK provides the digest of its liveness detection service call, which can be provided to the application integrity APIs. |
| 37 | + |
| 38 | +### Web Applications |
| 39 | + |
| 40 | +Web applications run in the context of browsers in which they're loaded. Modern browsers support robust application integrity checks. Customer is responsible for ensuring and implementing the integrity checks of the web application that gets deployed to the browsers. These responsibilities include, but aren't limited to: |
| 41 | + |
| 42 | +- Ensuring security headers are properly configured. In particular, extra attention should be paid to caching, HTTP Strict Transport Security (HSTS), iframe, and cross-origin policies. |
| 43 | +- Configuring the strictest possible Content Security Policy (CSP) for all resources. CSP helps to deny Cross-Site Scripting (XSS) attack, clickjacking, and weaknesses associated with mixed content page. |
| 44 | +- Enabling Sub-Resource Integrity (SRI) through CSP and checking to ensure that the SDK loaded is an authentic copy as published by Microsoft. |
| 45 | + |
| 46 | +Azure publishes cryptographic hashes of the Liveness Detection Web SDK alongside each version, which customer can use in their script integrity CSP header. Azure also ensures the Web SDK can run within feature restrictions of Secure Context in modern browsers. |
| 47 | + |
| 48 | +## Secure the Client Device |
| 49 | + |
| 50 | +Different applications have various security needs based on their specific use cases and scenarios. It's essential to tailor security measures to match these requirements, ranging from basic to highly stringent protocols. Here, we discuss the different levels of security necessary for different environments, ensuring comprehensive protection across all platforms. |
| 51 | +In both Android and iOS platforms, application integrity solutions (including their respective first-party offerings) already include device integrity and/or reputation. Customers who implement web applications and require their security baseline to include device integrity must take specific responsibilities. They need to ensure that the application is accessed only through a trusted modern browser on a trusted device. Typically, these responsibilities include: |
| 52 | + |
| 53 | +- Enterprise Device Management solution configured to manage the device by accessing the application |
| 54 | +- Virtual Network to silo the device communication with Azure, enforced by Device Management. |
| 55 | +- Secure Boot to ensure the hardware integrity, enforced by Device Management |
| 56 | +- Supply Chain Security for higher security baselines, can ensure that the device is already managed, and all its security policies enforced from the point of manufacture. |
| 57 | + |
| 58 | +These considerations are also applicable to Android and iOS platforms. |
| 59 | +Azure Face API supports Virtual Networks and private endpoints. Refer to the guide. |
| 60 | +Customer who considers high security baseline could reference Device Management solution such as Microsoft Defender for Endpoints. |
| 61 | + |
| 62 | +## Always Keep Up-to-date |
| 63 | + |
| 64 | +Microsoft regularly upgrades the liveness detection client SDK and service to improve security, reliability, and user convenience. Staying current with these updates is crucial because the liveness detection field faces active and sophisticated attacks. Customer should always use latest Client-side SDK, latest service, latest service model. For more details, please reference [Understanding Client-side SDK versions](/azure/ai-services/computer-vision/sdk/understand-the-liveness-sdk-versions). |
| 65 | + |
| 66 | +## Monitoring Abuse |
| 67 | + |
| 68 | +Facial recognition technology, when used for access authorization, can be a target for adversaries attempting to bypass it or the liveness detection technology. Often, these bypass attempts involve brute forcing different materials like various printed photos in front of the system, which is considered system abuse. To mitigate such brute force attacks, specific actions around retry count and rate limiting should be implemented. |
| 69 | + |
| 70 | +**Create a session with conservative call and time limits** |
| 71 | +A session serves as the frontline of defense, ensuring the liveness detection process is secure and consistent, then deterring brute force compromises. A session authorization token is generated for each session and is usable for a preset quota of recognition or liveness detection attempts. If an application user fails to succeed within the attempt limits, a new token is required. Requiring a new token allows for a reassessment of the risk associated with further retries. By setting a conservatively low number of allowed calls per session, you can reevaluate this risk more frequently before issuing a new token. |
| 72 | + |
| 73 | +**Use the appropriate correlation identifier when creating a session** |
| 74 | +Device correlation ID guides the automatic abuse monitoring heuristics within Face API to help you deny abusive traffic to your system that implements facial liveness detection. When a particular correlation identifier reaches the threshold of abusive attempts, it can no longer be used to create sessions. |
| 75 | + |
| 76 | +Generate a random GUID string and associate it with sequential attempts from the same individual primary identifier within your system. The choice of identifier or identifier set to map depends on your application needs and other parameters used to assess access risk. To allow for the regeneration of a new random GUID when necessary, avoid using your application’s primary identifier. |
| 77 | + |
| 78 | +**Design the system to support human judgment** |
| 79 | +When a device correlation ID is flagged and no more sessions can be created with the identifier, implement a meaningful human review process to ensure that failures aren't due to abusive traffic or brute forcing attempts. If after review you decide to allow more attempts from the same entity because previous failures are deemed legitimate, reset the association by generating a new random GUID mapped to the individual identifier. |
| 80 | + |
| 81 | +### Azure Support for Abuse Monitoring |
| 82 | + |
| 83 | +Azure provides the following mechanism monitoring liveness detection sessions: |
| 84 | + |
| 85 | +- Monitoring traffic across multiple sessions on same correlation ID, take response when suspicious activity monitored. |
| 86 | +- API support customers for auditing to download liveness images during the liveness session lifespan. |
| 87 | +- Azure keeps sufficient logs to further prevent repudiation attacks. |
| 88 | + |
| 89 | +## Report Abuse |
| 90 | + |
| 91 | +If Azure AI Face API doesn't detect a presentation attack instrument that you believe should be detected as spoof, [create an Azure support request](/azure/ai-services/cognitive-services-support-options?context=/azure/ai-services/computer-vision/context/context). |
| 92 | +The support request should include: |
| 93 | + |
| 94 | +- Type of spoofing material presented. |
| 95 | +- Service information returned from the service as part of the API call. At a minimum the information must include API path, request ID (apim-request-id), session ID (SID), and API model version (model version). |
| 96 | +- Specific conditions required to reproduce the attack. |
| 97 | +- Step-by-step instructions to reproduce the attack. |
| 98 | +- Exploit image or proof-of-concept image (if possible). |
| 99 | +- Description of the business impact of attack. |
| 100 | + |
| 101 | +You might attempt to recreate the attack before reporting it to Microsoft. The reproduce steps would be especially useful if you can't provide the exploited image. |
| 102 | + |
| 103 | +## Next steps |
| 104 | + |
| 105 | +[Tutorial: Detect liveness in faces](/azure/ai-services/computer-vision/tutorials/liveness) |
0 commit comments