Content

Indicates that some value (key to be attests, bundle identifier or package name, team identified or signer certificate, etc.) failed to verify This usually means that either the client's OS or the app was compromised/modified (or an implementation error occurred).
For Android, platformSpecificCause is always an AttestationValueException, on iOS it is always an IosAttestationException, both of which have enumerable reason property, which is documented.

Android Examples:

  • Invalid package name: platformSpecificCause.shouldBeInstanceOf<AttestationValueException>().reason shouldBe AttestationValueException.Reason.PACKAGE_NAME

  • Challenge mismatch: platformSpecificCause.shouldBeInstanceOf<AttestationValueException>().reason shouldBe AttestationValueException.Reason.CHALLENGE

  • OS version too low: platformSpecificCause.shouldBeInstanceOf<AttestationValueException>().reason shouldBe AttestationValueException.Reason.OS_VERSION

  • Public Key mismatch: platformSpecificCause.shouldBeInstanceOf<AttestationValueException>().reason shouldBe AttestationValueException.Reason.APP_UNEXPECTED

  • System integrity: platformSpecificCause.shouldBeInstanceOf<AttestationValueException>().reason shouldBe AttestationValueException.Reason.SYSTEM_INTEGRITY

  • A mismatch in security level can either result in the platformSpecificCause being Content and reason being AttestationValueException.Reason.SEC_LEVEL or a Certificate.Trust exception due to mismatching root certificates

iOS Examples

  • Invalid bundle identifier / team id / stage: platformSpecificCause.shouldBeInstanceOf<IosAttestationException>().reason shouldBe IosAttestationException.Reason.IDENTIFIER

  • Challenge mismatch: platformSpecificCause.shouldBeInstanceOf<IosAttestationException>().reason shouldBe IosAttestationException.Reason.CHALLENGE

  • OS version too low: platformSpecificCause.shouldBeInstanceOf<IosAttestationException>().reason shouldBe IosAttestationException.Reason.OS_VERSION

  • Public Key mismatch: platformSpecificCause.shouldBeInstanceOf<IosAttestationException>().reason shouldBe IosAttestationException.Reason.APP_UNEXPECTED

  • System integrity mismatch won't result in a valid attestation object obtained on the client, so this can never reach the back-end, except as a bogus attestation proof that will fail the attestation check in various ways depending on how this fake proof was constructed.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?
Link copied to clipboard
Link copied to clipboard
val platformSpecificCause: <Error class: unknown class>

Alias for cause (with more accurate semantics)

Functions

Link copied to clipboard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String