Security Checks
Context
Face Liveness Lite protects the liveness result with two independent layers of checks:
On the device, before and during the capture
Yes, with enableSecurity
didFinishWithError(type: .securityException, description:), with no signedResponse
On the liveness servers, while the capture is processed
No
didFinishWithFailure(type:description:signedResponse:), with a signedResponse
Both layers are part of every capture. The Certta device checks can be turned off with enableSecurity. The liveness checks cannot be turned off from the app.
Certta Device Checks
The SDK checks the device and the app environment to make sure the result was not tampered with. If the environment looks compromised, the SDK stops and returns an error instead of a result.
What is checked
Device integrity
A jailbroken device
Instrumentation and hooking
Tools that inject code into the app or intercept its calls
Debugging
Debugging tools attached to the app
App and SDK integrity
A modified or re-signed app binary, or a patched SDK
Any finding blocks the capture. There is no severity level that is allowed to continue.
How it works
prewarm() does not run the device checks. They always run when startSDK is called, whether or not the session was prewarmed.
The result is not saved on the device. Every startSDK call runs the checks again, so the same environment returns the same result until the condition that triggered it goes away.
Configuration
enableSecurity is set in the constructor and defaults to true:
Scenario
enableSecurity
Effect
Production
true (recommended)
The device checks run and securityException can be returned
Manual QA and acceptance testing
true (recommended)
Same behavior as production, so tests reflect what users get
Automated UI tests
false
The device checks do not run, so test tooling cannot interrupt the run
Any build with enableSecurity: false
false
securityException is never returned
The environment passed to setup (.dev, .beta or .prod) does not change the device checks. Only enableSecurity does.
When a threat is found
The SDK calls didFinishWithError(type: .securityException, description:). No capture is assessed and no signedResponse is returned.
The description is technical text meant for your logs. Do not parse it or show it to the user. If you need help with a case, share it with Certta support as-is.
Retrying in the same environment returns the same error until the condition that triggered it goes away. For the recommended message and what to do, see securityException.
Liveness Checks
The capture is processed by the liveness service, which runs its own checks against presentation attacks, such as photos, screens or masks, and against digital injection attacks, such as manipulated video streams or a tampered app. These checks run on the server, so they cannot be bypassed on the device.
When these checks do not pass, the capture is still processed and the SDK calls didFinishWithFailure(type:description:signedResponse:) with a signedResponse. Validate it on your backend like any other result.
Feedback codes
When a capture does not pass, the SDK delivers the most likely reason as the type of didFinishWithFailure, a CafFailureType value. A code the SDK does not recognize is returned as unknown. The full list is in Result Reference.
Feedback codes are guidance for the next attempt, not a description of what was detected. Device-related feedback is deliberately general: describing which signals are assessed would help attackers adapt.
For the recommended message for each type, including motionIssue and deviceIssue, see Failure Reasons and User Guidance.
Errors during the capture
When the capture cannot be completed, the SDK calls didFinishWithError(type:description:). See Error Handling for what each type means and what to do.
Liveness environments
The liveness checks run in the environment configured for your account. That environment is set up by Certta. If you need a different setup for testing, contact your Certta account team.
Testing Your Integration
Test on a physical device. The iOS Simulator cannot run the capture.
Keep
enableSecurity = truein manual QA. Set it tofalseonly for automated UI tests.The liveness checks run on every capture, whatever the build type or the value of
enableSecurity.To reproduce what your users get, test with a build distributed the same way as production, such as TestFlight or the App Store.
If test captures keep returning
deviceIssue, send thesignedResponseof each attempt, with the date and time, to your Certta account team.
Last updated

