Skip to main content
Version: Guardian v0.5.3

Device attestation setup

The native SDKs attest the device with Google Play Integrity on Android and Apple App Attest on iOS. This page covers the settings your organization controls in the Surt dashboard: how often devices attest, which Google Cloud project Android attests against, and which iOS apps App Attest accepts. None of these settings need an SDK code change or a new app release.

All settings live in one place:

  1. Log in to your Surt Dashboard.
  2. Navigate to Settings → Developer.
  3. Scroll to the Device Attestation section.

Each change takes effect when you click Save.

SettingPlatformRequired
Attestation cadenceAndroid and iOSNo. The default is Once every N days per user with 7 days
Android projectAndroidNo. Surt's shared project works out of the box
iOS appsiOSYes. App Attest only passes for the App IDs you add

Attestation cadence​

Attestation cadence sets how often a device attests:

OptionBehaviour
Once every N days per userRecommended. Type the number of days in Days (minimum 1, default 7).
Every transactionThe device attests on every transaction. This uses up the daily Play Integrity quota (10,000 per day) quickly at scale.

The interval is counted per customer, and only a clean Play Integrity verdict starts it. A verdict with risk signals, or a transaction where Google returns no verdict, does not. App Attest has no daily quota, so iOS verdicts never start the interval: a customer who only uses iOS devices attests on every transaction.

The SDK applies the cadence when your app passes a JWT. A collect() call without a JWT attests on every call. See Authentication.

Android: own Play Integrity project​

Android attests against Surt's shared Google Cloud project by default, so attestation works without any setup. Use your own project to have your own Play Integrity quota, including any quota increase you request from Google.

Before you start, in your Google Cloud project:

  • Enable the Play Integrity API.
  • Create a service account with the playintegrity.verifier role and download its JSON key.
  • Note the project number. It is digits only, for example 817986950837, not the project ID.

Then, in the Device Attestation section:

  1. Under Android project, select Your own GCP project.
  2. Fill in the fields:
    • Cloud Project Number: the project number, digits only.
    • Package Name: your app's package name, for example com.example.app.
    • Service Account JSON: click Upload file and choose the key file, or paste the key JSON.
  3. Click Save.

Surt checks the key with Google when you save. If Google rejects it, the dashboard shows an error. A common cause is a service account without the playintegrity.verifier role. Fix it and save again. The key is stored encrypted and is never shown again. Changing the project number or the package name later requires uploading the key again.

iOS: own App IDs​

App Attest only accepts keys from the iOS apps your organization registers. Until you add your App IDs, every App Attest key from your app fails validation, and iOS transactions never count as attested.

An App ID is your Apple Team ID plus the bundle ID of the app:

PartWhere to find itFormat
Team IDYour Apple Developer account, under Membership10 characters, uppercase letters and digits, for example ABCDE12345
Bundle IDXcode, in your app target's General tab, Bundle IdentifierReverse-domain identifier, for example com.example.app

In the Device Attestation section:

  1. Under iOS apps, select Your own iOS app(s).
  2. Enter the Team ID and Bundle ID of your first app.
  3. Click Add app for every other build that runs the SDK, for example your staging and production apps. You can add up to 20 App IDs, and each one must be unique.
  4. Click Save.
Production accepts only production App Attest keys

Apps installed from the App Store or TestFlight generate production App Attest keys. Builds you install from Xcode generate development keys, and production rejects them. Test iOS attestation with a TestFlight build.

Revert to Surt defaults​

Revert to Surt defaults removes your Android project and its key and your iOS App IDs, and returns both platforms to Surt's defaults. The attestation cadence is kept. After a revert, App Attest keys from your own apps fail validation again until you add your App IDs back.