Skip to main content
Version: Guardian v0.5.3

Guardian SDK

Surt Guardian is a device intelligence SDK for mobile and web applications. It collects device signals, performs device integrity checks where available, and sends everything to the Surt backend for risk assessment. All security decisions are made server-side.

1
Install
Add the SDK to your project
2
Initialize
Configure at app startup
3
Mint JWT + Verify
Fetch a JWT from your backend, then call verify()

How It Works​

  1. Install the SDK in your project
  2. Initialize the SDK at app startup (no API key in the client)
  3. Your backend mints a short-lived JWT by calling Surt's preflight endpoint with your sp_live_* API key and the transaction context
  4. Call verify(jwt) with a fresh JWT for a direct risk decision, or collect(jwt?) for the server-to-server flow
  5. Receive a risk decision from verify(), or an encrypted payload from collect() that your backend sends to Surt

The SDK handles device fingerprinting and data collection internally. The sp_live_* API key never leaves your backend - the client only ever holds short-lived JWTs.

Two verification paths​

  • verify(jwt): SDK calls Surt directly, returns allowed: true/false to your app. Request a new JWT for each call. A JWT expires 30 minutes after it is issued. Native SDKs only.
  • collect(jwt?): SDK collects and encrypts data locally, your backend calls Surt's evaluate endpoint. The JWT is optional. Pass it to resolve the device's public IP into the payload and, on native, to apply your organization's attestation settings. Supported on every platform, including web.

Platform Support​

PlatformPackageDistributionverify()collect()
Web (Browser)@surtai/guardian-webnpmn/a✓
React Native@surtai/guardian-rnnpm✓✓
iOS (Swift)SurtGuardianSDKSwift Package Manager✓✓
Android (Kotlin)com.surt.guardian:securitysdkMaven (GitHub Packages)✓✓

Native platforms share the same API surface and are versioned in sync. The web SDK is collect-only: it has no verify() and no app-level initialization.

What It Collects​

Without permissions: Hardware info, security indicators (root/jailbreak, emulator, debugger, VPN, Frida, Xposed, Magisk), software info, battery, network type.

Opt-in: GPS location (requires the location permission). On Android only: WiFi details and SIM/carrier info (both require a permission) and camera count (no permission).